Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Petr Šíma: Principy funkcionálně reaktivního programovaní na mobilních platformách

1,060 views

Published on

Petr Šíma představil principy funkcionálně reaktivního programovaní na mobilních platformách. Předvedl praktický příklad s využitím frameworku ReactiveCocoa pro iOS. Na závěr vás čeká diskuse nad vhodnou architekturou reaktivní aplikace a základy MVVM.

Video: https://www.youtube.com/watch?v=MnEbZGv8t_c

Celý program:
Petr Zadražil: TensorFlow v mobilních aplikacích
Petr Šíma: Principy funkcionálně reaktivního programovaní
Petr Hamerník: Textová analytika v mobilních aplikacích

Web: http://mdevtalk.cz
E-mail: info@mdevtalk.cz
FB: https://facebook.com/mdevtalk
Twitter: https://twitter.com/mdevtalk

Published in: Mobile
  • Be the first to comment

  • Be the first to like this

Petr Šíma: Principy funkcionálně reaktivního programovaní na mobilních platformách

  1. 1. PETR SIMA Senior iOS Developer, Ackee
  2. 2. Functional reactive programming
  3. 3. It's functional. It's reactive. You want to start using it today. Functional reactive programming 4
  4. 4. 1.5 years of experience with FRP both iOS and Android more to come at future mDevTalks FRP at Ackee 5
  5. 5. for-loops mutable state "Push-based" Imperative programming 6
  6. 6. map, reduce, filter, flatMap If a pure function is called with the same arguments, the same result will be returned. declarative, "Pull-based", eliminates side effects, avoids changing-state and mutable data Functional programming 7
  7. 7. = reactive programming (asynchronous dataflow programming) using the building blocks of functional programming (e.g. map, reduce, filter) If a pure function is called with the same arguments, the same result will be returned. implicit parameter - time FRP 8
  8. 8. Demo 9
  9. 9. composable, reusable unidirectional dataflow easy to reason about code More buzzwords ab ab 10
  10. 10. composable, reusable unidirectional dataflow easy to reason about code More buzzwords Input ---> ---> Output 11
  11. 11. composable, reusable unidirectional dataflow easy to reason about code More buzzwords 12
  12. 12. composable, reusable unidirectional dataflow easy to reason about code More buzzwords Input ---> ---> Output 13
  13. 13. composable, reusable unidirectional dataflow easy to reason about code More buzzwords Input ---> ---> Output 14
  14. 14. Railway oriented programming Error handling 15
  15. 15. Reactive code consists of elementary operations. Don't be "too dry". DRY principle? 16
  16. 16. Android RxJava Where to start? iOS RxSwift Reactive Cocoa 17
  17. 17. 18
  18. 18. 19
  19. 19. Android RxJava Where to start? iOS RxSwift Reactive Cocoa Window Rx.N 20
  20. 20. Android RxJava Where to start? iOS RxSwift Reactive Cocoa Windows Phone Rx.NET (RxExtensions) 21
  21. 21. Architecture of a reactive application ... ... ab ab 22
  22. 22. Architecture of a reactive application Massive View Controller MVP MVVM 23
  23. 23. Architecture of a reactive application MVC Model View Presenter MVVM 24
  24. 24. Architecture of a reactive application MVC MVP Model View ViewModel 25
  25. 25. Demo 26
  26. 26. RxSwift, RxJava, ... Observable Hot and cold signals Reactive Cocoa Signal SignalProducer 27
  27. 27. A hot signal is active regardless of observers. "Signals are streams that are already in progress, e.g. notifications, user input, etc." A cold signal starts work when subscribed to. "Cold signals represent operations or tasks, e.g. network requests." Cold signals are lazy. Hot and cold signals 28
  28. 28. Signals are hot. SignalProducers are cold. SignalProducer.start() creates a Signal. Hot and cold signals 29
  29. 29. a mechanism for memory management and cancellation disposable.dispose() interrupts a signal usually don't have to be used directly in Reactive Cocoa Disposables 30
  30. 30. Actions, Schedulers, ... 31
  31. 31. https://github.com/ReactiveCocoa/ReactiveCocoa/tree/master/ Documentation https://github.com/ReactiveX http://neilpa.me/rac-marbles/ Documentation 32
  32. 32. WWW.MDEVTALK.CZ mdevtalk

×