Dagger is a dependency injection framework that helps manage object creation and dependencies. It allows injecting dependencies into classes rather than having them directly instantiate dependencies. This improves testability. The document discusses how Dagger is used at the New York Times, including setting up modules, components, scopes like activity scope, and testing with Dagger. Qualifiers are used to provide different implementations for different flavors. Modules provide dependencies, components compose modules and inject dependencies. This architecture allows scaling across build variants and libraries while improving testability and code organization.
Dagger provides an alternative way to manage object dependencies through dependency injection. It uses compile time annotation processing to generate code that handles dependency resolution. Dagger eliminates the need to manually pass dependencies between objects. It supports features like lazy injection, providers, and scopes to control object lifecycles. The New York Times leveraged Dagger to decompose activities and share singletons like presenters across an application.
The Ring programming language version 1.7 book - Part 75 of 196Mahmoud Samir Fayed
The Objects Library provides an object-oriented way to manage GUI windows and objects in RingQt applications. It allows creating multiple window controllers and views from the same classes. The library handles connecting events to controller methods and provides easy access to parent/caller windows from child windows. Developers can use the library with the MVC pattern by creating controller and view classes for each window type. Key functions include Open_Window() to create windows, Last_Window() to access the last window, and Method() to link view events to controller methods. The library aims to simplify RingQt application development by handling window and object management.
The Ring programming language version 1.8 book - Part 77 of 202Mahmoud Samir Fayed
The Objects Library provides an object-oriented way to manage GUI windows and objects in RingQt applications. It uses classes to represent windows and controllers, and handles connecting events to controller methods. Some key features include opening windows with Open_Window(), creating view and controller classes that inherit from base classes, getting the last opened window with Last_Window(), and setting the parent object with SetParentObject() when opening sub-windows. The library aims to support the MVC pattern and make it easier to work with multiple related windows in RingQt apps.
Code to DI For - Dependency Injection for Modern ApplicationsCaleb Jenkins
This talk introduces the concepts of factories, strategy pattern, Inversion of Control, dependency injection and several of the available frameworks. We'll also look at common dependency injection patterns and various IoC/DI frameworks, the pros & cons, practical steps and guidance as well some of the real world scenarios with impact to unit testing and application architecture.
First presented at the Ft. Worth .NET Users Group on March 15th, 2016 - http://developingux.com/2016/03/14/code-to-di-for-in-ft-worth/ - Code will be posted to my GitHub soon! https://github.com/calebjenkins/ (Talks.Code-to-DI-For)
The document discusses Google Guice, an open source framework for Java that supports dependency injection. It provides examples of how to use Guice to inject dependencies into classes through field injection, method injection, and constructor injection. It also covers how to define modules to configure dependency bindings and scopes like singletons. The document is intended to introduce developers to the basics of using Guice for dependency injection in Java applications.
The document discusses how to write a plugin for the Google Closure Editor to add image functionality. It covers initializing the editor, registering the plugin, interacting with commands, and implementing an image dialog plugin by extending the necessary classes and interfaces. The plugin allows users to click an image button, open an image dialog to insert images into the content.
Dagger is a dependency injection framework that helps manage object creation and dependencies. It allows injecting dependencies into classes rather than having them directly instantiate dependencies. This improves testability. The document discusses how Dagger is used at the New York Times, including setting up modules, components, scopes like activity scope, and testing with Dagger. Qualifiers are used to provide different implementations for different flavors. Modules provide dependencies, components compose modules and inject dependencies. This architecture allows scaling across build variants and libraries while improving testability and code organization.
Dagger provides an alternative way to manage object dependencies through dependency injection. It uses compile time annotation processing to generate code that handles dependency resolution. Dagger eliminates the need to manually pass dependencies between objects. It supports features like lazy injection, providers, and scopes to control object lifecycles. The New York Times leveraged Dagger to decompose activities and share singletons like presenters across an application.
The Ring programming language version 1.7 book - Part 75 of 196Mahmoud Samir Fayed
The Objects Library provides an object-oriented way to manage GUI windows and objects in RingQt applications. It allows creating multiple window controllers and views from the same classes. The library handles connecting events to controller methods and provides easy access to parent/caller windows from child windows. Developers can use the library with the MVC pattern by creating controller and view classes for each window type. Key functions include Open_Window() to create windows, Last_Window() to access the last window, and Method() to link view events to controller methods. The library aims to simplify RingQt application development by handling window and object management.
The Ring programming language version 1.8 book - Part 77 of 202Mahmoud Samir Fayed
The Objects Library provides an object-oriented way to manage GUI windows and objects in RingQt applications. It uses classes to represent windows and controllers, and handles connecting events to controller methods. Some key features include opening windows with Open_Window(), creating view and controller classes that inherit from base classes, getting the last opened window with Last_Window(), and setting the parent object with SetParentObject() when opening sub-windows. The library aims to support the MVC pattern and make it easier to work with multiple related windows in RingQt apps.
Code to DI For - Dependency Injection for Modern ApplicationsCaleb Jenkins
This talk introduces the concepts of factories, strategy pattern, Inversion of Control, dependency injection and several of the available frameworks. We'll also look at common dependency injection patterns and various IoC/DI frameworks, the pros & cons, practical steps and guidance as well some of the real world scenarios with impact to unit testing and application architecture.
First presented at the Ft. Worth .NET Users Group on March 15th, 2016 - http://developingux.com/2016/03/14/code-to-di-for-in-ft-worth/ - Code will be posted to my GitHub soon! https://github.com/calebjenkins/ (Talks.Code-to-DI-For)
The document discusses Google Guice, an open source framework for Java that supports dependency injection. It provides examples of how to use Guice to inject dependencies into classes through field injection, method injection, and constructor injection. It also covers how to define modules to configure dependency bindings and scopes like singletons. The document is intended to introduce developers to the basics of using Guice for dependency injection in Java applications.
The document discusses how to write a plugin for the Google Closure Editor to add image functionality. It covers initializing the editor, registering the plugin, interacting with commands, and implementing an image dialog plugin by extending the necessary classes and interfaces. The plugin allows users to click an image button, open an image dialog to insert images into the content.
Taking Your GWT App to Tablets with GXT 4.0David Chandler
Sencha GXT builds on the open source GWT compiler to enable Java developers to build complex desktop-like user interfaces that run in the browser. In GXT 4.0, the core widgets have been updated to include touch functionality such as draggable borders, tree expand / collapse, LiveGrid scrolling, and long press to hover. In addition, you can add new gesture recognizers such as pinch and rotate to your apps. In this presentation, we look at the ins and outs of JavaScript touch event handling for GWT developers, touch support in GXT 4.0 widgets, how to eliminate the 300ms click delay in mobile browsers, and how to work with GXT’s new gesture recognizers. In addition, we look at some of the lessons learned by the GXT team while building GXT 4.0 and demo some debugging strategies for GWT apps on touch devices.
As your app code gets larger and more complex, it makes sense to break your project out into smaller reusable components. But what’s the best way to do this? How can you clearly version your internal libraries? What kind of setup and maintenance can you expect? How much could it slow down development time?
In this talk we’ll dive into the various ways you can manage internal library dependencies. We’ll chat about the current state of Android dependency management, Gradle multi-project builds, Git submodules, and creating a private maven repository in Artifactory. The speaker will share real-world examples, and the pros and cons of each approach.
This document discusses techniques for improving Android application performance, including:
1. Using static factory methods and object pooling to improve memory management.
2. Configuring applications and services to run in separate processes to improve isolation and increase available memory.
3. Implementing multi-threading correctly using Handlers to schedule work off the UI thread and reduce garbage collection calls.
4. Understanding how to use Android application and activity components like Services and Fragments appropriately.
Google Plus SignIn : l'Authentification GoogleMathias Seguy
Cette conférence vous expliquera en détail pourquoi mettre en place cette authentification et surtout comment la mettre en place.
Vous découvrirez ainsi:
la console des GoogleService,
comment utiliser l’objet PlusClient et ConnectionResult pour gérer l’identification de votre utilisateur,
comment mettre en place la « magic connexion » et la « manual connexion »,
comment mettre en place cette authentification au sein du cycle de vie de votre application,
comment charger le graphe social de l’utilisateur, faire des posts interactifs et des « application activities »…
Un grand moment pour tous ceux qui se demandent encore quelle est la meilleure stratégie pour authentifier son utilisateur.
Cette conférence s’associe:
d’un tutorial que vous pouvez retrouver sur GitHub: SignInWithGoogleTutorial(https://github.com/MathiasSeguy-Android2EE/SignInWithGoogleTutorial) sur GitHub.
d’une application mettant en place cette authentification que vous pouvez retrouver sur GooglePlay: MyPublicGoogleProfile (https://play.google.com/store/apps/details?id=com.android2ee.project.gplus.signin.publicid&hl=fr).
Et bien sûr la conférence va être disponible sur Android2EE dès le Vendredi 20 au rayon OpenResource\Conférences.
Vous aussi, authentifiez vos utilisateurs, inter-agissez avec eux et simplifiez leur la vie:
En espérant que vous y découvrirez votre bonheur :) .
- The document discusses various topics around testing Android applications such as creating test projects, different types of tests (unit, integration, UI, etc.), testing frameworks like JUnit, using annotations, running and debugging tests.
- It provides an overview of key concepts and tools required for testing including testing on emulators and real devices, using mocks, assertions and view assertions in tests.
- The document demonstrates how to structure tests, write test cases with different assertions and annotations, and debug issues by running tests in Eclipse and from the command line.
Links from the talk are available at:
https://github.com/claremacrae/talks/blob/master/Quickly_Testing_Qt_Desktop_Applications.md#top
Presented at Meeting C++ in Berlin on 15 November 2019.
Abstract: You've inherited some Qt GUI code: it's valuable, but it doesn't have tests, and it wasn't designed to be testable, so you need to start refactoring. But you can't refactor safely until the code has tests, and you can't add tests without refactoring! How can you ever break out of this loop?
Clare will review the challenges and potential sources of error that are specific to code that uses the Qt cross-platform graphical user interface library, and then describe how to guard against them.
There are many options for unit-testing Qt code, including Qt Test, Google Test and Catch. As well as covering those, and general principles for applying them, Clare will present a small but surprisingly effective C++11 library for applying "Approval Tests" to cross-platform Qt code.
Finally, she will briefly cover some other tools that can aid with inspecting and maintaining Qt code, which can in turn improve testability. Attendees will discover some quick, practical techniques to help write unit tests and integration tests for Qt code.
This document discusses experimenting with architecting web applications without using GWT-User. It recommends removing GWT-User from dependencies, avoiding JSNI and widgets in favor of JsInterop and Polymer, not using IDE plugins, and avoiding GWT RPC. It demonstrates this approach by developing WUnit, a unit testing framework for the game Warhammer. WUnit is implemented with a Java engine and model, and a frontend using GWT, Polymer, and JsInterop. This allows the code to be reused across platforms like web, Android, and iOS. The document discusses challenges encountered and open issues, and calls on the GWT steering committee to create more modular libraries to support this approach.
This document provides instructions for a workshop that demonstrates capabilities of the OpenWhisk platform deployed on IBM Bluemix. It shows how to create actions (functions) that execute in response to triggers (events) and integrate them using rules. Attendees will log into Bluemix, use the OpenWhisk dashboard to develop and monitor actions, and the command line to create an alarm-triggered action that runs every 20 seconds. The document encourages continuing to build on the application by creating new actions, triggers and rules.
Escaping the Sandbox Denver HTML5 2013-05-13michaelmalak
The document discusses using HTML5 and QtWebKit to create desktop applications that can run cross-platform on Windows, Linux and Mac. It provides step-by-step instructions on setting up the necessary software, including Visual Studio, Qt and Qt Creator. It then demonstrates how to build a basic GUI application with QtWebKit that can load local HTML files and JavaScript code, and interact with the files by opening them via a drop-down menu.
Dagger2 generates code to handle dependency injection behind the scenes. It creates classes like DaggerBreadShop to manage component bindings and factories like BreadModule_ProvideBreadFactory to retrieve dependencies. When a dependency is requested, it uses the factories to resolve the dependency by delegating to the corresponding module method, such as BreadModule::provideBread, which creates the actual instance. For singleton scopes, it caches the instance rather than creating a new one each time. When injecting dependencies into objects, it generates members injectors like Lunch_MembersInjector to set the dependencies directly.
Using and contributing to the next GuiceAdrian Cole
This document discusses dependency injection frameworks Guice and Dagger. It provides an overview of how Netflix uses Guice for projects like Governator and Karyon. It also explains how Dagger works by generating code at compile time to create a dependency injection graph, allowing for faster initialization than reflection-based frameworks. Examples are given of how to declare dependencies and satisfy them in both Guice and Dagger.
Антон Минашкин
Android разработчик с 5-летним стажем. Сейчас занимает должность Android Developer в GlobalLogic . Выступал на UA Mobile'14 , конференции "IT- ПЕРСПЕКТИВА" , Kyiv Android gathering , Android Dev Club и др . Cоорганизатор сообществ GDG Kremenchuk и IT Kremenchuk .
The document discusses dependency injection (DI) using Dagger 2 in Java. It begins by showing an example of traditional Java code without DI and the issues it can cause. It then introduces DI and how Dagger 2 implements it using annotations and compile-time validation. Key features of Dagger 2 highlighted include its Android compatibility, JSR-330 support, and generated code for easy debugging. The document provides examples of Dagger 2 annotations and APIs for declaring modules, components, scopes, lazy injection, and qualifiers. Overall it serves as an introduction to dependency injection using Dagger 2 in Java applications.
1. The document describes how to build an image gallery using an Android GridView. It involves adding a GridView to the layout, defining the grid item layout with an ImageView and TextView, creating a GridView adapter, setting the adapter, and handling clicks to open a detail activity.
2. Key aspects are using a GridView with attributes like numColumns, stretchMode, and verticalSpacing, and an adapter to populate each grid item from data. Clicking a grid item navigates to a details page.
3. The example builds the UI, handles clicks, and customizes the GridView style to display images and text in a grid.
The document provides an overview of Mockito, a mocking framework for Java. It discusses the basics of stubbing and verifying mock method calls. It also covers additional Mockito features like argument matchers, verifying interaction counts, annotations, stubbing void methods, spying on real objects, integration with Spring, and the Mockito JUnit runner. Code examples are provided to demonstrate stubbing, verifying, argument matchers, stubbing void methods, spying, and integration with Spring.
This document discusses Behavior-Driven Development (BDD) with Zend Framework 2. BDD is an evolution of Test-Driven Development (TDD) that starts with examples in natural language rather than application components. It uses a common language in a specification to communicate between stakeholders and developers. Behavioral specifications are translated into automated tests. The Behat framework allows executing these tests against a Zend Framework 2 application using the Mink extension, which supports headless and browser emulation. PHPSpec is also introduced for testing application components in a BDD style.
The document discusses Google Web Toolkit (GWT), a development toolkit that allows developers to write client-side applications in Java and compile them to optimized JavaScript that runs across browsers, providing features like Ajax functionality, browser compatibility, and optimizations for both developers and users. GWT uses generators, translators, and linkers to compile Java code into JavaScript that can run directly in web browsers.
This presentation is an update on Dagger 2. First, we'll give updates on our improvements to the implementation and the features that have been added since our original release. Then we'll discuss some of our plans for some new features and APIs that are coming in the next few months that should make dependency injection in Android applications easier and more straightforward than ever before.
This document discusses dependency injection (DI) using Dagger 2 in Java. It begins by showing an example of code without DI and the issues that arise. It then introduces DI and how Dagger 2 implements it using annotations and compile-time validation. Key features of Dagger 2 are explained, including its API, scopes, lazy injection, providers, qualifiers, and use of generated code. The document emphasizes that Dagger 2 allows injecting dependencies into classes in a clean way and catches errors at compile time. It concludes by offering some guidance on what types of objects are good candidates for injection.
Taking Your GWT App to Tablets with GXT 4.0David Chandler
Sencha GXT builds on the open source GWT compiler to enable Java developers to build complex desktop-like user interfaces that run in the browser. In GXT 4.0, the core widgets have been updated to include touch functionality such as draggable borders, tree expand / collapse, LiveGrid scrolling, and long press to hover. In addition, you can add new gesture recognizers such as pinch and rotate to your apps. In this presentation, we look at the ins and outs of JavaScript touch event handling for GWT developers, touch support in GXT 4.0 widgets, how to eliminate the 300ms click delay in mobile browsers, and how to work with GXT’s new gesture recognizers. In addition, we look at some of the lessons learned by the GXT team while building GXT 4.0 and demo some debugging strategies for GWT apps on touch devices.
As your app code gets larger and more complex, it makes sense to break your project out into smaller reusable components. But what’s the best way to do this? How can you clearly version your internal libraries? What kind of setup and maintenance can you expect? How much could it slow down development time?
In this talk we’ll dive into the various ways you can manage internal library dependencies. We’ll chat about the current state of Android dependency management, Gradle multi-project builds, Git submodules, and creating a private maven repository in Artifactory. The speaker will share real-world examples, and the pros and cons of each approach.
This document discusses techniques for improving Android application performance, including:
1. Using static factory methods and object pooling to improve memory management.
2. Configuring applications and services to run in separate processes to improve isolation and increase available memory.
3. Implementing multi-threading correctly using Handlers to schedule work off the UI thread and reduce garbage collection calls.
4. Understanding how to use Android application and activity components like Services and Fragments appropriately.
Google Plus SignIn : l'Authentification GoogleMathias Seguy
Cette conférence vous expliquera en détail pourquoi mettre en place cette authentification et surtout comment la mettre en place.
Vous découvrirez ainsi:
la console des GoogleService,
comment utiliser l’objet PlusClient et ConnectionResult pour gérer l’identification de votre utilisateur,
comment mettre en place la « magic connexion » et la « manual connexion »,
comment mettre en place cette authentification au sein du cycle de vie de votre application,
comment charger le graphe social de l’utilisateur, faire des posts interactifs et des « application activities »…
Un grand moment pour tous ceux qui se demandent encore quelle est la meilleure stratégie pour authentifier son utilisateur.
Cette conférence s’associe:
d’un tutorial que vous pouvez retrouver sur GitHub: SignInWithGoogleTutorial(https://github.com/MathiasSeguy-Android2EE/SignInWithGoogleTutorial) sur GitHub.
d’une application mettant en place cette authentification que vous pouvez retrouver sur GooglePlay: MyPublicGoogleProfile (https://play.google.com/store/apps/details?id=com.android2ee.project.gplus.signin.publicid&hl=fr).
Et bien sûr la conférence va être disponible sur Android2EE dès le Vendredi 20 au rayon OpenResource\Conférences.
Vous aussi, authentifiez vos utilisateurs, inter-agissez avec eux et simplifiez leur la vie:
En espérant que vous y découvrirez votre bonheur :) .
- The document discusses various topics around testing Android applications such as creating test projects, different types of tests (unit, integration, UI, etc.), testing frameworks like JUnit, using annotations, running and debugging tests.
- It provides an overview of key concepts and tools required for testing including testing on emulators and real devices, using mocks, assertions and view assertions in tests.
- The document demonstrates how to structure tests, write test cases with different assertions and annotations, and debug issues by running tests in Eclipse and from the command line.
Links from the talk are available at:
https://github.com/claremacrae/talks/blob/master/Quickly_Testing_Qt_Desktop_Applications.md#top
Presented at Meeting C++ in Berlin on 15 November 2019.
Abstract: You've inherited some Qt GUI code: it's valuable, but it doesn't have tests, and it wasn't designed to be testable, so you need to start refactoring. But you can't refactor safely until the code has tests, and you can't add tests without refactoring! How can you ever break out of this loop?
Clare will review the challenges and potential sources of error that are specific to code that uses the Qt cross-platform graphical user interface library, and then describe how to guard against them.
There are many options for unit-testing Qt code, including Qt Test, Google Test and Catch. As well as covering those, and general principles for applying them, Clare will present a small but surprisingly effective C++11 library for applying "Approval Tests" to cross-platform Qt code.
Finally, she will briefly cover some other tools that can aid with inspecting and maintaining Qt code, which can in turn improve testability. Attendees will discover some quick, practical techniques to help write unit tests and integration tests for Qt code.
This document discusses experimenting with architecting web applications without using GWT-User. It recommends removing GWT-User from dependencies, avoiding JSNI and widgets in favor of JsInterop and Polymer, not using IDE plugins, and avoiding GWT RPC. It demonstrates this approach by developing WUnit, a unit testing framework for the game Warhammer. WUnit is implemented with a Java engine and model, and a frontend using GWT, Polymer, and JsInterop. This allows the code to be reused across platforms like web, Android, and iOS. The document discusses challenges encountered and open issues, and calls on the GWT steering committee to create more modular libraries to support this approach.
This document provides instructions for a workshop that demonstrates capabilities of the OpenWhisk platform deployed on IBM Bluemix. It shows how to create actions (functions) that execute in response to triggers (events) and integrate them using rules. Attendees will log into Bluemix, use the OpenWhisk dashboard to develop and monitor actions, and the command line to create an alarm-triggered action that runs every 20 seconds. The document encourages continuing to build on the application by creating new actions, triggers and rules.
Escaping the Sandbox Denver HTML5 2013-05-13michaelmalak
The document discusses using HTML5 and QtWebKit to create desktop applications that can run cross-platform on Windows, Linux and Mac. It provides step-by-step instructions on setting up the necessary software, including Visual Studio, Qt and Qt Creator. It then demonstrates how to build a basic GUI application with QtWebKit that can load local HTML files and JavaScript code, and interact with the files by opening them via a drop-down menu.
Dagger2 generates code to handle dependency injection behind the scenes. It creates classes like DaggerBreadShop to manage component bindings and factories like BreadModule_ProvideBreadFactory to retrieve dependencies. When a dependency is requested, it uses the factories to resolve the dependency by delegating to the corresponding module method, such as BreadModule::provideBread, which creates the actual instance. For singleton scopes, it caches the instance rather than creating a new one each time. When injecting dependencies into objects, it generates members injectors like Lunch_MembersInjector to set the dependencies directly.
Using and contributing to the next GuiceAdrian Cole
This document discusses dependency injection frameworks Guice and Dagger. It provides an overview of how Netflix uses Guice for projects like Governator and Karyon. It also explains how Dagger works by generating code at compile time to create a dependency injection graph, allowing for faster initialization than reflection-based frameworks. Examples are given of how to declare dependencies and satisfy them in both Guice and Dagger.
Антон Минашкин
Android разработчик с 5-летним стажем. Сейчас занимает должность Android Developer в GlobalLogic . Выступал на UA Mobile'14 , конференции "IT- ПЕРСПЕКТИВА" , Kyiv Android gathering , Android Dev Club и др . Cоорганизатор сообществ GDG Kremenchuk и IT Kremenchuk .
The document discusses dependency injection (DI) using Dagger 2 in Java. It begins by showing an example of traditional Java code without DI and the issues it can cause. It then introduces DI and how Dagger 2 implements it using annotations and compile-time validation. Key features of Dagger 2 highlighted include its Android compatibility, JSR-330 support, and generated code for easy debugging. The document provides examples of Dagger 2 annotations and APIs for declaring modules, components, scopes, lazy injection, and qualifiers. Overall it serves as an introduction to dependency injection using Dagger 2 in Java applications.
1. The document describes how to build an image gallery using an Android GridView. It involves adding a GridView to the layout, defining the grid item layout with an ImageView and TextView, creating a GridView adapter, setting the adapter, and handling clicks to open a detail activity.
2. Key aspects are using a GridView with attributes like numColumns, stretchMode, and verticalSpacing, and an adapter to populate each grid item from data. Clicking a grid item navigates to a details page.
3. The example builds the UI, handles clicks, and customizes the GridView style to display images and text in a grid.
The document provides an overview of Mockito, a mocking framework for Java. It discusses the basics of stubbing and verifying mock method calls. It also covers additional Mockito features like argument matchers, verifying interaction counts, annotations, stubbing void methods, spying on real objects, integration with Spring, and the Mockito JUnit runner. Code examples are provided to demonstrate stubbing, verifying, argument matchers, stubbing void methods, spying, and integration with Spring.
This document discusses Behavior-Driven Development (BDD) with Zend Framework 2. BDD is an evolution of Test-Driven Development (TDD) that starts with examples in natural language rather than application components. It uses a common language in a specification to communicate between stakeholders and developers. Behavioral specifications are translated into automated tests. The Behat framework allows executing these tests against a Zend Framework 2 application using the Mink extension, which supports headless and browser emulation. PHPSpec is also introduced for testing application components in a BDD style.
The document discusses Google Web Toolkit (GWT), a development toolkit that allows developers to write client-side applications in Java and compile them to optimized JavaScript that runs across browsers, providing features like Ajax functionality, browser compatibility, and optimizations for both developers and users. GWT uses generators, translators, and linkers to compile Java code into JavaScript that can run directly in web browsers.
This presentation is an update on Dagger 2. First, we'll give updates on our improvements to the implementation and the features that have been added since our original release. Then we'll discuss some of our plans for some new features and APIs that are coming in the next few months that should make dependency injection in Android applications easier and more straightforward than ever before.
This document discusses dependency injection (DI) using Dagger 2 in Java. It begins by showing an example of code without DI and the issues that arise. It then introduces DI and how Dagger 2 implements it using annotations and compile-time validation. Key features of Dagger 2 are explained, including its API, scopes, lazy injection, providers, qualifiers, and use of generated code. The document emphasizes that Dagger 2 allows injecting dependencies into classes in a clean way and catches errors at compile time. It concludes by offering some guidance on what types of objects are good candidates for injection.
Антон Минашкин "Dagger 2. Right way to do Dependency Injections"Fwdays
DI в Android-е, все что вы давно хотели, но боялись спросить. Обсудим что это вообще такое, какие варианты реализации есть, какая между ними разница, какие из них подходят а какие нет.
A talk looking at building a smart savings account - some hardware hacking, Raspberry Pi development, Bluetooth LE, electronics, bit banging - all using Swift.
This document summarizes a presentation about the Gretty Gradle plugin for managing web containers. The Gretty plugin allows running web applications on Jetty or Tomcat with features like hot deployment, integration testing, code coverage, and debugging support. It also enables running multiple web applications on a single container as a "Gretty Farm" with capabilities like single sign-on and classpath isolation. Gretty can build standalone products that package a web application with its dependencies and configuration. It also integrates with Spring Boot for developing and running Spring-based web applications.
Here are the key things GWT's generators do to enable RPCs:
1. Generate serialization/deserialization code:
- The generator analyzes the service interface and generates code to serialize/deserialize requests and responses to/from JSON or other formats.
2. Generate client-side proxy classes:
- Proxy classes handle calling the service and mapping requests/responses to Java objects on the client.
3. Handle asynchronous callbacks:
- The proxy implements callbacks so the client code receives responses asynchronously without blocking.
4. Handle cross-domain requests:
- GWT handles any cross-domain issues behind the scenes via techniques like JSONP.
So in summary, the generators automate all the boiler
The document discusses various aspects of Contexts and Dependency Injection (CDI) in Java EE, including how to use @Inject for dependency injection, qualifiers to select specific implementations, producers to provide dependencies, and events to communicate between components in a loosely coupled way. It also demonstrates CDI concepts like qualifiers, producers, scopes, and alternatives through examples.
The document discusses Google Web Toolkit (GWT), a development toolkit that allows developers to write client-side applications in Java and have their code compiled into optimized JavaScript that runs across browsers. It provides an overview of GWT, demonstrates its capabilities, and discusses how it optimizes applications for both developers and users. GWT aims to simplify Ajax development, improve cross-browser portability, and increase application performance.
Learn how to use Continuous Delivery for Puppet Enterprise (CD4PE) in an interactive workshop with hands-on labs. What's CD4PE? CD4PE is the continuous delivery add-on to Puppet Enterprise, aimed at accelerating the speed at which you can get Puppet code changes deployed into production safely. CD4PE facilitates code collaboration across teams, and dramatically improves the release management process for teams that own & maintain individual Puppet modules. CD4PE integrates with both Puppet Enterprise as well as your version control system of choice.
After completing the workshop, you will be able to use CD4PE to perform common code management tasks on your Puppet control repo and modules.
The document discusses dependency injection and compares two popular libraries for implementing it - Dagger and Koin. It provides an overview of dependency injection and how it works. It then describes how Dagger uses annotations to define dependencies that are compiled into code, while Koin uses a Kotlin DSL without code generation at runtime. It highlights pros and cons of each, such as Dagger being fully type safe but more complex, while Koin is easier to use but lacks type safety.
Google App Engine in 40 minutes (the absolute essentials)Python Ireland
This talk covers just the stuff needed to get you up-to-speed with Google App Engine and its associated technologies (based on the Python run-time, of course). In addition to a bit of talking, Paul will also demo a working webapp built and deployed on the App Engine cloud... all in 40 minutes.
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Speck&Tech
ABSTRACT: A prima vista, un mattoncino Lego e la backdoor XZ potrebbero avere in comune il fatto di essere entrambi blocchi di costruzione, o dipendenze di progetti creativi e software. La realtà è che un mattoncino Lego e il caso della backdoor XZ hanno molto di più di tutto ciò in comune.
Partecipate alla presentazione per immergervi in una storia di interoperabilità, standard e formati aperti, per poi discutere del ruolo importante che i contributori hanno in una comunità open source sostenibile.
BIO: Sostenitrice del software libero e dei formati standard e aperti. È stata un membro attivo dei progetti Fedora e openSUSE e ha co-fondato l'Associazione LibreItalia dove è stata coinvolta in diversi eventi, migrazioni e formazione relativi a LibreOffice. In precedenza ha lavorato a migrazioni e corsi di formazione su LibreOffice per diverse amministrazioni pubbliche e privati. Da gennaio 2020 lavora in SUSE come Software Release Engineer per Uyuni e SUSE Manager e quando non segue la sua passione per i computer e per Geeko coltiva la sua curiosità per l'astronomia (da cui deriva il suo nickname deneb_alpha).
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
2. About
Joan
Puig
Sanz
• Electrical
Engineer
• So<ware/hardware
fan
:)
• Open
Source
Projects:
– ServDroid:
Simple
web
Server
– BeyondAR
Framework:
Augmented
Reality
framework
beyondar.com
1
3. //TODO:
1. What
is
Dependency
Injec+on?
2. Simple
Example:
Factory
PaPern
3. Android
and
Dependency
Injec+on
– KitKatMachine
example
with
RoboGuice
and
Dagger
– Compare
RoboGuice
and
Dagger
4. Conclusions
2
4. What
is
Dependency
Injec+on?
“Dependency
injec+on
is
a
so<ware
design
paPern
that
allows
the
removal
of
hard-‐coded
dependencies
and
makes
it
possible
to
change
them,
whether
at
run-‐+me
or
compile-‐+me”
Dependency
Injec+on
is
like
ordering
a
hawaiian
pizza
but
specifying
the
ingredients,
for
instance,
instead
of
ham
we
want
pepperoni.
3
5. What
does
Dependency
Injec+on
do?
• It
improves
the
code:
reusable,
modulable
and
testability
• It
allows
the
developer
to
focus
on
the
code
that
adds
a
plus
value
to
the
app:
– No
need
to
worry
about
Singletons,
Factories
and
others.
4
7. The
Factory
PaPern
public interface Heater {
public void on();
public void off();
public boolean isHot();
}
public class ElectricHeater implements Heater {
private boolean heating;
public void on() {
heating = true;
}
public void off() {
heating = false;
}
public boolean isHot() {
return heating;
}
}!
Heater
void
on()
void
off()
boolean
isHot()
ElectricHeater
6
8. The
Factory
PaPern
–
wri+ng
it
public class HeaterFactory {
private HeaterFactory () {}
private static Heater instance = new ElectricHeater();
public static Heater getInstance() {
return instance;
}
public static void setInstance(Heater heater) {
instance = heater;
}
}
public class HotMachine{
public void start(){
heater = HeaterFactory.getInstance();
heater.on();
// Other stuff
}
}!
7
9. The
Factory
PaPern
–
Unit
Test
public void testHeater(){
Heater previous =
HeaterFactory.getInstance();
try{
Heater mock = new mockHeater();
HeaterFactory.setInstance(mock);
HotMachine machine = new HotMachine();
machine.start();
assertTrue(mock.isHot());
}finally{
HeaterFactory.setInstance(previous);
}
}
8
10. Implementa+on
drawbacks
• For
every
dependency
we
make
we
need
to
write
the
same
code.
• Our
test
had
to
pass
the
mock
to
the
factory
and
then
clean
up
a<erwards.
• You
cannot
determine
if
HotMachine
depends
on
Heater
at
first
sight
• It
could
be
difficult
to
reuse
HotMachine
in
a
different
context
9
11. Implementa+on
drawbacks
• For
every
dependency
we
make
we
need
to
write
the
same
code.
• Our
test
had
to
pass
the
mock
to
the
factory
and
then
clean
up
a<erwards.
• You
cannot
determine
if
Machine
depends
on
Heater
at
first
sight
• It
could
be
difficult
to
reuse
Machine
in
a
different
context
10
12. Factory
PaPern
with
DI
•
We
need
to
define
a
module
specifying
what
are
we
going
to
inject.
– Heater
as
ElectricHeater
– We
also
can
define
how.
public class HotMachine{
private final Heater heater;
@Inject
public HotMachine(Heater heater){
this.heater = heater;
}
public void start(){
heater.on();
//Other stuff
}
}!
11
13. Factory
PaPern
with
DI
–
Unit
Tes+ng
!
public void testHeater(){
Heater mock= new mockHeater();
HotMachine machine = new HotMachine(mock);
machine.start()
assertTrue(mock.isHot());
}!
12
15. Android
• We
can
create
one
ourselves…
but
it
is
not
needed
and
it
is
a
lot
of
work
• The
best
ones
are
RoboGuice
and
Dagger
– RoboGuice
does
injec+on
during
run+me
• hPps://github.com/roboguice/roboguice
– Dagger
Generates
code
• hPps://github.com/square/dagger/
14
16. Example
-‐
KitKat
Machine
• Chocolate
• Cookie
• Machine
Chocolate
Heater
Machine
– Heater
– Mold
Cookie
Mold
The
source
code
can
be
found
here:
hEp://beyondar.com/di.html
15
17. Example
-‐
KitKat
Machine:
Steps
1.
2.
3.
4.
Define
dependencies
Create
modules
Prepare
the
graph
Inject
dependencies
16
20. Example
–
KitKat
Machine:
Dependencies
!
public interface Cookie {
public void doWhatCookiesDo();
}
public class TastyCookie implements Cookie{
@Inject
public TastyCookie(){
print("New cookie");
}
public void doWhatCookiesDo(){
print("Yummie yummie”);
}
}!
Cookie
void doWhatCookiesDo()
TastyCookie
19
21. Example
–
KitKat
Machine:
Dependencies
public interface Machine {
public void makeKitKat(Chocolate chocolate, Cookie cookie);
}!
RoboGuice
@Singleton
public class KitKatMachine implements Machine{
private Mold mold;
private Heater heater;
@Inject
public KitKatMachine(Mold mold, Heater
heater) {
this.mold = mold; this.heater = heater;
}
public void makeKitKat(Chocolate chocolate,
Cookie cookie){
heater.on();
Chocolate meltedChocolate =
heater.melt(chocolate);
mold.putToghether(cookie, chocolate);
print (”Kitkat ready”);
}
Dagger
public class KitKatMachine implements Machine{
private Mold mold;
private Lazy<Heater> heater;
@Inject
public KitKatMachine(Mold mold, Lazy<Heater>
heater) {
this.mold = mold; this.heater = heater;
}
public void makeKitKat(Chocolate chocolate,
Cookie cookie){
heater.get.on();
Chocolate meltedChocolate =
heater.get().melt(chocolate);
mold.putToghether(cookie, chocolate);
print (”Kitkat ready”);
}
20
22. Example
-‐
KitKat
Machine:
Modules
RoboGuice
public class kitkatModule extends
AbstractModule {
protected void configure(){
bind(Cookie.class).
toProvider(CookieProvider.class);
bind(Chocolate.class).
toProvider(ChocolateProvider.class);
bind(Machine.class).
to(KitkatMachine.class)
}
}
public class ChocolateProvider implements
Provider<Chocolate>{
@Override
public Chocolate get() {
return new ChocolateWithMilk();
}
}
Dagger
@Module
public class KitkatModule {
@Provides public Chocolate
provideChocolate() {
return new ChocolateWithMilk();
}
@Provides public Cookie
provideCookie(){
return new TastyCookie();
}
@Provides @Singleton public Machine
}
providesMachine(KitKatMachine machine){
return machine;
}
21
23. Example
-‐
KitKat
Machine:
Preparing
the
Graph
RoboGuice
public class KitKatMachineApplication extends
Application {
public void onCreate() {
super.onCreate();
RoboGuice.setBaseApplicationInjector
(this, Stage.PRODUCTION,
getModules());
}
protected Module[] getModules() {
List<Module> modules =
new ArrayList<Module>();
modules.add(
RoboGuice.newDefaultRoboModule(this));
modules.add(new IngredientsModule());
modules.add(new MachineModule());
return (Module[]) modules.toArray(new
Module[modules.size()]);
}
}
Dagger
public class KitKatMachineApplication extends
Application{
private ObjectGraph graph;
public void onCreate() {
super.onCreate();a
graph = ObjectGraph.create(
getModules().toArray());
}
protected List<Object> getModules() {
ArrayList<Object> modules =
new ArrayList<Object>();
modules.add(new AndroidModule(this));
modules.add(new IngredientsModule());
modules.add(new MachineModule());
return modules;
}
public void inject(Object object) {
graph.inject(object);
}
public ObjectGraph getApplicationGraph() {
return graph;
}
22
24. Example
-‐
KitKat
Machine:
Injec+ng
dependencies
public class HomeFragment extends #########{
@Inject Provider<Chocolate> chocolate;
@Inject Provider<Cookie> cookie;
@Inject Machine machine;
// With Dagger we can use Lazy<Machine> to create a lazy singleton
onResume(){
super.onResume()
machine.makeKitKat(chocolate.get(), cookie.get());
}
}
#########
• RoboGuice:
RoboFragment
• Dagger:
BaseFragment
(your
custom
BaseFragment)
23
25. Example
-‐
KitKat
Machine:
Injec+ng
dependencies
-‐
Dagger
public class BaseFragment extends Fragment {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
// Perform injection so that when this call returns all
// dependencies will be available for use.
((KitKatMachineApplication) getApplication()).inject(this); }
}!
• The
same
goes
for
the
Ac+vity.
• It
is
highly
customizable
– For
Instance:
It
is
possible
to
personalize
the
modules
that
we
want
to
inject
into
the
Ac+vity
(crea+ng
a
derivate
graph)
24
27. Injec+ng
other
stuff
-‐
Qualifiers
• It
is
also
possible
to
inject
Qualifiers:
-‐
Module:
@Provides @Named("app_version")
public String getAppVersionCode(Context context) {
return String.valueOf(getPackageInfo(context).versionCode);
}!
-‐
InjecSng:
!
@Inject @Named("app_version") String version;!
!
26
28. Injec+ng
other
stuff
-‐
RoboGuice
• With
RoboGuice
we
can
inject
views,
preferences,
fragments,
extras
and
resources:
@InjectView(R.id.myTextView) private TextView myTextView;
@InjectResource(R.string.app_name) private String appName;!
!
• We
also
can
inject
Context,
Inflater,
Services
and
some
other
Android
Objects.
– Check
out
DefaultRoboModule.java
for
more
informa+on
27
30. Side
by
side
RoboGuice
• Can
inject
dependencies
in
private
fields
• Method
Injec+on
supported
• Configure
Proguard
is
hard
(doable)
• Ready
to
inject
a
lot
of
Android
stuff
• It
uses
Guice
which
is
more
server
related
• Very
cool
framework
Dagger
• Method
Injec+on
not
supported…
for
now
• Faster.
In
a
big
app
it
can
reduce
the
startup
+me
in
a
few
seconds
• Configure
Proguard
is
a
pain
in
the
ass
• If
you
want
to
inject
Android
stuff
you
need
to
write
the
code
to
do
it
• It
forces
developers
to
write
a
bit
more
code
• Remember
that
it
generates
code!
• Very
cool
framework
29
31. Conclusions
• Dependency
injec+ons
allows
the
developer
to
spend
+me
on
the
important
parts
• It
makes
the
applica+on
more
modular
• It
helps
tes+ng
your
applica+on
• It
makes
your
code
less
like
spagheq,
ravioli,
lasagna
and
other
Italian
foods
• The
developer
needs
to
understand
the
DI
framework
• Easier
to
implement
at
the
beginning
than
at
the
end
• Very
cool
frameworks
:)
30