Successfully reported this slideshow.
Your SlideShare is downloading. ×

How do you do that in FRP

Check these out next

1 of 24 Ad
1 of 24 Ad
Advertisement

More Related Content

Advertisement

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_

×