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
Using View Models for simpler UI
Search
DAloG
September 07, 2016
Programming
1
320
Using View Models for simpler UI
DAloG
September 07, 2016
Tweet
Share
More Decks by DAloG
See All by DAloG
State normalization (RU)
dalog
0
160
Redux + MQTT
dalog
1
750
От задач к проблемам
dalog
1
210
Unlimited power of Data-Driven UI
dalog
4
600
Data-Driven View Controllers. Tips and Tricks
dalog
5
1.8k
2 years of Redux in iOS. Lessons learned
dalog
0
330
Why unidirectional architecture matter for iOS.
dalog
1
260
Mobile backend without REST
dalog
2
83
Self managed teams 101
dalog
0
130
Other Decks in Programming
See All in Programming
Tuning GraphQL on Rails
pyama86
2
1k
Progressive Web Apps für Desktop und Mobile mit Angular (Hands-on)
christianliebel
PRO
0
110
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.5k
役立つログに取り組もう
irof
26
8.7k
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
410
CSC509 Lecture 09
javiergs
PRO
0
110
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
580
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.4k
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
How to Ace a Technical Interview
jacobian
275
23k
How STYLIGHT went responsive
nonsquared
95
5.2k
Ruby is Unlike a Banana
tanoku
96
11k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
The Language of Interfaces
destraynor
154
24k
Measuring & Analyzing Core Web Vitals
bluesmoon
1
40
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Speed Design
sergeychernyshev
24
570
Adopting Sorbet at Scale
ufuk
73
9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
Gamification - CAS2011
davidbonilla
80
5k
Transcript
@daloog #iosdevuk Component Driven …and modular UI code with ViewModel
Alexey Demedetskyi
@daloog #iosdevuk https://www.youtube.com/watch?v=dJUEkjxylBw
@daloog #iosdevuk Alexey Demedetskyi
[email protected]
Github Speakerdeck iOS Team lead
@ Sigma Software
@daloog #iosdevuk MVVM: 2012 - 2015 MVC: 2009 - 2011
Redux: 2015 - …
@daloog #iosdevuk MVVM
@daloog #iosdevuk How to MVVM 1. Extract ViewModel from ViewController
2. ??? 3. Good design https://sharpfivesoftware.com/2016/07/20/mvvm-is-lipstick-on-a-pig/
@daloog #iosdevuk
@daloog #iosdevuk View Models
@daloog #iosdevuk “Design is never done.”
@daloog #iosdevuk
@daloog #iosdevuk Art
@daloog #iosdevuk Art Engineering
@daloog #iosdevuk
@daloog #iosdevuk Feedback loop
@daloog #iosdevuk Definition of done
@daloog #iosdevuk Better tools
@daloog #iosdevuk Better result
@daloog #iosdevuk Art Engineering UI - ?
@daloog #iosdevuk Art Engineering UI
@daloog #iosdevuk UI is the hardest CS problem
@daloog #iosdevuk
@daloog #iosdevuk
@daloog #iosdevuk
@daloog #iosdevuk
@daloog #iosdevuk
@daloog #iosdevuk
@daloog #iosdevuk Zero* dependency** rule*** * - not actually zero
** - internal is ok *** - not a rule at all
@daloog #iosdevuk TDD?
@daloog #iosdevuk
@daloog #iosdevuk Singletons
@daloog #iosdevuk Dependency net ViewController Network Database DataModel Application
@daloog #iosdevuk Dependency tree ViewController Network Database DataModel Application View
@daloog #iosdevuk Parent is always responsible for child dependencies
@daloog #iosdevuk Module External dependency
@daloog #iosdevuk Module Internal dependency
@daloog #iosdevuk Module context always should be external
@daloog #iosdevuk Zero dependency UI?
@daloog #iosdevuk Component UI
@daloog #iosdevuk
@daloog #iosdevuk
@daloog #iosdevuk
@daloog #iosdevuk Action
@daloog #iosdevuk https://medium.com/swift-fox/react-native-native-28e37f7de1ae#.x3l8sip38 Native React Native
@daloog #iosdevuk VM == Props
@daloog #iosdevuk MVVM
@daloog #iosdevuk React
@daloog #iosdevuk VM + Dynamic Animations, partial updates, etc.
@daloog #iosdevuk Deposit Time
@daloog #iosdevuk Deposit Time
@daloog #iosdevuk Deposit Time + + - - -
@daloog #iosdevuk State = f(t)
@daloog #iosdevuk Event = ΔState
@daloog #iosdevuk State = ∫Event
@daloog #iosdevuk
@daloog #iosdevuk CQRS Event sourcing
@daloog #iosdevuk
@daloog #iosdevuk Data driven
@daloog #iosdevuk Data driven
@daloog #iosdevuk VM + Complexity Containers, transition
@daloog #iosdevuk https://medium.com/@dan_abramov/smart-and- dumb-components-7ca2f9a7c7d0#.62d4jggzw
@daloog #iosdevuk FriendsList VC Friend VC FriendsList VM Friend VM
@daloog #iosdevuk
@daloog #iosdevuk
@daloog #iosdevuk Shared state
@daloog #iosdevuk http://redux.js.org
@daloog #iosdevuk ReSwift https://github.com/ReSwift/ReSwift
@daloog #iosdevuk P == NP ?
[email protected]
@daloog #iosdevuk Questions?
[email protected]