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
Setting Boundaries
Search
Francisco Díaz
March 10, 2016
Programming
200
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Setting Boundaries
Presented at ViDIA meetup.
Francisco Díaz
March 10, 2016
More Decks by Francisco Díaz
See All by Francisco Díaz
Inteligencia Artificial en PedidosYa - Una mirada pragmática
fdiaz
0
41
Working effectively at scale
fdiaz
4
330
I hate public speaking. So why do I keep doing it?
fdiaz
0
170
Definiendo límites
fdiaz
1
160
Si odio hablar en público. ¿Por qué lo sigo haciendo?
fdiaz
2
190
Move fast and keep your code quality
fdiaz
1
430
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
180
Swift Values
fdiaz
0
180
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
170
Other Decks in Programming
See All in Programming
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
200
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.3k
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
160
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
470
Google Apps Script で Ruby を動かす
kawahara
0
130
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.4k
OpenSpecのproposalにbrainstormingを持たせてみた
tigertora7571
1
190
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
200
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
130
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
130
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
330
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
3.7k
The Pragmatic Product Professional
lauravandoore
37
7.4k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
BBQ
matthewcrist
89
10k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
560
Speed Design
sergeychernyshev
33
2k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
400
Paper Plane (Part 1)
katiecoart
PRO
1
10k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
350
Transcript
Setting Boundaries
None
Francisco Díaz @fco_diaz
3 iOS Devs 28 hours 1 project == Merge Conflicts
What do we want? → Minimize duplication of code. →
Develop independently without stepping on each other's toes.
Feature verticals: → Big Panic button → Today widget →
Knock
Big Panic button:
What needs to be done? → Create the button. →
We need a way to create reports. → Make a backend call to save this information.
Today widget:
What needs to be done? → Create the extension button.
→ We need a way to create reports. → Make a backend call to save this information.
What was it that we wanted? → Minimize duplication of
code. → Develop independently without stepping on each other's toes.
None
Let's try again!
→ Create the button. → We need a way to
create reports. → Make a backend call to save this information.
UI / Presentation Create the button.
Business logic We need a way to create reports.
Backend connection Make a backend call to save this information.
None
To recap: → Minimize duplication of code. → Develop independently
without stepping on each other's toes.
We can solve any problem by introducing an extra level
of indirection — David Wheeler
Dependency inversion
struct ModelDataManager { let APIClient: APIType init(APIClient: APIType) { self.APIClient
= APIClient } }
protocol APIType { func createReport(completion: JSONDictionary? -> Void) } struct
API { private let manager: Alamofire.Manager init() { manager = Alamofire.Manager() } } extension API: APIType { func createReport(completion: JSONDictionary? -> Void) { manager.request(.POST, "https://some.com/api/report") .responseJSON { response in completion(response) } } }
struct ModelDataManager { let APIClient: APIType init(API: APIType) { self.APIClient
= API } static func defaultManager() -> ModelDataManager { let APIClient = API() return ModelDataManager(API: APIClient) } func createReport(completionHandler completion: Report? -> Void) { APIClient.createReport() { jsonDictionary in let report = ... // Parse jsonDictionary into Report completion(report) } } }
Benefits → Testable. → Decoupled. → Easy to fake our
networking layer.
None
struct FakeAPI: APIType { func createReport(completion: JSONDictionary? -> Void) {
let dictionary = ["id": 12345] completion(dictionary) } }
struct ModelDataManager { let APIClient: APIType init(API: APIType) { self.APIClient
= API } static func defaultManager() -> ModelDataManager { // let APIClient = API() let APIClient = FakeAPI() return ModelDataManager(API: APIClient) } }
Questions? Slides are available at: https://github.com/fdiaz/settings-boundaries-talk References: Architecture: The Lost
Years The Clean Architecture