Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Using MVVM with Android Data-Binding
Search
Quan Vu
November 07, 2015
Programming
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Using MVVM with Android Data-Binding
Repo demo:
https://github.com/nongdenchet/android-data-binding
Quan Vu
November 07, 2015
Other Decks in Programming
See All in Programming
APNsからLive Activityを開始する話
yumnumm
0
170
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
280
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
620
残高管理から台帳サービスへの進化
artoy
1
200
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.1k
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
300
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
170
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
JIS keyboard support in Omarchy
lef237
0
130
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
180
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
630
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
400
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
330
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
How to make the Groovebox
asonas
2
2.5k
How to Ace a Technical Interview
jacobian
280
24k
Abbi's Birthday
coloredviolet
4
10k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Transcript
MVVM with Test Android Meetup Saigon, 07-11-2015
Vũ Huy Quân (Rain Vu) • Member of APIDEZ •
I am a developer for 2 years /nongdenchet (Quan Vu)
[email protected]
MVVM with Test 1. Model - View - ViewModel 2.
Unit Test 3. Demo 4. Question and Answer
What is MVVM ?
View ViewModel Model Binding Notify Notify Update MVVM (Model -
View - ViewModel)
View Render the UI components. Contain view logic. Get notifications
from ViewModel. Contain binding logic.
None
None
ViewModel Have no information about View. Represent the state of
View. Contain commands. Notify View and update Model.
None
None
Model Contain business logic. Notify ViewModel. Describe how data can
be manipulated.
Advantages Separate view logic and business logic. Work independently on
each layer. Loose coupling. Easy to write unit test.
Disadvantages O v e r k i l l fo
r s i m p le application. Harder for debugging.
Unit Test with MVVM
Why need writing unit test? Reduce bugs in existing features.
Good documentation. Reduce cost of change. Improve design. Allow refactoring.
Separate concern of UI code. Fully describes state of View.
Act like POJO class. Easy to write unit test. ViewModel
Demo
Reference http:/ /stackoverflow.com/questions/67299/is-unit-testing- worth-the-effort http:/ /developer.android.com/tools/testing/index.html http:/ /msdn.microsoft.com/en-us/library/hh848246.aspx http:/ /realm.io/news/data-binding-android-boyar-mount/
http://developer.android.com/tools/data-binding/ guide.html
Question and Answer Thank you!
None