Architect android apps with MVP, Dagger, Retrofit, Gson, JSON, Kotlin Data Classes and RecyclerView using Kotlin.
How to Convert JSON to Kotlin Data Classes.
Kotlin Retrofit Example with RecyclerView.
MVP Android using Kotlin project structure.
Kotlin Android Dagger2 Tutorial.
How to use GSON serialization for JSON response in Kotlin.
Find More on:
http://developine.com/building-android-mvp-app-in-kotlin-using-dagger-retrofit/
And
http://developine.com/
How To Dependency Inject a Kitten: An Introduction to Dagger 2Todd Burgess
An introduction to using the Dagger 2 dependency injection framework for Android applications. Brief explanation of dependency injection and a example of how to implement Dagger 2. Includes a real world example of Dagger 2
This document provides step by step instructions on how to achieve dependency injection using dagger 2. The code is written in java. The code content is courtesy of Coding In Flow - You can check out this channel for in-depth explanation. https://www.youtube.com/watch?v=ZZ_qek0hGkM&list=PLrnPJCHvNZuA2ioi4soDZKz8euUQnJW65
ReactJS is a JavaScript library for building user interfaces. It uses a virtual DOM to detect changes and efficiently update the real DOM. Key features include:
- Using JSX syntax and ES6 features like classes
- Creating reusable UI components
- Unidirectional data flow from parent to child components
- Handling events and managing local component state
Supporting Java™ 9 in Eclipse - A critical perspective - Stephan HerrmannEclipse Day India
The document discusses supporting Java 9 in Eclipse through 4 acts. Act 1 introduces Java modules and demonstrates them in Eclipse. Act 2 discusses issues with existing Eclipse APIs due to Java 9 changes. Act 3 explores complexities around split packages and package references between modules. Act 4 discusses representing Java 9 module options in the Eclipse UI. The conclusion reflects on encapsulation, isolation and compatibility challenges with Java 9.
The document discusses the author's experience creating an Android app using Kotlin. It begins with introductions and then describes how to set up Kotlin for Android development. The author then shows code examples from an app that makes the device sleep when tapped. A comparison is made between the Kotlin and Java versions of the code, noting that the Kotlin code is more concise. In summary, the author finds that Kotlin reduces the amount of coding needed compared to Java.
The document provides an overview of the Android infrastructure and key concepts:
(1) It describes the layers of an Android application including the presentation layer, application logic layer, and domain layer.
(2) It explains important Android concepts such as the Android runtime environment, Dalvik virtual machine, application lifecycle and activities, and use of contexts.
(3) It discusses alternatives for common tasks like dependency injection with RoboGuice and Dagger, handling resources and views with ButterKnife and AndroidAnnotations, and accessing data with SQLite and ORMLite.
(4) It also briefly covers testing approaches on the DVM and JVM using AndroidTestCase, Robotium, and Robolectric
The document provides a tutorial on using Google GIN (GWT INjection) for dependency injection in GWT client-side code. It explains that GIN is built on top of Guice and brings automatic dependency injection to GWT applications. It then outlines the 5 steps to implement GIN: 1) design interfaces, 2) create implementation classes, 3) configure bindings in a module, 4) define a Ginjector interface, and 5) generate and use the Ginjector. The steps are then explained in further detail with examples.
How To Dependency Inject a Kitten: An Introduction to Dagger 2Todd Burgess
An introduction to using the Dagger 2 dependency injection framework for Android applications. Brief explanation of dependency injection and a example of how to implement Dagger 2. Includes a real world example of Dagger 2
This document provides step by step instructions on how to achieve dependency injection using dagger 2. The code is written in java. The code content is courtesy of Coding In Flow - You can check out this channel for in-depth explanation. https://www.youtube.com/watch?v=ZZ_qek0hGkM&list=PLrnPJCHvNZuA2ioi4soDZKz8euUQnJW65
ReactJS is a JavaScript library for building user interfaces. It uses a virtual DOM to detect changes and efficiently update the real DOM. Key features include:
- Using JSX syntax and ES6 features like classes
- Creating reusable UI components
- Unidirectional data flow from parent to child components
- Handling events and managing local component state
Supporting Java™ 9 in Eclipse - A critical perspective - Stephan HerrmannEclipse Day India
The document discusses supporting Java 9 in Eclipse through 4 acts. Act 1 introduces Java modules and demonstrates them in Eclipse. Act 2 discusses issues with existing Eclipse APIs due to Java 9 changes. Act 3 explores complexities around split packages and package references between modules. Act 4 discusses representing Java 9 module options in the Eclipse UI. The conclusion reflects on encapsulation, isolation and compatibility challenges with Java 9.
The document discusses the author's experience creating an Android app using Kotlin. It begins with introductions and then describes how to set up Kotlin for Android development. The author then shows code examples from an app that makes the device sleep when tapped. A comparison is made between the Kotlin and Java versions of the code, noting that the Kotlin code is more concise. In summary, the author finds that Kotlin reduces the amount of coding needed compared to Java.
The document provides an overview of the Android infrastructure and key concepts:
(1) It describes the layers of an Android application including the presentation layer, application logic layer, and domain layer.
(2) It explains important Android concepts such as the Android runtime environment, Dalvik virtual machine, application lifecycle and activities, and use of contexts.
(3) It discusses alternatives for common tasks like dependency injection with RoboGuice and Dagger, handling resources and views with ButterKnife and AndroidAnnotations, and accessing data with SQLite and ORMLite.
(4) It also briefly covers testing approaches on the DVM and JVM using AndroidTestCase, Robotium, and Robolectric
The document provides a tutorial on using Google GIN (GWT INjection) for dependency injection in GWT client-side code. It explains that GIN is built on top of Guice and brings automatic dependency injection to GWT applications. It then outlines the 5 steps to implement GIN: 1) design interfaces, 2) create implementation classes, 3) configure bindings in a module, 4) define a Ginjector interface, and 5) generate and use the Ginjector. The steps are then explained in further detail with examples.
Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...Sigma Software
The document discusses the architecture and testing approach used in an Android application called R.I.D. It describes the Dagger dependency injection structure including AppComponent, BaseActivityComponent, and ActivityComponent. It provides code samples for modules, subcomponents, and annotations. It also discusses the use of UI tests with Espresso and custom rules to mock dependencies, as well as unit testing with mocked presenters and custom RxJava schedulers. Finally, it covers test coverage, continuous integration, hiring needs, and future plans.
Антон Минашкин
Android разработчик с 5-летним стажем. Сейчас занимает должность Android Developer в GlobalLogic . Выступал на UA Mobile'14 , конференции "IT- ПЕРСПЕКТИВА" , Kyiv Android gathering , Android Dev Club и др . Cоорганизатор сообществ GDG Kremenchuk и IT Kremenchuk .
Dagger is a Dependency Injection Framework for Android application. In Abusing Dependency Injection with Dagger for Dummies (in 45 minutes) we will explain from the most basic usage of Dagger to take the most of it by providing advanced tricks by using Scoped Injection.
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.
The document discusses using AndroidAnnotations to simplify Android application development. It provides examples of how AndroidAnnotations uses annotations to reduce boilerplate code for common tasks like finding views by ID, handling click listeners, and managing shared preferences. The examples demonstrate annotating activities, fragments, and methods to automatically generate implementation code using the AndroidAnnotations compiler. In the last section, it briefly explains how AndroidAnnotations utilizes Java's annotation processing tool to generate source files at compile time.
This document summarizes a keynote presentation about Angular 2.0.0. It discusses the growth of the Angular community from 1.5 million users in October 2015 to 1.2 million users in September 2016 for Angular 1 and 623k users for Angular 2 in September 2016. It also outlines Angular's major release cycle and provides an overview of the core features and extensions of the Angular framework.
This presentation slide describe basic understanding of Dependency Injection(DI) as well as why it is needed. Main purposes of the presentation slide are to explain the basic things of Dagger2 and annotation of Dagger2. This presentation slide is beneficial for all kinds of android developer from beginner to expert.
Architecting your GWT applications with GWT-Platform - Lesson 02rhemsolutions
This document discusses architecting a GWT application with the GWT-Platform framework. It recommends using a Model-View-Presenter architecture and describes some MVP frameworks for GWT including gwt-platform. It provides an overview of how to structure an app with GWT-Platform and GXT3 including using places, tokens, presenters and dependency injection with GIN. It also covers styling the app with ClientBundle and includes sample code for creating a default presenter.
This presentation is about Dependency Injection using dagger2 in Android. I highly hope these slides would help you to understand dagger2.
Also, I provide a sample dagger2 repo. So if you want to add dagger2 in your project feel free to use this repo:
https://github.com/javadhme/dagger-master-project
One more thing, If these assets help you to understand dagger2 do not forget to star my github repo.
This document summarizes a presentation given by Ken Sipe on Gradle. It begins with an introduction of Ken Sipe and his background. It then provides an overview of existing Java build tools like Ant, Maven, and Ant with Ivy. It describes some shortcomings of Ant and Maven and introduces Gradle as a build tool built on Ant and Ivy but using Groovy as a build DSL. The document outlines key functionality of a build system and shows examples of simple Gradle build files. It discusses additional Gradle features like tasks, dependencies, plugins, and customization options.
This document provides an overview of EzSMS, a simple SMS gateway application for Android built using Ruby. It discusses why SMS is a useful communication method, introduces some key aspects of building Android applications like activities and intents, and provides a high-level look at how Ruboto allows Ruby scripts to be packaged and run as Android applications by mapping the underlying Android APIs. It also shares some limitations of using JRuby and Ruboto on Android.
This document provides a summary of dependency injection and Dagger 2 in Android applications. It explains that dependency injection separates configuration from usage to improve maintainability, testability and reduce coupling. It describes how Dagger generates code to inject dependencies using annotations and component and module definitions. Modules provide dependencies while components inject them into classes. Scopes like per activity are supported. Overall Dagger improves architecture by managing object creation and dependencies through compile time verification rather than runtime errors.
At Lia Infraservice we create Dynamic Websites. Become a front-end React JS developer and be a part of our tech-savvy Web App Development Company in Chennai.
Esta charla comprende las lecciones aprendidas convirtiendo la app de Android de Teambox (una app repleta de deuda técnica y con un alto nivel de acoplamiento entre clases), en la versión actual de Redbooth, que intenta cumplir la arquitectura Hexagonal y los principios SOLID. Durante la exposición explicaremos como fuimos desenredando el código paso a paso; como aplicamos por partes los conceptos de la arquitectura hexagonal; como dejamos de lado componentes del framework de Android que dificultaban el mantenimiento de la app; y que errores cometimos, como los solucionamos y como se podrían haber evitado.
Basic Concepts towards understanding of Dagger-2 in android.
Native android development made easy by google dagger libraries. Easy way to understand basic concepts of Dagger and android mobile app development libraries.
The document discusses React Native and how it can be used with Swift. It provides an overview of React Native, explaining what it is and how it allows building native mobile apps using React. It then demonstrates how to create a basic React Native app, integrate it with Swift code to call Swift functions from React Native and pass data from Swift to React Native. This is shown through examples of a registration view app and a contacts list app that retrieves contact data from Swift.
GITS Class #20: Building A Fast and Responsive UI in React NativeGITS Indonesia
Pada Desember 2019, berlangsung GITS Class #20, seminar gratis dan terbuka untuk umum, di kantor GITS Indonesia. Topik, salah satu iOS developer di GITS Indonesia membawakan materi yang lebih general tak hanya untuk pemograman iOS, yakni mengenai React Native.
Follow akun GITS Indonesia untuk mendapatkan info terkait event seru selanjutnya!
Instagram: @gitsindonesia
Twitter: @gitsindonesia
Facebook: GITS Indonesia
Medium: GITS Apps Insight
YouTube: GITS Indonesia
LinkedIn: GITS Indonesia
Website: https://gits.id/
Architecting Single Activity Applications (With or Without Fragments)Gabor Varadi
Presentation by Gabor Varadi (@zhuinden)
What Activity and Fragment actually are in Android
What are the problems they solve, and what are their downsides
How to use a custom solution that simplifies navigation in Android applications
https://github.com/Zhuinden/navigation-example
Presentation on design pattern software project lll Uchiha Shahin
We have prepared a presentation on design pattern. Here are 7 types of design pattern we have presented.
1. Mediator Design
2. Iterator Pattern
3. Bridge Pattern
4. Decorator Pattern
5. Composite Pattern
6. Template Pattern
7. Singleton Pattern
Here is the link of Canva Slide to use as template----
https://www.canva.com/design/DAEmun8Sjks/NmH08MOYrAWSaTERNbe5LA/view?utm_content=DAEmun8Sjks&utm_campaign=designshare&utm_medium=link&utm_source=sharebutton&mode=preview
You can contact me in LinkedIn or any other social platform for more infromation.
Thank you.
Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...Sigma Software
The document discusses the architecture and testing approach used in an Android application called R.I.D. It describes the Dagger dependency injection structure including AppComponent, BaseActivityComponent, and ActivityComponent. It provides code samples for modules, subcomponents, and annotations. It also discusses the use of UI tests with Espresso and custom rules to mock dependencies, as well as unit testing with mocked presenters and custom RxJava schedulers. Finally, it covers test coverage, continuous integration, hiring needs, and future plans.
Антон Минашкин
Android разработчик с 5-летним стажем. Сейчас занимает должность Android Developer в GlobalLogic . Выступал на UA Mobile'14 , конференции "IT- ПЕРСПЕКТИВА" , Kyiv Android gathering , Android Dev Club и др . Cоорганизатор сообществ GDG Kremenchuk и IT Kremenchuk .
Dagger is a Dependency Injection Framework for Android application. In Abusing Dependency Injection with Dagger for Dummies (in 45 minutes) we will explain from the most basic usage of Dagger to take the most of it by providing advanced tricks by using Scoped Injection.
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.
The document discusses using AndroidAnnotations to simplify Android application development. It provides examples of how AndroidAnnotations uses annotations to reduce boilerplate code for common tasks like finding views by ID, handling click listeners, and managing shared preferences. The examples demonstrate annotating activities, fragments, and methods to automatically generate implementation code using the AndroidAnnotations compiler. In the last section, it briefly explains how AndroidAnnotations utilizes Java's annotation processing tool to generate source files at compile time.
This document summarizes a keynote presentation about Angular 2.0.0. It discusses the growth of the Angular community from 1.5 million users in October 2015 to 1.2 million users in September 2016 for Angular 1 and 623k users for Angular 2 in September 2016. It also outlines Angular's major release cycle and provides an overview of the core features and extensions of the Angular framework.
This presentation slide describe basic understanding of Dependency Injection(DI) as well as why it is needed. Main purposes of the presentation slide are to explain the basic things of Dagger2 and annotation of Dagger2. This presentation slide is beneficial for all kinds of android developer from beginner to expert.
Architecting your GWT applications with GWT-Platform - Lesson 02rhemsolutions
This document discusses architecting a GWT application with the GWT-Platform framework. It recommends using a Model-View-Presenter architecture and describes some MVP frameworks for GWT including gwt-platform. It provides an overview of how to structure an app with GWT-Platform and GXT3 including using places, tokens, presenters and dependency injection with GIN. It also covers styling the app with ClientBundle and includes sample code for creating a default presenter.
This presentation is about Dependency Injection using dagger2 in Android. I highly hope these slides would help you to understand dagger2.
Also, I provide a sample dagger2 repo. So if you want to add dagger2 in your project feel free to use this repo:
https://github.com/javadhme/dagger-master-project
One more thing, If these assets help you to understand dagger2 do not forget to star my github repo.
This document summarizes a presentation given by Ken Sipe on Gradle. It begins with an introduction of Ken Sipe and his background. It then provides an overview of existing Java build tools like Ant, Maven, and Ant with Ivy. It describes some shortcomings of Ant and Maven and introduces Gradle as a build tool built on Ant and Ivy but using Groovy as a build DSL. The document outlines key functionality of a build system and shows examples of simple Gradle build files. It discusses additional Gradle features like tasks, dependencies, plugins, and customization options.
This document provides an overview of EzSMS, a simple SMS gateway application for Android built using Ruby. It discusses why SMS is a useful communication method, introduces some key aspects of building Android applications like activities and intents, and provides a high-level look at how Ruboto allows Ruby scripts to be packaged and run as Android applications by mapping the underlying Android APIs. It also shares some limitations of using JRuby and Ruboto on Android.
This document provides a summary of dependency injection and Dagger 2 in Android applications. It explains that dependency injection separates configuration from usage to improve maintainability, testability and reduce coupling. It describes how Dagger generates code to inject dependencies using annotations and component and module definitions. Modules provide dependencies while components inject them into classes. Scopes like per activity are supported. Overall Dagger improves architecture by managing object creation and dependencies through compile time verification rather than runtime errors.
At Lia Infraservice we create Dynamic Websites. Become a front-end React JS developer and be a part of our tech-savvy Web App Development Company in Chennai.
Esta charla comprende las lecciones aprendidas convirtiendo la app de Android de Teambox (una app repleta de deuda técnica y con un alto nivel de acoplamiento entre clases), en la versión actual de Redbooth, que intenta cumplir la arquitectura Hexagonal y los principios SOLID. Durante la exposición explicaremos como fuimos desenredando el código paso a paso; como aplicamos por partes los conceptos de la arquitectura hexagonal; como dejamos de lado componentes del framework de Android que dificultaban el mantenimiento de la app; y que errores cometimos, como los solucionamos y como se podrían haber evitado.
Basic Concepts towards understanding of Dagger-2 in android.
Native android development made easy by google dagger libraries. Easy way to understand basic concepts of Dagger and android mobile app development libraries.
The document discusses React Native and how it can be used with Swift. It provides an overview of React Native, explaining what it is and how it allows building native mobile apps using React. It then demonstrates how to create a basic React Native app, integrate it with Swift code to call Swift functions from React Native and pass data from Swift to React Native. This is shown through examples of a registration view app and a contacts list app that retrieves contact data from Swift.
GITS Class #20: Building A Fast and Responsive UI in React NativeGITS Indonesia
Pada Desember 2019, berlangsung GITS Class #20, seminar gratis dan terbuka untuk umum, di kantor GITS Indonesia. Topik, salah satu iOS developer di GITS Indonesia membawakan materi yang lebih general tak hanya untuk pemograman iOS, yakni mengenai React Native.
Follow akun GITS Indonesia untuk mendapatkan info terkait event seru selanjutnya!
Instagram: @gitsindonesia
Twitter: @gitsindonesia
Facebook: GITS Indonesia
Medium: GITS Apps Insight
YouTube: GITS Indonesia
LinkedIn: GITS Indonesia
Website: https://gits.id/
Architecting Single Activity Applications (With or Without Fragments)Gabor Varadi
Presentation by Gabor Varadi (@zhuinden)
What Activity and Fragment actually are in Android
What are the problems they solve, and what are their downsides
How to use a custom solution that simplifies navigation in Android applications
https://github.com/Zhuinden/navigation-example
Presentation on design pattern software project lll Uchiha Shahin
We have prepared a presentation on design pattern. Here are 7 types of design pattern we have presented.
1. Mediator Design
2. Iterator Pattern
3. Bridge Pattern
4. Decorator Pattern
5. Composite Pattern
6. Template Pattern
7. Singleton Pattern
Here is the link of Canva Slide to use as template----
https://www.canva.com/design/DAEmun8Sjks/NmH08MOYrAWSaTERNbe5LA/view?utm_content=DAEmun8Sjks&utm_campaign=designshare&utm_medium=link&utm_source=sharebutton&mode=preview
You can contact me in LinkedIn or any other social platform for more infromation.
Thank you.
This document provides an overview of React Native, Redux, and ES6 concepts. It begins with an introduction to React Native fundamentals like components, props vs state, and styling. It then covers Redux terminology such as actions, reducers, and middleware. Finally, it discusses ES6 features like arrow functions, destructuring, and template literals. Code examples and links to documentation are provided throughout for illustrating key concepts.
The document discusses Meteor's Tracker package, which enables reactive programming in Meteor applications. Tracker uses an observer-like pattern to transparently track dependencies between reactive data sources and computations. When a data source changes, Tracker reruns any dependent computations to update the UI or other data reactively. Key aspects of how Tracker works include creating Dependency objects for reactive data, tracking the "current computation", and rerunning computations through Dependency's depend() and changed() methods. Tracker provides a powerful yet simple way to build reactive applications in Meteor without needing expertise in functional reactive programming.
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...LogeekNightUkraine
This document provides an overview and code examples for integrating Java and Swift applications with SmartDeviceLink (SDL) to create applications for automotive head units. It begins with an introduction to SDL and then has separate sections on SDL integrations using Java and Swift. For Java, it covers setting up the SDL service and manager, listening for RPC notifications and events. For Swift, it discusses the proxy manager, lifecycle configuration including application icon and type, and implementing the proxy class including starting the SDL manager.
The document discusses Android activities and fragments. It defines an activity as representing a single screen with a user interface. It notes that an app may have multiple activities for different screens like email lists, compose, and read. It then discusses the activity lifecycle and callbacks like onCreate(), onStart(), onResume(), etc. It provides an example logging the lifecycle. It defines a fragment as a modular piece of UI/behavior that can be placed in an activity. It discusses combining fragments in different configurations for tablets vs phones. It also covers the fragment lifecycle and provides an example creating two fragments for landscape and portrait orientations.
The document discusses Android activities and fragments. It defines an activity as representing a single screen with a user interface. It notes that an app may have multiple activities for different screens like email lists, compose, and read. It then discusses the activity lifecycle and callbacks like onCreate, onStart, onResume, etc. It provides an example to log the lifecycle methods.
The document then defines a fragment as a modular section of an activity, like a sub-activity, that has its own layout and lifecycle. It notes fragments allow dividing the screen between different parts. It provides an example of how two fragments could be used together in landscape mode but separated in portrait mode. It discusses the fragment lifecycle callbacks as
The document discusses activities and fragments in Android. It defines an activity as representing a single screen with a user interface. Activities have a lifecycle defined by callback methods like onCreate(), onStart(), onResume(), etc. Fragments allow dividing the UI of an activity and are like sub-activities with their own layout and lifecycle. Fragments were introduced later than activities to allow multiple modular UI components within a single activity.
The document discusses Android activities and fragments. It defines an activity as representing a single screen with a user interface. It notes that an app may have multiple activities for different screens like email lists, compose, and read. It then discusses the activity lifecycle and callbacks like onCreate(), onStart(), onResume(), etc. It provides an example logging the lifecycle. It defines a fragment as a modular piece of UI/behavior that can be placed in an activity. It discusses combining fragments in different configurations for tablets vs phones. It also covers the fragment lifecycle and provides an example creating two fragments for landscape and portrait orientations.
How To Integrate Native Android App With React Native.Techugo
The popularity of React Native Technology cannot be contained. The growing inclination of the app industry towards this cross-platform technology has triggered the curiosity of many domains. Therefore, we need to learn more about related development concepts. So today, let us learn the way to integrate Native Android App with React Native!
React Native mobile app development is emerging out to be an exciting opportunity for businesses. It not only offers pocket-friendly choices, but it also reduces the development time. If you want to upheave your revenue funnel then connect with our experienced professionals who can guide you in the right direction.
Similar to Building android apps with MVP, Dagger, Retrofit, Gson, JSON, Kotlin Data Classes and RecyclerView using kotlin (20)
Temple of Asclepius in Thrace. Excavation resultsKrassimira Luka
The temple and the sanctuary around were dedicated to Asklepios Zmidrenus. This name has been known since 1875 when an inscription dedicated to him was discovered in Rome. The inscription is dated in 227 AD and was left by soldiers originating from the city of Philippopolis (modern Plovdiv).
This presentation was provided by Racquel Jemison, Ph.D., Christina MacLaughlin, Ph.D., and Paulomi Majumder. Ph.D., all of the American Chemical Society, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
3. WE WILL COVER ALL CONTENTS
IN THIS SEQUENCE-1
W h y u s e M V P D e s i g n P a t t e r n i n A n d r o i d .
H o w t o s t r u c t u r e A n d r o i d p r o j e c t f o r
i m p l e m e n t i n g M V P i n A n d r o i d a p p s u s i n g K o t l i n .
W h y w e n e e d D e p e n d e n c y I n j e c t i o n ( D I ) i n
A n d r o i d .
I n t r o t o D a g g e r 2 ( D I ) l i b r a r y i n A n d r o i d .
4. WE WILL COVER ALL CONTENTS
IN THIS SEQUENCE-2
S e t u p D a g g e r a n d R e t r o f i t G r a d l e d e p e n d e n c i e s .
I m p l e m e n t i n g D a g g e r 2 i n A n d r o i d u s i n g K o t l i n .
I m p l e m e n t i n g R e t r o f i t i n A n d r o i d u s i n g K o t l i n .
I m p l e m e n t i n g R e c y c l e r V i e w i n K o t l i n .
5. WWW.DEVELOPINE.COM
O R I G I N A L F U L L A R T I C L E C A N A L S O B E F O U N D O N
O U R B L O G :
h t t p : / / d e v e l o p i n e . c o m / b u i l d i n g - a n d r o i d - m v p - a p p - i n -
k o t l i n - u s i n g - d a g g e r - r e t r o f i t /
6. WHY NEED MVP DESIGN
PATTERN IN ANDROID
MVP (MODEL-VIEW-PRESENTER) in Android is used
to manage code in an efficient way.
MVP in Android facilitate separation of concern
and help to implement unit tests in Android
without Views.
7. THE MODEL LAYER
The Model layer is used to provide data to the
presenter, so presenter can pass it to view layer
for displaying data on UI.
Only Presenter can interact with Model, View
cannot directly communicate with Model.
Model is usually a Data Manager. It has to decide
or act to get data from API (Network), Shared
Preferences or SQlite database.
8. THE VIEW LAYER
Any Java or Kotlin class in Android app which can
make changes in UI comes under View.
Activities/Fragments/ Adapters/ Custom Views
are all Views in Kotlin.
Any user interaction on View layer e.g Button
click should be passed to the presenter.
The presenter will decide what action to
perfrom.
9. THE PRESENTER LAYER
The presenter is the middle man between view
and model.
View will only interact with presenter by calling
its functions.
Presenter is responsible to get data, perform any
operation on data like JSON parsing / cache data
and inform/update View by callings its functions
10. PROJECT PACKAGES
STRUCTURE FOR IMPLEMENTING
MVP AND DAGGER IN ANDROID-1
<< Create following packages in your Android App. >>
data- (Add POJO/ DATA CLASSES in this package)
network- (Add API EndPoints , Retrofit Request Response
Interface in this package)
utils- (any utility classes or functions)
11. PROJECT PACKAGES
STRUCTURE FOR IMPLEMENTING
MVP AND DAGGER IN ANDROID-2
<< Create following packages in your Android App. >>
ui (Activities/Fragments)
service (Any service classes e.g Push Notification Handling)
di (Dependency Injection / Dagger2 Code will go here)
12. IMPLEMENTING MVP IN ANDROID
USING KOTLIN-1
We will Create new Activity PostActivity.kt in our Android
project inside ui package.
Which will make API call using Retrofit and show JSON
Response in RecyclerView using Kotlin.
PostActivity.kt is our View.
I will show you how View interacts with Model and Presenter
in MVP (Model-View-Presenter).
13. IMPLEMENTING MVP IN ANDROID
USING KOTLIN-2
Create PostView.kt Interface.
Create PostPresenter.kt Interface.
Create Presenter Implementation class PostPresenterImpl.kt
PostPresenterImpl.kt will implement interface
PostPresesnter.kt
14. IMPLEMENTING MVP IN ANDROID
USING KOTLIN-3
PostActivity.kt will have reference to the
PostPresenterImpl.kt class.
PostActivity.kt will implement PostView.kt
15. VIEW INTERFACE POSTVIEW.KT
//Presenter will call this method after getting list of posts from API.
// And will pass it List of Posts for displaying in RecyclerView.
interface PostView {
fun showAllPosts(postList: List<PostData>)
}
16. PRESENTER INTERFACE
POSTPRESENTER.KT
- View will call this method from presenter.
- This method will load all posts from API using Retrofit2 and will send
response to the View by callings its method showAllPosts(lists) and will
pass list of posts for populating in RecyclerView using Kotlin.
interface PostPresenter {
fun getAllPosts()
}
17. POSTACTIVITY.KT
class PostActivity : AppCompatActivity(), PostView {
lateinit var postPresenter: PostPresenter
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_post)
postPresenter = PostPresenterImpl(this, application)
postPresenter.getAllPosts()
}
override fun showAllPosts(postList: List<PostData>) {
// showing this postList in RecyclerView code will be here.
rv_post_list.layoutManager = LinearLayoutManager(this)
rv_post_list.adapter = PostItemAdapter(postList, this)
} }
19. POST PRESENTER
IMPLEMENTATION CLASS-1
PostPresenterImpl.kt is responsible to make API call.
Fetch list of posts using Retrofit Network Client.
Return list of posts to the PostActivity.kt. so PostActivity.kt
can display posts in RecyclerView using Kotlin.
I will be using dagger2 annotations in this class. we will
shortly cover Dependency Injection using Dagger2 in kotlin.
20. POST PRESENTER
IMPLEMENTATION CLASS-2
class PostPresenterImpl(var postView: PostView, var applicationComponent:
Application) : PostPresenter {
@Inject
lateinit var mNetworkApi: INetworkApi
init {
(applicationComponent as ApplicationClass).applicationComponent.inject(this)
}
override fun getAllPosts() {
var allPosts = mNetworkApi.getAllPosts()
allPosts.subscribeOn(IoScheduler()).observeOn(AndroidSchedulers.mainThread())
.subscribe {
postView.showAllPosts(it)
}
}
}
21. LETS FIRST SETUP GRADLE
DEPENDENCIES FOR RETROFIT-2,
DAGGER-2 AND RECYCLERVIEW
dependencies {
implementation 'com.android.support:recyclerview-v7:27.1.1'
//retrofit_version = '2.4.0'
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.google.dagger:dagger-android:2.15'
implementation 'com.google.dagger:dagger-android-support:2.15'
// if you use the support libraries
kapt 'com.google.dagger:dagger-android-processor:2.15'
kapt 'com.google.dagger:dagger-compiler:2.15'
}
22. WHY NEED DEPENDENCY
INJECTION (DI) - 1
- Dependency Injection (DI) is a design pattern in software engineering.
- It is a mechanism of providing required dependencies/objects to other classes
which need those dependencies.
For example, You have three classes in your project. ClassA, ClassB, ClassC.
ClassC needs an object of ClassA and ClassB.
Whereas ClassB needs an object of ClassA.
23. WHY NEED DEPENDENCY
INJECTION (DI) - 2
This means ClassC depends on ClassA and ClassB. And ClassB depends on
ClassA. (One class is dependent on another class / Dependency).
Now we don’t want to create objects of ClassA and ClassB inside ClassC. We
want to provide/pass initialized objects of ClassA and ClassB to ClassC.
For this purpose, we will inject (provide) required objects (dependencies) to
ClassC.
We will be using Dagger2 Android Library (using Kotlin language) for this
purpose.
24. INTRODUCTION TO DAGGER-2 IN
ANDROID
Dagger2 is a framework which is used to provide/manage
dependencies in Android/Java.
It uses annotations.
Annotations in Dagger2 (DI):
@Provides
@Module
@Component
@Inject
25. @PROVIDES ANNOTATION IN
DAGGER2 - 1
@Provides annotation is used with methods which provide
the certain dependency.
For example below function, provideRetrofit is annotated
with @Provides (which means it will provide a dependency of
type Retrofit object).
26. @PROVIDES ANNOTATION IN
DAGGER2 - 2
// Retrofit object is available for dependency injection.
@Provides
fun provideRetrofit(gson: Gson): Retrofit {
return
Retrofit.Builder().addConverterFactory(GsonConverterFactory.create(gson))
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.baseUrl("https://jsonplaceholder.typicode.com/").build()
}
27. @MODULE ANNOTATION IN
DAGGER2
- As mentioned earlier, We define methods in Module classes.
- We annotate module classes with @module annotation.
- And those methods provide the dependency.
A Module class is annotated with @Module annotation.
And it can provide an object/dependencies to the component class
throgu functions annotated with @Provides.
28. @COMPONENT ANNOTATION IN
DAGGER2 - 1
A component is an Interface which is annotated with @Component
annotation.
It has all modules from which it can get dependencies and provide
those dependencies where required.
A component knows from where it can get dependencies (from which
modules).
And where it has to provide dependencies.
29. @COMPONENT ANNOTATION IN
DAGGER2 - 1
// NetModule is class which is annotated with @Module annotation.
// NetModule class has functions annotated with @Provides (which return
dependency objects)
@Component(modules = [NetModule::class])
interface ApplicationComponent {
// this means ApplicationComponent has to provide/inject
// required dependencies in LoginPresenterImpl class.
fun inject(mLoginPresenterImpl: LoginPresenterImpl)
}
30. CONCLUSION
We have learned about MVP (Model-View-Presenter) in Android.
We have learned how to architect our Android apps to achieve MVP in
Android using Kotlin.
We have learned about Dagger2 in Android using Kotlin.
We have learned how to provide Retrofit Dependecies using Dagger2
in Android (Kotlin).
To Access full article on Android MVP Dagger Retrofit RecyclerView
using Kotlin visit:
http://developine.com/building-android-mvp-app-in-kotlin-using-dagger-
retrofit/