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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
DAloG
September 07, 2016
Programming
350
1
Share
Using View Models for simpler UI
DAloG
September 07, 2016
More Decks by DAloG
See All by DAloG
State normalization (RU)
dalog
0
240
Redux + MQTT
dalog
1
820
От задач к проблемам
dalog
1
290
Unlimited power of Data-Driven UI
dalog
4
690
Data-Driven View Controllers. Tips and Tricks
dalog
5
2k
2 years of Redux in iOS. Lessons learned
dalog
0
410
Why unidirectional architecture matter for iOS.
dalog
1
330
Mobile backend without REST
dalog
2
140
Self managed teams 101
dalog
0
200
Other Decks in Programming
See All in Programming
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
180
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
210
Oxlintのカスタムルールの現況
syumai
5
800
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
2
280
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
210
誰も頼んでない機能を出荷した話
zekutax
0
150
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
Sans tests, vos agents ne sont pas fiables
nabondance
0
160
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
400
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
140
今さら聞けないCancellationToken
htkym
0
200
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
160
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
520
How to Ace a Technical Interview
jacobian
281
24k
The Curse of the Amulet
leimatthew05
1
12k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
190
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
130
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
310
Technical Leadership for Architectural Decision Making
baasie
3
380
Scaling GitHub
holman
464
140k
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]