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.

How do you do that in FRP

62 views

Published on

Slides from talk given at FullStack Radar Day conference

Published in: Technology
  • Be the first to comment

  • Be the first to like this

How do you do that in FRP

  1. 1. How do you do that in FRP? @_bondit_Netta Bondy
  2. 2. What is FRP? Functional reactive programming (FRP) is a programming paradigm for reactive programming using the building blocks of functional programming wikipedia.org
  3. 3. Reactive Programming reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change wikipedia.org
  4. 4. Streams = Observables
  5. 5. 1 Observable / stream UI component UI component UI component 1 1 1
  6. 6. Functional Programming functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data wikipedia.org
  7. 7. Pure Functions = Operators
  8. 8. 16 random int UI component ^2 filter odd Observable Operators
  9. 9. State (??)
  10. 10. ButtonSelected ButtonButtonSelected Button
  11. 11. isNotSelected click isSelected click isNotSelected isNotSelected isSelected isNotSelected
  12. 12. State = Subjects
  13. 13. initalFilters click newFilters click newFilters initialFilters newFilters newFilters
  14. 14. State = Subjects
  15. 15. Streams of Streams: Higher Order Operators
  16. 16. Map operator stream new stream.map()
  17. 17. Higher order mapping operator mergeMap
  18. 18. switchMap switchMap
  19. 19. switchMap(click → request → response) click clickclickclick click response responseresponse
  20. 20. switchMap(click → request → response) +blue -gray+gray response response
  21. 21. The FRP Learning Curve Pays Off
  22. 22. Thank You! 1st example 2nd example @_bondit_

×