SlideShare uma empresa Scribd logo
1 de 24
Clean Architecture on Android
Benjamin / 班傑明
A real-world app
Fragment Adapter
AsyncTask
Network API client
AsyncTask
View
View
Data model
Challenge
● Hard to understand/maintain
○ The business logic is mixed in Activity/Fragment/Adapter
○ Loose cohesive, high coupled (低內聚,高耦合)
● Hard to test
○ Cannot fully test the logic in Activity/Fragment/Adapter
○ The UI testing is fragile. (Will build fail if there are content or server-side issues)
○ It costs around 30 minutes to finish our UI testing
○ It’s really frustrating and lose productivity when the tests keep failing (lots of 30+ minutes)
MVP
From: http://www.captechconsulting.com/blogs/a-mvp-approach-to-lifecycle-safe-requests-with-retrofit-20-and-rxjava
MVP - Interfaces
Program to an interface, not an implementation
MVP - View
MVP - View
MVP - Presenter
MVP - Model
● Model? NetworkAPIClient?
● Is MVP an Architecture pattern?
MVC/MVP/MVVM is NOT an Architecture
● MVP is not an architectural pattern, it’s only responsible
for the presentation layer (delivery mechanism)
The Clean Architecture
From: http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html
The Clean Architecture (conti.)
From Robert C Martin - Clean Architecture and Design https://www.youtube.com/watch?v=Nsjsiz2A9mg
Interactor - Application specific business rules
● Application specific business rules
● Use cases
● ex: Content aggregation logic for your
app’s landing page, add product to cart, ...
● Regular Java object. No android
framework dependency
Repository - Data access
● Application independent business rules
● Business object / Domain model
● Access data by network, memory cache
and disk cache, has Android framework
dependency
● ex: RestAPI, Preference, disk cache
Boundary
● No direct dependency between
framework and Interactor
● Interactor can be well tested without
framework
MVP - Presentation Layer
● Presenter: Define interfaces for all the UI
interactions [Regular Java object, no
android framework dependency]
The Clean Architecture on Android
Fragment Adapter
Network API client
View
View
Presenter Interactor RepositoryViewModel
DataCache
Response
Model
The Clean Architecture
● Independent of Frameworks
● Testable
● Allow major decisions(UI, framework, databases) to be
deferred
Android application architecture: Get ready for the next
billion! - Google I/O 2016
From https://www.youtube.com/watch?v=70WqJxymPr8
Testing
● Presentation layer
○ Expresso
● Domain layer (Use case/Interactor)
○ JUnit + mockito
● Data layer
○ Roboletric + JUnit + mockito
Prod
build flavor
Expresso + Mockito
Fragment AdapterView
View
Presenter
InjectionInteractor
Repository
Expresso + Mockito (conti.)
Mock
build flavor
Fragment AdapterView
View
Presenter
InjectionMockInteractor
Repository
Expresso + Mockito (conti.)
Reference
● Robert C Martin - Clean Architecture and Design https://www.youtube.com/watch?v=Nsjsiz2A9mg
● Architecting Android…The clean way? http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/
● Android Application Architecture. Our journey from standard Activities and AsyncTasks to a modern MVP-based architecture
powered by RxJava. https://labs.ribot.co.uk/android-application-architecture-8b6e34acda65#.zexgfy5tt
● Android Testing (Android Dev Summit 2015) https://www.youtube.com/watch?v=vdasFFfXKOY
● Android Testing Codelab https://codelabs.developers.google.com/codelabs/android-testing/index.html#0
● Advanced Android Espresso http://chiuki.github.io/advanced-android-espresso/#/

Mais conteúdo relacionado

Mais procurados

Clean architecture
Clean architectureClean architecture
Clean architecture
andbed
 
A Separation of Concerns: Clean Architecture on Android
A Separation of Concerns: Clean Architecture on AndroidA Separation of Concerns: Clean Architecture on Android
A Separation of Concerns: Clean Architecture on Android
Outware Mobile
 

Mais procurados (20)

Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
2012 the clean architecture by Uncle bob
2012 the clean architecture by Uncle bob 2012 the clean architecture by Uncle bob
2012 the clean architecture by Uncle bob
 
The Secrets of Hexagonal Architecture
The Secrets of Hexagonal ArchitectureThe Secrets of Hexagonal Architecture
The Secrets of Hexagonal Architecture
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 
Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the Domain
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_js
 
A Separation of Concerns: Clean Architecture on Android
A Separation of Concerns: Clean Architecture on AndroidA Separation of Concerns: Clean Architecture on Android
A Separation of Concerns: Clean Architecture on Android
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
SOLID Design Principles applied in Java
SOLID Design Principles applied in JavaSOLID Design Principles applied in Java
SOLID Design Principles applied in Java
 
Real Life Clean Architecture
Real Life Clean ArchitectureReal Life Clean Architecture
Real Life Clean Architecture
 
Clean Pragmatic Architecture - Avoiding a Monolith
Clean Pragmatic Architecture - Avoiding a MonolithClean Pragmatic Architecture - Avoiding a Monolith
Clean Pragmatic Architecture - Avoiding a Monolith
 
Nestjs MasterClass Slides
Nestjs MasterClass SlidesNestjs MasterClass Slides
Nestjs MasterClass Slides
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 
React + Redux Introduction
React + Redux IntroductionReact + Redux Introduction
React + Redux Introduction
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring Boot
 

Destaque

Design pattern in android
Design pattern in androidDesign pattern in android
Design pattern in android
Jay Kumarr
 
Lightning Talk - Clean Architecture and Design
Lightning Talk - Clean Architecture and DesignLightning Talk - Clean Architecture and Design
Lightning Talk - Clean Architecture and Design
Deivison Sporteman
 

Destaque (20)

Android Clean Architecture for Dummies
Android Clean Architecture for DummiesAndroid Clean Architecture for Dummies
Android Clean Architecture for Dummies
 
Design pattern in android
Design pattern in androidDesign pattern in android
Design pattern in android
 
Android cleanarchitecture
Android cleanarchitectureAndroid cleanarchitecture
Android cleanarchitecture
 
Androd rest client architecture
Androd rest client architectureAndrod rest client architecture
Androd rest client architecture
 
Lightning Talk - Clean Architecture and Design
Lightning Talk - Clean Architecture and DesignLightning Talk - Clean Architecture and Design
Lightning Talk - Clean Architecture and Design
 
Clean code in Jupyter notebooks
Clean code in Jupyter notebooksClean code in Jupyter notebooks
Clean code in Jupyter notebooks
 
Infinum Android Talks #12 - MVP design pattern for Android Apps
Infinum Android Talks #12 - MVP design pattern for Android AppsInfinum Android Talks #12 - MVP design pattern for Android Apps
Infinum Android Talks #12 - MVP design pattern for Android Apps
 
Android Architecture MVP Pattern
Android Architecture MVP Pattern Android Architecture MVP Pattern
Android Architecture MVP Pattern
 
Designing a participatory sensing game with children
Designing a participatory sensing game with childrenDesigning a participatory sensing game with children
Designing a participatory sensing game with children
 
Android advanced client architecture
Android advanced client architectureAndroid advanced client architecture
Android advanced client architecture
 
Clean Architecture in Android. UPTech TechTalk
Clean Architecture in Android. UPTech TechTalkClean Architecture in Android. UPTech TechTalk
Clean Architecture in Android. UPTech TechTalk
 
To Protect & To Serve
To Protect & To ServeTo Protect & To Serve
To Protect & To Serve
 
Choice Paralysis
Choice ParalysisChoice Paralysis
Choice Paralysis
 
Android clean architecture workshop 3h edition
Android clean architecture workshop 3h editionAndroid clean architecture workshop 3h edition
Android clean architecture workshop 3h edition
 
About Flux
About FluxAbout Flux
About Flux
 
Intro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich AndroidIntro to RxJava/RxAndroid - GDG Munich Android
Intro to RxJava/RxAndroid - GDG Munich Android
 
React.js and Flux in details
React.js and Flux in detailsReact.js and Flux in details
React.js and Flux in details
 
Android Design Principles and Popular Patterns
Android Design Principles and Popular PatternsAndroid Design Principles and Popular Patterns
Android Design Principles and Popular Patterns
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/Flux
 
Flux architecture
Flux architectureFlux architecture
Flux architecture
 

Semelhante a Clean architecture on android

WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
WSO2
 
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
dcieslak
 

Semelhante a Clean architecture on android (20)

Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
 
Alka 2.8yrs exp_resume
Alka 2.8yrs exp_resumeAlka 2.8yrs exp_resume
Alka 2.8yrs exp_resume
 
Alka 2.8yrs exp_resume
Alka 2.8yrs exp_resumeAlka 2.8yrs exp_resume
Alka 2.8yrs exp_resume
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
 
IBM Z for the Digital Enterprise - DevOps for Z
IBM Z for the Digital Enterprise - DevOps for Z IBM Z for the Digital Enterprise - DevOps for Z
IBM Z for the Digital Enterprise - DevOps for Z
 
Dev ops for z
Dev ops for z Dev ops for z
Dev ops for z
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Liferay portals in real projects
Liferay portals  in real projectsLiferay portals  in real projects
Liferay portals in real projects
 
AMC Networks Experiments Faster on the Server Side
AMC Networks Experiments Faster on the Server SideAMC Networks Experiments Faster on the Server Side
AMC Networks Experiments Faster on the Server Side
 
Stateful mock servers to the rescue on REST ecosystems
Stateful mock servers to the rescue on REST ecosystemsStateful mock servers to the rescue on REST ecosystems
Stateful mock servers to the rescue on REST ecosystems
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Software Architecture - All you need to know
Software Architecture - All you need to knowSoftware Architecture - All you need to know
Software Architecture - All you need to know
 
King Tut Architecture
King Tut ArchitectureKing Tut Architecture
King Tut Architecture
 
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
 
Cloud-Native Progressive Delivery
Cloud-Native Progressive DeliveryCloud-Native Progressive Delivery
Cloud-Native Progressive Delivery
 
Micro Front Ends for Micro Services using Oracle JET
Micro Front Ends for Micro Services using Oracle JETMicro Front Ends for Micro Services using Oracle JET
Micro Front Ends for Micro Services using Oracle JET
 
Amruth-Testing
Amruth-TestingAmruth-Testing
Amruth-Testing
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5
 

Último

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Último (20)

WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 

Clean architecture on android

  • 1. Clean Architecture on Android Benjamin / 班傑明
  • 2. A real-world app Fragment Adapter AsyncTask Network API client AsyncTask View View Data model
  • 3. Challenge ● Hard to understand/maintain ○ The business logic is mixed in Activity/Fragment/Adapter ○ Loose cohesive, high coupled (低內聚,高耦合) ● Hard to test ○ Cannot fully test the logic in Activity/Fragment/Adapter ○ The UI testing is fragile. (Will build fail if there are content or server-side issues) ○ It costs around 30 minutes to finish our UI testing ○ It’s really frustrating and lose productivity when the tests keep failing (lots of 30+ minutes)
  • 5. MVP - Interfaces Program to an interface, not an implementation
  • 9. MVP - Model ● Model? NetworkAPIClient? ● Is MVP an Architecture pattern?
  • 10. MVC/MVP/MVVM is NOT an Architecture ● MVP is not an architectural pattern, it’s only responsible for the presentation layer (delivery mechanism)
  • 11. The Clean Architecture From: http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html
  • 12. The Clean Architecture (conti.) From Robert C Martin - Clean Architecture and Design https://www.youtube.com/watch?v=Nsjsiz2A9mg
  • 13. Interactor - Application specific business rules ● Application specific business rules ● Use cases ● ex: Content aggregation logic for your app’s landing page, add product to cart, ... ● Regular Java object. No android framework dependency
  • 14. Repository - Data access ● Application independent business rules ● Business object / Domain model ● Access data by network, memory cache and disk cache, has Android framework dependency ● ex: RestAPI, Preference, disk cache
  • 15. Boundary ● No direct dependency between framework and Interactor ● Interactor can be well tested without framework
  • 16. MVP - Presentation Layer ● Presenter: Define interfaces for all the UI interactions [Regular Java object, no android framework dependency]
  • 17. The Clean Architecture on Android Fragment Adapter Network API client View View Presenter Interactor RepositoryViewModel DataCache Response Model
  • 18. The Clean Architecture ● Independent of Frameworks ● Testable ● Allow major decisions(UI, framework, databases) to be deferred
  • 19. Android application architecture: Get ready for the next billion! - Google I/O 2016 From https://www.youtube.com/watch?v=70WqJxymPr8
  • 20. Testing ● Presentation layer ○ Expresso ● Domain layer (Use case/Interactor) ○ JUnit + mockito ● Data layer ○ Roboletric + JUnit + mockito
  • 21. Prod build flavor Expresso + Mockito Fragment AdapterView View Presenter InjectionInteractor Repository
  • 22. Expresso + Mockito (conti.) Mock build flavor Fragment AdapterView View Presenter InjectionMockInteractor Repository
  • 23. Expresso + Mockito (conti.)
  • 24. Reference ● Robert C Martin - Clean Architecture and Design https://www.youtube.com/watch?v=Nsjsiz2A9mg ● Architecting Android…The clean way? http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/ ● Android Application Architecture. Our journey from standard Activities and AsyncTasks to a modern MVP-based architecture powered by RxJava. https://labs.ribot.co.uk/android-application-architecture-8b6e34acda65#.zexgfy5tt ● Android Testing (Android Dev Summit 2015) https://www.youtube.com/watch?v=vdasFFfXKOY ● Android Testing Codelab https://codelabs.developers.google.com/codelabs/android-testing/index.html#0 ● Advanced Android Espresso http://chiuki.github.io/advanced-android-espresso/#/

Notas do Editor

  1. From http://www.captechconsulting.com/blogs/a-mvp-approach-to-lifecycle-safe-requests-with-retrofit-20-and-rxjava
  2. From http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html
  3. Presenter: define interfaces for all the UI interactions [Regular Java object, no android framework dependency] Inteactor: Business logic [Regular Java object, no android framework dependency] Repository: Access data by network, memory cache and disk cache [Android framework dependency]
  4. From http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html