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
Package Management Learnings from Homebrew
mikemcquaid
0
220
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
2026年 エンジニアリング自己学習法
yumechi
0
130
Data-Centric Kaggle
isax1015
2
770
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
570
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
CSC307 Lecture 07
javiergs
PRO
0
550
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
55
Everyday Curiosity
cassininazir
0
130
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
What's in a price? How to price your products and services
michaelherold
247
13k
Thoughts on Productivity
jonyablonski
74
5k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
330
Designing for Timeless Needs
cassininazir
0
130
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Mobile First: as difficult as doing things right
swwweet
225
10k
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