SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
A N D R O I D
A R C H I T E C T U R E S
MVC, MVP, MVVM
A B O U T M E
Majid Ramezanpour
majid.ramezanpour@gmail.com
I F Y O U T H I N K G O O D A R C H I T E C T U R E I S
E X P E N S I V E , T R Y B A D A R C H I T E C T U R E .
—BRIAN FOOTE AND JOSEPH YODER
M V C M V P M V V M
Model
View
Controller
Model
View
Presenter
Model
View
ViewModel
W H Y C O D E I S I N B A D
S H A P E W I T H O U T
A R C H I T E C T U R E ?
keep track of the logic
 Unit Tests coverage
difficult to debug
Maintenance
Scalability
M V C
UI changes a lot more than logic
desktop& web wanted separating UI
functionality
Model
View
Controller
Data Layer
UI Layer
Logic Layer
handling network or database
get notified of user's behavior
and update model as needed
MVC
Point of MVC was to make Model
testable
So
View & Controller
was dependent on platform
P R O B L E M
W I T H M V C ?
Testability? difficult to unit test
Modularity? model tightly coupled
to views
Maintenance? more&more code
transfers to controller and get
bloated
M V P
BREAKS CONTROLLER
Model
View
Presenter
Data Layer
UI Layer
Logic Layer
handling network or database
Controller from MVC without
any reference to Android
Activity/Fragment is part of
view + layout.xml
MVP
MVP
M V V M
ARCHITECTURE
with DataBiding
Easier Testing and Modularity
Reduce Code to Connect View + Model
Model
View
ViewModel
Data Layer
UI Layer
Logic Layer
handling network or database
Like Presenter in MVP but
can't access View directly.
Bind to Observable variables
and action exposed by
ViewModel
T H A N K S

Weitere ähnliche Inhalte

Was ist angesagt? (7)

Top 9 WordPress Links For #WPMIA - October 2013
Top 9 WordPress Links For #WPMIA - October 2013Top 9 WordPress Links For #WPMIA - October 2013
Top 9 WordPress Links For #WPMIA - October 2013
 
Mvc
MvcMvc
Mvc
 
justcode brochure
justcode brochurejustcode brochure
justcode brochure
 
Nuovo Sito Aicp - Associazione Italiana per la Cultura Previdenziale
Nuovo Sito Aicp - Associazione Italiana per la Cultura PrevidenzialeNuovo Sito Aicp - Associazione Italiana per la Cultura Previdenziale
Nuovo Sito Aicp - Associazione Italiana per la Cultura Previdenziale
 
Karumi Dojo - String Calculator Kata
Karumi Dojo - String Calculator KataKarumi Dojo - String Calculator Kata
Karumi Dojo - String Calculator Kata
 
Kata Contacts
Kata ContactsKata Contacts
Kata Contacts
 
P2
P2P2
P2
 

Ähnlich wie Android Architectures

Introduction To ASP.Net MVC
Introduction To ASP.Net MVCIntroduction To ASP.Net MVC
Introduction To ASP.Net MVC
Joe Wilson
 
Mvvm pattern
Mvvm patternMvvm pattern
Mvvm pattern
msarangam
 

Ähnlich wie Android Architectures (20)

Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
 
Building android app with mvp and kotlin
Building android app  with mvp and kotlinBuilding android app  with mvp and kotlin
Building android app with mvp and kotlin
 
MVVM presentation
MVVM presentationMVVM presentation
MVVM presentation
 
MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
 
Android architecture components
Android architecture components Android architecture components
Android architecture components
 
реалии использования Mv в i os разработке
реалии использования Mv в i os разработкереалии использования Mv в i os разработке
реалии использования Mv в i os разработке
 
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Mvc vs mvp vs mvvm  a guide on architecture presentation patternsMvc vs mvp vs mvvm  a guide on architecture presentation patterns
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
 
Introduction To ASP.Net MVC
Introduction To ASP.Net MVCIntroduction To ASP.Net MVC
Introduction To ASP.Net MVC
 
Mvvm pattern
Mvvm patternMvvm pattern
Mvvm pattern
 
Write cleaner, maintainable, and testable code in Android with MVVM
Write cleaner, maintainable, and testable code in Android with MVVMWrite cleaner, maintainable, and testable code in Android with MVVM
Write cleaner, maintainable, and testable code in Android with MVVM
 
Introduction to ASP.NET MVC 2
Introduction to ASP.NET MVC 2Introduction to ASP.NET MVC 2
Introduction to ASP.NET MVC 2
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
 
Going web native
Going web nativeGoing web native
Going web native
 
Ios models
Ios modelsIos models
Ios models
 
Mvp tech talks
Mvp tech talksMvp tech talks
Mvp tech talks
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Unboxing web with React Native
Unboxing web with React NativeUnboxing web with React Native
Unboxing web with React Native
 
Model View Presenter For Android
Model View Presenter For AndroidModel View Presenter For Android
Model View Presenter For Android
 
MVP in Android by Ratanak
MVP in Android by RatanakMVP in Android by Ratanak
MVP in Android by Ratanak
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Android Architectures

  • 1. A N D R O I D A R C H I T E C T U R E S MVC, MVP, MVVM
  • 2. A B O U T M E Majid Ramezanpour majid.ramezanpour@gmail.com
  • 3. I F Y O U T H I N K G O O D A R C H I T E C T U R E I S E X P E N S I V E , T R Y B A D A R C H I T E C T U R E . —BRIAN FOOTE AND JOSEPH YODER M V C M V P M V V M Model View Controller Model View Presenter Model View ViewModel
  • 4. W H Y C O D E I S I N B A D S H A P E W I T H O U T A R C H I T E C T U R E ? keep track of the logic  Unit Tests coverage difficult to debug Maintenance Scalability
  • 5. M V C UI changes a lot more than logic desktop& web wanted separating UI functionality
  • 6. Model View Controller Data Layer UI Layer Logic Layer handling network or database get notified of user's behavior and update model as needed
  • 7. MVC
  • 8. Point of MVC was to make Model testable So View & Controller was dependent on platform
  • 9. P R O B L E M W I T H M V C ? Testability? difficult to unit test Modularity? model tightly coupled to views Maintenance? more&more code transfers to controller and get bloated
  • 10. M V P BREAKS CONTROLLER
  • 11. Model View Presenter Data Layer UI Layer Logic Layer handling network or database Controller from MVC without any reference to Android Activity/Fragment is part of view + layout.xml
  • 12. MVP
  • 13. MVP
  • 14. M V V M ARCHITECTURE with DataBiding Easier Testing and Modularity Reduce Code to Connect View + Model
  • 15.
  • 16. Model View ViewModel Data Layer UI Layer Logic Layer handling network or database Like Presenter in MVP but can't access View directly. Bind to Observable variables and action exposed by ViewModel
  • 17.
  • 18. T H A N K S