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
Developer Experience at Heetch
Search
Jérôme Alves
April 04, 2019
Technology
53
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Developer Experience at Heetch
Jérôme Alves
April 04, 2019
Transcript
79 slides
Developer Experience
at Heetch
→ Organization → Architecture → Dependency Injection → Debugging →
Showcase Driven Development → Pull Requests
! Organization
6 devs
4 teams
Driver Engagement (2) Passenger Acquisition (1) Ride (1) Boost (1)
! Architecture
MVC
UIViewController
None
→ Managing the View → Presenting View Controllers → Supporting
Custom Transitions and Presentations → Managing Child View Controllers in a Custom Container
→ Responding to View Events → Extending the View's Safe
Area → Managing the View's Margins → Configuring the View’s Layout Behavior → Managing the Status Bar
ViewController<T>
Wraps any UIView or UIViewController
Properties to manage safe area insets, status bar style and
layout margins
ScrollViewController<T>
Wraps any UIViewController
Automatically updates contentSize using AutoLayout
VisualEffectViewController<T>
Wraps any UIViewController
Properties to manage the visual effect view
StackViewController
Arranges UIViewController children in a UIStackView
Simple and easy-to-use animation API
LayerViewController
Arranges UIViewController children as layers (think Photoshop)
Simple and easy-to-use animation API
ViewController<T> ScrollViewController<T> VisualEffectViewController<T> StackViewController LayerViewController
UIView
→ Configuring Visual Appearance → Managing the View Hierarchy →
Managing AutoLayout (Constraints, LayoutGuides, etc..) → Laying out Subviews (manually) → Drawing → Managing Gesture Recognizers
Recipe
1. Create Views 2. Assemble them 3. Subclass UIViewController only
if needed
What abut Data and Control flow?
View Models
Data → View Models → View
class ProfileHeaderView: UIView { } class ProfileContentView: UIView { }
class ProfileSummaryView: UIView { }
class ProfileViewModel { var name: Observable<String> { get } var
email: Observable<String?> { get } var rating: Observable<Double> { get } }
extension ProfileViewModel { func drive(_ view: ProfileHeaderView) { /* Binding
Rx */ } func drive(_ view: ProfileContentView) { /* Binding Rx */ } func drive(_ view: ProfileSummaryView) { /* Binding Rx */ } }
class RideViewModel { } extension RideViewModel { func drive(_ view:
ProfileSummaryView) { /* Binding Rx */ } }
What about Navigation?
Coordinators
Rule nº1: No Protocol
var rootViewController: UIViewController { get }
var rootViewController: Observable<UIViewController> { get }
var topViewController: Observable<UIViewController> { get } var middleViewController: Observable<UIViewController> {
get } var bottomViewController: Observable<UIViewController> { get }
Rule nº2: A coordinator is not responsible of its own
presentation
Rule nº3: Use requirements
init(navigationController: UINavigationController)
! Dependency Injection
ViewModels declare their dependencies in an "IO" protocol.
Sourcery generates automatically "IOResolvers".
protocol ProfileViewModelIO { var profile: Observable<Profile> { get } func
updateEmail(_ newValue: String) -> Completable } class ProfileViewModel { let io: ProfileViewModelIO init(io: ProfileViewModelIO) { self.io = io } }
let viewModel = ProfileViewModel(io: .resolve( profile: { Observable.merge( apns.continuousUpdates(of: .profile),
api.performRequest(.getProfile) ) }, updateEmail: { newValue in api.performRequest(.postEmail(newValue)) } ))
Debugging
NSLogger
We (try to) log everything
extension ObservableType { func log() }
Debug Assistant
Fake Location
Slow Motion
Feature Flags
Staging Environment
Debug Info
Demo
✨ Showcase Driven Development
Showcase [noun, /ˈʃoʊ.keɪs/]
It's like a Playground, but in-app
Every view is developed in a Showcase
Every screen is available as a Showcase.
View Models are stubbed with fake IO resolvers.
Coordinators are presented as modals or pushed.
Demo
⚖ Pull Requests
Keep them small
Focused on one thing
Good Description
Duck Review
! Thank you
More Decks by Jérôme Alves
See All by Jérôme Alves
Showcase Driven Development
jegnux
0
750
8 uses of RxSwift
jegnux
0
230
Other Decks in Technology
See All in Technology
AWS Well-Arhitected Frameworkセキュリティの柱 について
miu_crescent
PRO
2
170
ノードが消える前提で設計する!Karpenterで金融システムを止めないためのノウハウ大全
daitak
1
200
変更差分を読むために環境を整備しよう
pipepasta
1
630
Context parameters で作る!はじめての型クラス
kworkdev
PRO
1
170
みん強Lightning! データ基盤ひとりでできるかな
endonanana
0
170
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
6k
「任されビリティ」で引き受けて「よしなりてぃ」に頼らず任せる / Accept tasks with "makasarebility" and hand them over without relying on "yoshinarily"
pauli
1
880
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
230
実測データからサービスの成長余力を測る。負荷シナリオ・テストデータ・限界値の設計
kazatohiei
0
140
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
430
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
290
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
30 Presentation Tips
portentint
PRO
1
480
Statistics for Hackers
jakevdp
799
230k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
640
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The untapped power of vector embeddings
frankvandijk
2
2k
Side Projects
sachag
456
43k