Definiendo límites

Definiendo límites

Presentado en iOS Love en Diciembre, 2017

675a0b0e911ee6c1c270a8d86a44e716?s=128

Francisco Díaz

December 14, 2017
Tweet

Transcript

  1. 3.
  2. 5.

    EVA BC programs provide vital support to anti- violence programs

    and communities across BC. — Ending Violence Association ONG
  3. 6.
  4. 12.

    Por feature → 1 Dev: Pantalla con botón en iOS

    app → 1 Dev: Today widget → 1 Dev: Knock
  5. 13.
  6. 14.
  7. 15.
  8. 17.
  9. 21.

    class SuccessReportCreator: ReportCreator { func createReport() throws -> Report {

    return Report(id: "1", date: Date()) } } class ErrorReportCreator: ReportCreator { func createReport() throws -> Report { throw ReportCreationError.fakeError } }
  10. 22.

    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 } } }
  11. 25.
  12. 26.
  13. 27.
  14. 28.
  15. 29.

    protocol APIRequester { func createReport() throws -> JSON } protocol

    SMSHandler { func sendSMS() throws -> SMS } protocol ConnectivityListener { var isConnected: Bool { get } }
  16. 31.
  17. 32.