Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MVVM & RAC
Search
Ullrich Schäfer
April 16, 2014
Programming
1
250
MVVM & RAC
Talk given at CocoaHeads Berlin April 2014
Demo project:
https://github.com/stigi/mvvm-example
Ullrich Schäfer
April 16, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
CSC307 Lecture 08
javiergs
PRO
0
670
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
980
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
Grafana:建立系統全知視角的捷徑
blueswen
0
330
dchart: charts from deck markup
ajstarks
3
990
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
Oxlint JS plugins
kazupon
1
960
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
580
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
110
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
HDC tutorial
michielstock
1
380
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
93
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Technical Leadership for Architectural Decision Making
baasie
1
240
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.7k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Transcript
MVVM & RAC CocoaHeads BLN 2014/04
About Me! ! ! stigi " stigi # ullrich.is ||
nslog.de || .com $ ullrich@ .com
Model – View – ViewModel • But first…
Where we come from – MVC Controller Model View Notify
Update Update User Action (according to Apple)
Reality • View controllers carry application logic! • And view
controllers are part of the View! • shouldRotate, viewDidAppear, viewDidLayoutSubviews! • Views often know way to much about the model! • -[UITableViewCell configureWithObject:]! • -[PersonView initWithPerson:]
Model – View – ViewModel Model View | ViewController ViewModel
Update Notify User Actions Notify
Benefits • ViewController holds no application logic! • ViewModel does
not know views! • ViewModel can be reused and extended! • Easy UI changes! • ViewModel is testable! • Easy migration, can co-exist with M–V–C
What goes where Model View | ViewController ViewModel UIView, Nibs,!
UIViewController,! DataSources ViewModel NSManagedObject,! API Controller,! … RAC RAC
Reactive Cocoa • FRP! • React to Change! • Declarative!
• Works great with KVO
Examples • In Xcode! ! ! ! • https://github.com/stigi/mvvm-example
Take aways • You’re doing it wrong! • MVVM is
Zen, give it a try! • MVVM & MVC can co-exists
Questions? • Yes, Please?
About Me! ! ! stigi " stigi # ullrich.is ||
nslog.de || .com $ ullrich@ .com