SlideShare a Scribd company logo
1 of 11
Download to read offline
Write => Cleaner, Maintainable & Testable{ Code } in Android with Model View View-Model (MVVM) YOW Connected 2014Adil MughalSenior Developer @ Nintex
What to Expect Today? 
•What you must already know? 
–Android Development 
–Knowledge of patterns like MVC, MVP, MVVM 
•What you will see? 
–How to implement MVVM in Android 
–HOW than WHY 
•RoboBinding 
•Java PropertyChangeListeners
The App
Traditional Way
The Challenges 
•Complex Activities 
–UI Logic 
–GUI Widgets contains state of UI 
–Communication with outside world 
•Poor Testability 
–Testing UI state and Behavior becomes challenging
The MVVM Way
MVVM Quick Intro 
Model 
ViewModel 
View 
Data-Binding 
Listeners 
XML + Activity 
Presentation Logic 
Business/Data 
The objective here is to pull out the state and behavior of the view into a class 
-State + Behavior 
-Interaction with Business/External 
-Maps ViewModelto actual UI widgets
The MVVM Way
The Benefits 
•View is just UI 
–Activities/View will just do real UI stuff 
–Maps the state/behavior to UI Widgets 
•Improved testability 
–Having POJO ViewModelhelp testing/mocking easy 
–Easily test UI logic as simple JUnittest 
•Relatively easy to follow SOLID principles 
–Single Responsility, Dependency Injection in ViewModeletc.
Any Questions?
Questions? Thank YOU for your time and attention! 
Adil Ahmed Mughal 
@adilamughal 
http://www.adilmughal.com 
adil.mughal@live.com 
http://adilmughal.github.io/YOW2014-Android-MVVM/

More Related Content

What's hot

AngularJS – What, Why, Advantages and Disadvantages
AngularJS – What, Why, Advantages and DisadvantagesAngularJS – What, Why, Advantages and Disadvantages
AngularJS – What, Why, Advantages and Disadvantageskarenmsmith0504
 
How do you get your idea into the app store?
How do you get your idea into the app store?How do you get your idea into the app store?
How do you get your idea into the app store?Gabe Kwakyi
 
Introduction To Model View Presenter
Introduction To Model View PresenterIntroduction To Model View Presenter
Introduction To Model View Presentersaeed shargi ghazani
 
MVVM in iOS presentation
MVVM in iOS presentationMVVM in iOS presentation
MVVM in iOS presentationG ABHISEK
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnetrainynovember12
 
Ecommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingEcommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingHemant Sarthak
 
Automation Testing Using WebDriver
Automation Testing Using WebDriverAutomation Testing Using WebDriver
Automation Testing Using WebDriverEvozon Test Lab
 
Angular js training institute
Angular js training instituteAngular js training institute
Angular js training institutenihalsingh113
 
9 reasons why angular js web development should be your choice in 2020
9 reasons why angular js web development should be your choice in 20209 reasons why angular js web development should be your choice in 2020
9 reasons why angular js web development should be your choice in 2020Biztech Consulting & Solutions
 
Automated Unit Testing in Silverlight for Windows Phone 7
Automated Unit Testing in Silverlight for Windows Phone 7Automated Unit Testing in Silverlight for Windows Phone 7
Automated Unit Testing in Silverlight for Windows Phone 7Jacinto Limjap
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsNish Anil
 
Creating MVC Application with backbone js
Creating MVC Application with backbone jsCreating MVC Application with backbone js
Creating MVC Application with backbone jsMindfire Solutions
 
Live Cycle ES2 News From Adobe MAX
Live Cycle ES2 News From Adobe MAXLive Cycle ES2 News From Adobe MAX
Live Cycle ES2 News From Adobe MAXMatthias Zeller
 
Test automation, agile testing; dev ops summit hyderabad Bdd with cucumber
Test automation, agile testing; dev ops summit hyderabad Bdd with cucumberTest automation, agile testing; dev ops summit hyderabad Bdd with cucumber
Test automation, agile testing; dev ops summit hyderabad Bdd with cucumberDharmender Srivastav
 
Initiation to AngularJS
Initiation to AngularJSInitiation to AngularJS
Initiation to AngularJSAhmed Elmehri
 

What's hot (20)

AngularJS – What, Why, Advantages and Disadvantages
AngularJS – What, Why, Advantages and DisadvantagesAngularJS – What, Why, Advantages and Disadvantages
AngularJS – What, Why, Advantages and Disadvantages
 
Angular 5,6,7
Angular 5,6,7Angular 5,6,7
Angular 5,6,7
 
How do you get your idea into the app store?
How do you get your idea into the app store?How do you get your idea into the app store?
How do you get your idea into the app store?
 
Introduction To Model View Presenter
Introduction To Model View PresenterIntroduction To Model View Presenter
Introduction To Model View Presenter
 
Angularjs 5,6,7
Angularjs 5,6,7Angularjs 5,6,7
Angularjs 5,6,7
 
MVVM in iOS presentation
MVVM in iOS presentationMVVM in iOS presentation
MVVM in iOS presentation
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnet
 
Ecommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingEcommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project Coding
 
Automation Testing Using WebDriver
Automation Testing Using WebDriverAutomation Testing Using WebDriver
Automation Testing Using WebDriver
 
Angular js training institute
Angular js training instituteAngular js training institute
Angular js training institute
 
Mvp pattern
Mvp patternMvp pattern
Mvp pattern
 
Angular Js
Angular JsAngular Js
Angular Js
 
No brainer
No brainerNo brainer
No brainer
 
9 reasons why angular js web development should be your choice in 2020
9 reasons why angular js web development should be your choice in 20209 reasons why angular js web development should be your choice in 2020
9 reasons why angular js web development should be your choice in 2020
 
Automated Unit Testing in Silverlight for Windows Phone 7
Automated Unit Testing in Silverlight for Windows Phone 7Automated Unit Testing in Silverlight for Windows Phone 7
Automated Unit Testing in Silverlight for Windows Phone 7
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with Knockoutjs
 
Creating MVC Application with backbone js
Creating MVC Application with backbone jsCreating MVC Application with backbone js
Creating MVC Application with backbone js
 
Live Cycle ES2 News From Adobe MAX
Live Cycle ES2 News From Adobe MAXLive Cycle ES2 News From Adobe MAX
Live Cycle ES2 News From Adobe MAX
 
Test automation, agile testing; dev ops summit hyderabad Bdd with cucumber
Test automation, agile testing; dev ops summit hyderabad Bdd with cucumberTest automation, agile testing; dev ops summit hyderabad Bdd with cucumber
Test automation, agile testing; dev ops summit hyderabad Bdd with cucumber
 
Initiation to AngularJS
Initiation to AngularJSInitiation to AngularJS
Initiation to AngularJS
 

Viewers also liked

Quality Assurance in SDLC
Quality Assurance in SDLCQuality Assurance in SDLC
Quality Assurance in SDLCAdil Mughal
 
20 Game Ideas You Should Steal
20 Game Ideas You Should Steal20 Game Ideas You Should Steal
20 Game Ideas You Should StealStuart Dredge
 
More Android UIs
More Android UIsMore Android UIs
More Android UIsDENNIS JUNG
 
Android Code Puzzles (DroidCon Amsterdam 2012)
Android Code Puzzles (DroidCon Amsterdam 2012)Android Code Puzzles (DroidCon Amsterdam 2012)
Android Code Puzzles (DroidCon Amsterdam 2012)Danny Preussler
 
Infinum Android Talks #09 - UI optimization
Infinum Android Talks #09 - UI optimization Infinum Android Talks #09 - UI optimization
Infinum Android Talks #09 - UI optimization Infinum
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesAndroid UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesMarakana Inc.
 
Tech Talk #2: Android app performance tips
Tech Talk #2: Android app performance tipsTech Talk #2: Android app performance tips
Tech Talk #2: Android app performance tipsNexus FrontierTech
 
7 stages of unit testing
7 stages of unit testing7 stages of unit testing
7 stages of unit testingJorge Ortiz
 
Mastering RecyclerView Layouts
Mastering RecyclerView LayoutsMastering RecyclerView Layouts
Mastering RecyclerView LayoutsDave Smith
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
 
Windows 7 For Geeks
Windows 7 For GeeksWindows 7 For Geeks
Windows 7 For GeeksAdil Mughal
 
Community Contribution Experience
Community Contribution ExperienceCommunity Contribution Experience
Community Contribution ExperienceAdil Mughal
 
What's New in Visual Studio 2010
What's New in Visual Studio 2010What's New in Visual Studio 2010
What's New in Visual Studio 2010Adil Mughal
 
Testable Android Apps DroidCon Italy 2015
Testable Android Apps DroidCon Italy 2015Testable Android Apps DroidCon Italy 2015
Testable Android Apps DroidCon Italy 2015Fabio Collini
 
Android Wear CodeLab - GDG Firenze
Android Wear CodeLab - GDG FirenzeAndroid Wear CodeLab - GDG Firenze
Android Wear CodeLab - GDG FirenzeFabio Collini
 
Testable Android Apps using data binding and MVVM
Testable Android Apps using data binding and MVVMTestable Android Apps using data binding and MVVM
Testable Android Apps using data binding and MVVMFabio Collini
 
Introduction to Retrofit and RxJava
Introduction to Retrofit and RxJavaIntroduction to Retrofit and RxJava
Introduction to Retrofit and RxJavaFabio Collini
 
Android Data Binding in action using MVVM pattern - droidconUK
Android Data Binding in action using MVVM pattern - droidconUKAndroid Data Binding in action using MVVM pattern - droidconUK
Android Data Binding in action using MVVM pattern - droidconUKFabio Collini
 
Data Binding in Action using MVVM pattern
Data Binding in Action using MVVM patternData Binding in Action using MVVM pattern
Data Binding in Action using MVVM patternFabio Collini
 

Viewers also liked (20)

Quality Assurance in SDLC
Quality Assurance in SDLCQuality Assurance in SDLC
Quality Assurance in SDLC
 
20 Game Ideas You Should Steal
20 Game Ideas You Should Steal20 Game Ideas You Should Steal
20 Game Ideas You Should Steal
 
More Android UIs
More Android UIsMore Android UIs
More Android UIs
 
Android Code Puzzles (DroidCon Amsterdam 2012)
Android Code Puzzles (DroidCon Amsterdam 2012)Android Code Puzzles (DroidCon Amsterdam 2012)
Android Code Puzzles (DroidCon Amsterdam 2012)
 
Infinum Android Talks #09 - UI optimization
Infinum Android Talks #09 - UI optimization Infinum Android Talks #09 - UI optimization
Infinum Android Talks #09 - UI optimization
 
Android UI Tips, Tricks and Techniques
Android UI Tips, Tricks and TechniquesAndroid UI Tips, Tricks and Techniques
Android UI Tips, Tricks and Techniques
 
Tech Talk #2: Android app performance tips
Tech Talk #2: Android app performance tipsTech Talk #2: Android app performance tips
Tech Talk #2: Android app performance tips
 
7 stages of unit testing
7 stages of unit testing7 stages of unit testing
7 stages of unit testing
 
Recyclerview in action
Recyclerview in action Recyclerview in action
Recyclerview in action
 
Mastering RecyclerView Layouts
Mastering RecyclerView LayoutsMastering RecyclerView Layouts
Mastering RecyclerView Layouts
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
Windows 7 For Geeks
Windows 7 For GeeksWindows 7 For Geeks
Windows 7 For Geeks
 
Community Contribution Experience
Community Contribution ExperienceCommunity Contribution Experience
Community Contribution Experience
 
What's New in Visual Studio 2010
What's New in Visual Studio 2010What's New in Visual Studio 2010
What's New in Visual Studio 2010
 
Testable Android Apps DroidCon Italy 2015
Testable Android Apps DroidCon Italy 2015Testable Android Apps DroidCon Italy 2015
Testable Android Apps DroidCon Italy 2015
 
Android Wear CodeLab - GDG Firenze
Android Wear CodeLab - GDG FirenzeAndroid Wear CodeLab - GDG Firenze
Android Wear CodeLab - GDG Firenze
 
Testable Android Apps using data binding and MVVM
Testable Android Apps using data binding and MVVMTestable Android Apps using data binding and MVVM
Testable Android Apps using data binding and MVVM
 
Introduction to Retrofit and RxJava
Introduction to Retrofit and RxJavaIntroduction to Retrofit and RxJava
Introduction to Retrofit and RxJava
 
Android Data Binding in action using MVVM pattern - droidconUK
Android Data Binding in action using MVVM pattern - droidconUKAndroid Data Binding in action using MVVM pattern - droidconUK
Android Data Binding in action using MVVM pattern - droidconUK
 
Data Binding in Action using MVVM pattern
Data Binding in Action using MVVM patternData Binding in Action using MVVM pattern
Data Binding in Action using MVVM pattern
 

Similar to Write cleaner, maintainable, and testable code in Android with MVVM

"iOS: MVVMC" - Aleksandr Nikolajev from Mooncascade
"iOS: MVVMC" - Aleksandr Nikolajev from Mooncascade"iOS: MVVMC" - Aleksandr Nikolajev from Mooncascade
"iOS: MVVMC" - Aleksandr Nikolajev from MooncascadeMobileMonday Estonia
 
MVVM with DataBinding on android
MVVM with DataBinding on androidMVVM with DataBinding on android
MVVM with DataBinding on androidRodrigo Bressan
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - IntroductionSagar Acharya
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVMBoulos Dib
 
MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )Ahmed Emad
 
A Smooth Transition to HTML5
A Smooth Transition to HTML5A Smooth Transition to HTML5
A Smooth Transition to HTML5Chris Bannon
 
Model View Presenter
Model View Presenter Model View Presenter
Model View Presenter rendra toro
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMChris Bannon
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMAndrei Popa
 
Rendra Toro - Model View Presenter
Rendra Toro - Model View PresenterRendra Toro - Model View Presenter
Rendra Toro - Model View PresenterDicoding
 
Angularjs y Simple Page Applications
Angularjs y Simple Page Applications Angularjs y Simple Page Applications
Angularjs y Simple Page Applications johnpisg
 
Good bye Massive View Controller!
Good bye Massive View Controller!Good bye Massive View Controller!
Good bye Massive View Controller!Supercharge
 

Similar to Write cleaner, maintainable, and testable code in Android with MVVM (20)

"iOS: MVVMC" - Aleksandr Nikolajev from Mooncascade
"iOS: MVVMC" - Aleksandr Nikolajev from Mooncascade"iOS: MVVMC" - Aleksandr Nikolajev from Mooncascade
"iOS: MVVMC" - Aleksandr Nikolajev from Mooncascade
 
Adopting MVVM
Adopting MVVMAdopting MVVM
Adopting MVVM
 
MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
 
Knockout js
Knockout jsKnockout js
Knockout js
 
MVVM with DataBinding on android
MVVM with DataBinding on androidMVVM with DataBinding on android
MVVM with DataBinding on android
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVM
 
Mvvm
MvvmMvvm
Mvvm
 
MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )MVVM ( Model View ViewModel )
MVVM ( Model View ViewModel )
 
A Smooth Transition to HTML5
A Smooth Transition to HTML5A Smooth Transition to HTML5
A Smooth Transition to HTML5
 
Model View Presenter
Model View Presenter Model View Presenter
Model View Presenter
 
Ramesh Elangovan
Ramesh ElangovanRamesh Elangovan
Ramesh Elangovan
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVM
 
Models used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVMModels used in iOS programming, with a focus on MVVM
Models used in iOS programming, with a focus on MVVM
 
Rendra Toro - Model View Presenter
Rendra Toro - Model View PresenterRendra Toro - Model View Presenter
Rendra Toro - Model View Presenter
 
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
 
Angularjs y Simple Page Applications
Angularjs y Simple Page Applications Angularjs y Simple Page Applications
Angularjs y Simple Page Applications
 
Good bye Massive View Controller!
Good bye Massive View Controller!Good bye Massive View Controller!
Good bye Massive View Controller!
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 

Recently uploaded

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 

Recently uploaded (20)

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 

Write cleaner, maintainable, and testable code in Android with MVVM

  • 1. Write => Cleaner, Maintainable & Testable{ Code } in Android with Model View View-Model (MVVM) YOW Connected 2014Adil MughalSenior Developer @ Nintex
  • 2. What to Expect Today? •What you must already know? –Android Development –Knowledge of patterns like MVC, MVP, MVVM •What you will see? –How to implement MVVM in Android –HOW than WHY •RoboBinding •Java PropertyChangeListeners
  • 5. The Challenges •Complex Activities –UI Logic –GUI Widgets contains state of UI –Communication with outside world •Poor Testability –Testing UI state and Behavior becomes challenging
  • 7. MVVM Quick Intro Model ViewModel View Data-Binding Listeners XML + Activity Presentation Logic Business/Data The objective here is to pull out the state and behavior of the view into a class -State + Behavior -Interaction with Business/External -Maps ViewModelto actual UI widgets
  • 9. The Benefits •View is just UI –Activities/View will just do real UI stuff –Maps the state/behavior to UI Widgets •Improved testability –Having POJO ViewModelhelp testing/mocking easy –Easily test UI logic as simple JUnittest •Relatively easy to follow SOLID principles –Single Responsility, Dependency Injection in ViewModeletc.
  • 11. Questions? Thank YOU for your time and attention! Adil Ahmed Mughal @adilamughal http://www.adilmughal.com adil.mughal@live.com http://adilmughal.github.io/YOW2014-Android-MVVM/