Upgrade to Pro — share decks privately, control downloads, hide ads and more …

FRP my Swift

Avatar for Afonso Afonso
October 07, 2016

FRP my Swift

In this talk, my goal is to present my process of learning what FRP was, what was the thought process behind it and how using it made my Swift project more concise and easier to understand.

Avatar for Afonso

Afonso

October 07, 2016
Tweet

More Decks by Afonso

Other Decks in Programming

Transcript

  1. About me Afonso Graça ! @ Unbabel Building mobile apps

    (and some web too) Livetweeting " @AfonsoGraca
  2. Option 1 Go along R. Alves Redol, Av. de António

    José de Almeida and Av. Defensores de Chaves Then take Av. de Berna, Av. Calouste Gulbenkian and Av. Ceuta to R. Fradesso da Silveira Finally turn to R. Rodrigues de Faria …Aaaand drop me at no. 103. How did you get to ?
  3. Option 2 Take me to Lx Factory please! Option 1

    Go along R. Alves Redol, Av. de António José de Almeida and Av. Defensores de Chaves Then take Av. de Berna, Av. Calouste Gulbenkian and Av. Ceuta to R. Fradesso da Silveira Finally turn to R. Rodrigues de Faria …Aaaand drop me at no. 103. How did you get to ?
  4. Option 2 Take me to Lx Factory please! Option 1

    Go along R. Alves Redol, Av. de António José de Almeida and Av. Defensores de Chaves Then take Av. de Berna, Av. Calouste Gulbenkian and Av. Ceuta to R. Fradesso da Silveira Finally turn to R. Rodrigues de Faria …Aaaand drop me at no. 103. How did you get to ? Imperative Declarative
  5. Imperative vs. Declarative How you are going to achieve Keep

    state and mutate it What you are want to achieve Context-Independent Simpler, more readable
  6. We should strive to achieve
 a nice balance
 between both

    in our codebases How? Functional Reactive Programming
 (from now on known as FRP)
  7. RxSwift Sequences ▸ Observables Transformations ▸ map, filter, reduce… Bindings

    ▸ Bind and Subscribe And never forget the DisposeBag