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
Definiendo límites
Search
Francisco Díaz
December 14, 2017
Programming
1
69
Definiendo límites
Presentado en iOS Love en Diciembre, 2017
Francisco Díaz
December 14, 2017
Tweet
Share
More Decks by Francisco Díaz
See All by Francisco Díaz
Working effectively at scale
fdiaz
4
250
I hate public speaking. So why do I keep doing it?
fdiaz
0
83
Si odio hablar en público. ¿Por qué lo sigo haciendo?
fdiaz
2
99
Move fast and keep your code quality
fdiaz
1
320
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
110
Setting Boundaries
fdiaz
1
90
Swift Values
fdiaz
0
72
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
75
Other Decks in Programming
See All in Programming
とにかくAWS GameDay!AWSは世界の共通言語!.pdf / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
0
160
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.2k
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
120
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
110
カラム追加で増えるActiveRecordのメモリサイズ イメージできますか?
asayamakk
3
1.1k
CSC509 Lecture 07
javiergs
PRO
0
140
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
160
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
カスタムしながら理解するGraphQL Connection
yanagii
0
680
AWS IaCの注目アップデート 2024年10月版
konokenj
3
2.1k
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
Prompt Engineering for Developers @ AWS Community Day Adria 2024
slobodan
0
120
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
360
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
Statistics for Hackers
jakevdp
796
220k
A designer walks into a library…
pauljervisheath
202
24k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Why Our Code Smells
bkeepers
PRO
334
57k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
Typedesign – Prime Four
hannesfritz
39
2.4k
Transcript
DEFINIENDO LIMITES
Francisco Díaz franciscodiaz.cl
None
3 desarrolladores iOS 28 horas 1 projecto
EVA BC programs provide vital support to anti- violence programs
and communities across BC. — Ending Violence Association ONG
None
Features: → Botón de pánico → Today widget → Knock
Botón de pánico: Al presionar el botón → Reportar
Today widget: Al presionar el botón → Reportar
Knock Al golpear el teléfono → Reportar
División de trabajo
Por feature → 1 Dev: Pantalla con botón en iOS
app → 1 Dev: Today widget → 1 Dev: Knock
None
None
None
❌ Una persona por "feature" ✅ Una persona por "capa"
None
Dependencias
Dependency inversion
protocol ReportCreator { func createReport() throws -> Report }
class SuccessReportCreator: ReportCreator { func createReport() throws -> Report {
return Report(id: "1", date: Date()) } } class ErrorReportCreator: ReportCreator { func createReport() throws -> Report { throw ReportCreationError.fakeError } }
class BigPanicButtonViewController: UIViewController { private let reportCreator: ReportCreator init(reportCreator: ReportCreator)
{ self.reportCreator = reportCreator } func didTapBigPanicButton() { do { // Handle Report let report = try reportCreator.createReport() } catch { // Handle error } } }
class BigPanicButtonViewController: UIViewController { init(reportCreator: ReportCreator = SuccessReport()) { ...
} }
¿Si el usuario no tiene internet?
None
None
None
None
protocol APIRequester { func createReport() throws -> JSON } protocol
SMSHandler { func sendSMS() throws -> SMS } protocol ConnectivityListener { var isConnected: Bool { get } }
Nada existe aún, pero podemos probar si funciona
Demo
Recap → Movernos independientemente → Reducir conflictos → No hay
necesidad de esperar para integrar código.
¿Preguntas?