$30 off During Our Annual Pro Sale. View Details »

Client Side Reactive Programming Using RxJS

r31gN_
July 25, 2016

Client Side Reactive Programming Using RxJS

r31gN_

July 25, 2016
Tweet

More Decks by r31gN_

Other Decks in Technology

Transcript

  1. Client-side
    reactive programming
    (using RxJS)

    View Slide

  2. Current state of UIs
    • Extremely complex
    • Full of async events, client/server communication
    • UIs are always composed based on a state
    • State is hard to reason about

    View Slide

  3. Imperative
    programming

    View Slide

  4. View Slide

  5. User action UI Responds User action …..
    Uses imperative programming
    Uses imperative programming
    UI Responds
    time (s)

    View Slide

  6. Caveats of IP
    • Isolates state from time
    • You don’t see the bigger picture
    • Mutable values

    View Slide

  7. Is there a way … ?

    View Slide

  8. Reactive
    programming

    View Slide

  9. – Andre Staltz
    “Reactive programming is programming with
    asynchronous data streams.”

    View Slide

  10. Streams
    • Sequence of ongoing events ordered in time
    • Cheap, ubiquitous
    • Allow you to react to new data
    • Think event busses, typical click events, etc.

    View Slide

  11. But in RP …

    View Slide

  12. View Slide

  13. Demo time with RxJS

    View Slide

  14. When to use RxJS
    • Orchestrate event-based computations
    • Deal with async data
    • Complex UIs with lots of user interaction

    View Slide

  15. Thank you!
    @r31gN_
    https://github.com/r31gN/rxjs-demo-presentation

    View Slide