REACTIVE PROGRAMMING
INTRODUCTION TO
REACTIVE PROGRAMMING
WHAT IS REACTIVE PROGRAMMING?
There are plenty of bad explanation and definitions out there
on the internet:
▸ Wikipedia - is to generic and theoretical as usual.
▸ Stackoverflow’s - canonical answer is obviously not suitable for newcomers.
▸ Reactive Manifesto - sounds like the kind of … job position?
▸ Microsoft RX - is so heavy and Microsoftish that most of us are left confused.
REACTIVE PROGRAMMING
WHAT IS REACTIVE PROGRAMMING?
There are plenty of bad explanation and definitions out there
on the internet:
▸ Wikipedia - is to generic and theoretical as usual.
▸ Stackoverflow’s - canonical answer is obviously not suitable for newcomers.
▸ Reactive Manifesto - sounds like the kind of … job position?
▸ Microsoft RX - is so heavy and Microsoftish that most of us are left confused.
REACTIVE PROGRAMMING
WHAT IS REACTIVE PROGRAMMING?
My definition is:
▸ Reactive programming is programming with asynchronous
data streams.
In a way, this isn't anything new.
Event buses or your typical click events are really an asynchronous event stream, on which
you can observe and do some side effects.
Reactive is that idea on steroids. You are able to create data streams of anything, not just
from click and hover events. Streams are cheap and ubiquitous, can be a stream: variables,
user inputs, properties, caches, data structures, etc
CLICKS ON A
BUTTON
EVENT STREAM
REACTIVE PROGRAMMING
YOU CAN LISTEN TO THAT STREAM AND REACT ACCORDINGLY.
On top of that, you are given an amazing toolbox of functions to combine, create and filter any
of those streams. That's where the "functional" magic kicks in.
A stream can be used as an input to another one.
Even multiple streams can be used as inputs to another stream.
You can merge two streams.
You can filter a stream to get another one that has only those events you are interested in.
You can map data values from one stream to another new one.
REACTIVE PROGRAMMING
A STREAM
A stream is a sequence of ongoing events ordered in time. It can emit three different things: a
value (of some type), an error, or a "completed" signal. Consider that the "completed" takes
place, for instance, when the current window or view containing that button is closed.
We capture these emitted events only asynchronously, by defining a function that will execute
when a value is emitted, another function when an error is emitted, and another function when
'completed' is emitted.
The "listening" to the stream is called subscribing. The functions we are defining are observers.
The stream is the subject (or "observable") being observed.
UNDERSTAND AND
BUILD STREAMS
THINKING IN DIAGRAMS
REACTIVE PROGRAMMING
“WHY SHOULD I CONSIDER ADOPTING RP?”
Reactive Programming raises the level of abstraction of your code so you can focus on the
interdependence of events that define the business logic, rather than having to constantly
fiddle with a large amount of implementation details. Code in RP will likely be more concise.
The benefit is more evident in modern webapps and mobile apps that are highly interactive
with a multitude of UI events related to data events.
Apps nowadays have an abundancy of real-time events of every kind that enable a highly
interactive experience to the user. We need tools for properly dealing with that, and Reactive
Programming is an answer.
Reactive programming - Observable
REACTIVE PROGRAMMING
“SO … DOES THIS MEAN THAT A PROMISE IS LIKE AN OBSERVABLE?”
Yes.
Observable is Promise++. In Rx you can easily convert a Promise to an Observable by doing
var stream = Rx.Observable.fromPromise(promise), so let's use that. The only difference is that
Observables are not Promises/A+ compliant, but conceptually there is no clash. A Promise is
simply an Observable with one single emitted value. Rx streams go beyond promises by
allowing many returned values.
This is pretty nice, and shows how Observables are at least as powerful as Promises.
ARRAY, OBJECT,
PROMISE,
OBSERVABLE
THE DIFFERENCE
BETWEEN
THANKS FOR WATCHING
DRAGOS IONITA
software engineer
https://ro.linkedin.com/in/dragos-ionita-8ab20756
REACTIVE PROGRAMMING

More Related Content

PDF
Reactive programming
PDF
Reactive programming and RxJS
PPTX
Functional reactive programming
PPTX
Reactive programming
PDF
Reactive: Programming -> Systems -> Architecture
PPTX
Reactive programming with rx java
PPTX
Reactive programming
PPTX
Reactive programming
Reactive programming
Reactive programming and RxJS
Functional reactive programming
Reactive programming
Reactive: Programming -> Systems -> Architecture
Reactive programming with rx java
Reactive programming
Reactive programming

What's hot (20)

PDF
Microservices with spring boot
PDF
Demystifying Reactive Programming
PDF
Reactive java - Reactive Programming + RxJava
PPTX
Reactive Programming In Java Using: Project Reactor
PDF
Declarative Concurrency with Reactive Programming
PPTX
Mule soft meetup__official__feb-27_2021
PPT
Building Reactive webapp with React/Flux
PPTX
Akka for big data developers
PDF
Advanced web application architecture - Talk
PPTX
New York City Meetup- 6th March 2021
PPTX
Flux and React.js
PPTX
Ratpack and Grails 3 GR8Conf US 2014
PPTX
Mule async scope
PDF
Interop 2015: Hardly Enough Theory, Barley Enough Code
PPTX
Performance tuning Grails Applications GR8Conf US 2014
PPT
PPTX
Why actor-based systems are the best for microservices
PPT
Cloud computing-2 (1)
PPTX
SignalR for ASP.NET Developers
PDF
MuleSoft Surat Virtual Meetup#27 - MuleSoft Runtime 4.4, Transit Gateway and ...
Microservices with spring boot
Demystifying Reactive Programming
Reactive java - Reactive Programming + RxJava
Reactive Programming In Java Using: Project Reactor
Declarative Concurrency with Reactive Programming
Mule soft meetup__official__feb-27_2021
Building Reactive webapp with React/Flux
Akka for big data developers
Advanced web application architecture - Talk
New York City Meetup- 6th March 2021
Flux and React.js
Ratpack and Grails 3 GR8Conf US 2014
Mule async scope
Interop 2015: Hardly Enough Theory, Barley Enough Code
Performance tuning Grails Applications GR8Conf US 2014
Why actor-based systems are the best for microservices
Cloud computing-2 (1)
SignalR for ASP.NET Developers
MuleSoft Surat Virtual Meetup#27 - MuleSoft Runtime 4.4, Transit Gateway and ...
Ad

Similar to Reactive programming - Observable (20)

PDF
DZone_RC_RxJS
PDF
Reactive programming with cycle.js
PDF
My Gentle Introduction to RxJS
PDF
Moving towards Reactive Programming
PDF
Diving into event-sourcing and event-driven architectures
PDF
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
PDF
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
PDF
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
DOCX
Asynchronyin net
PDF
Web Application Vulnerabilities
PPTX
Real world functional reactive programming
PPTX
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
PDF
Cutting the Fat
PDF
Ruby fuza 2016
PPTX
Mvi an architecture for reactive programming
PDF
Mastering Kafka Streams and ksqlDB: Building Real-Time Data Systems by Exampl...
PDF
Introduction to ReactJS
PDF
Cutting the Fat by Tiffany Conroy
PPTX
The Big Picture - Integrating Buzzwords
DOCX
No Silver Bullet Essence and Accidents ofSoftware Engineeri.docx
DZone_RC_RxJS
Reactive programming with cycle.js
My Gentle Introduction to RxJS
Moving towards Reactive Programming
Diving into event-sourcing and event-driven architectures
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
Asynchronyin net
Web Application Vulnerabilities
Real world functional reactive programming
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Cutting the Fat
Ruby fuza 2016
Mvi an architecture for reactive programming
Mastering Kafka Streams and ksqlDB: Building Real-Time Data Systems by Exampl...
Introduction to ReactJS
Cutting the Fat by Tiffany Conroy
The Big Picture - Integrating Buzzwords
No Silver Bullet Essence and Accidents ofSoftware Engineeri.docx
Ad

More from Dragos Ionita (7)

PDF
Adventures with Angular 2
PDF
The new way to write a frontend software
ODP
Robotics and Arduino (Arduino UNO)
PDF
Html5 - Awesome APIs
PDF
Hybrid Mobile Application with Ionic Framework
PDF
Powerful JavaScript Tips and Best Practices
PDF
Google Tag Manager (GTM)
Adventures with Angular 2
The new way to write a frontend software
Robotics and Arduino (Arduino UNO)
Html5 - Awesome APIs
Hybrid Mobile Application with Ionic Framework
Powerful JavaScript Tips and Best Practices
Google Tag Manager (GTM)

Recently uploaded (20)

PDF
OpenTimelineIO Virtual Town Hall - August 2025
PDF
Enscape 3D Crack + With 2025 Activation Key free
PPTX
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
PPTX
Phoenix Marketo User Group: Building Nurtures that Work for Your Audience. An...
PDF
SBOM Document Quality Guide - OpenChain SBOM Study Group
PDF
IObit Driver Booster Pro Crack Latest Version Download
PPTX
ESDS_SAP Application Cloud Offerings.pptx
PDF
Multiverse AI Review 2025_ The Ultimate All-in-One AI Platform.pdf
PDF
Canva Desktop App With Crack Free Download 2025?
PDF
Ragic Data Security Overview: Certifications, Compliance, and Network Safegua...
PDF
How to Write Automated Test Scripts Using Selenium.pdf
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
PDF
Difference Between Website and Web Application.pdf
PDF
10 Mistakes Agile Project Managers Still Make
PPTX
Comprehensive Guide to Digital Image Processing Concepts and Applications
PDF
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
PDF
How to Set Realistic Project Milestones and Deadlines
PDF
DOWNLOAD—IOBit Uninstaller Pro Crack Download Free
PDF
MaterialX Virtual Town Hall - August 2025
PDF
Top AI Tools for Project Managers: My 2025 AI Stack
OpenTimelineIO Virtual Town Hall - August 2025
Enscape 3D Crack + With 2025 Activation Key free
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
Phoenix Marketo User Group: Building Nurtures that Work for Your Audience. An...
SBOM Document Quality Guide - OpenChain SBOM Study Group
IObit Driver Booster Pro Crack Latest Version Download
ESDS_SAP Application Cloud Offerings.pptx
Multiverse AI Review 2025_ The Ultimate All-in-One AI Platform.pdf
Canva Desktop App With Crack Free Download 2025?
Ragic Data Security Overview: Certifications, Compliance, and Network Safegua...
How to Write Automated Test Scripts Using Selenium.pdf
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Difference Between Website and Web Application.pdf
10 Mistakes Agile Project Managers Still Make
Comprehensive Guide to Digital Image Processing Concepts and Applications
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
How to Set Realistic Project Milestones and Deadlines
DOWNLOAD—IOBit Uninstaller Pro Crack Download Free
MaterialX Virtual Town Hall - August 2025
Top AI Tools for Project Managers: My 2025 AI Stack

Reactive programming - Observable

  • 2. REACTIVE PROGRAMMING WHAT IS REACTIVE PROGRAMMING? There are plenty of bad explanation and definitions out there on the internet: ▸ Wikipedia - is to generic and theoretical as usual. ▸ Stackoverflow’s - canonical answer is obviously not suitable for newcomers. ▸ Reactive Manifesto - sounds like the kind of … job position? ▸ Microsoft RX - is so heavy and Microsoftish that most of us are left confused.
  • 3. REACTIVE PROGRAMMING WHAT IS REACTIVE PROGRAMMING? There are plenty of bad explanation and definitions out there on the internet: ▸ Wikipedia - is to generic and theoretical as usual. ▸ Stackoverflow’s - canonical answer is obviously not suitable for newcomers. ▸ Reactive Manifesto - sounds like the kind of … job position? ▸ Microsoft RX - is so heavy and Microsoftish that most of us are left confused.
  • 4. REACTIVE PROGRAMMING WHAT IS REACTIVE PROGRAMMING? My definition is: ▸ Reactive programming is programming with asynchronous data streams. In a way, this isn't anything new. Event buses or your typical click events are really an asynchronous event stream, on which you can observe and do some side effects. Reactive is that idea on steroids. You are able to create data streams of anything, not just from click and hover events. Streams are cheap and ubiquitous, can be a stream: variables, user inputs, properties, caches, data structures, etc
  • 6. REACTIVE PROGRAMMING YOU CAN LISTEN TO THAT STREAM AND REACT ACCORDINGLY. On top of that, you are given an amazing toolbox of functions to combine, create and filter any of those streams. That's where the "functional" magic kicks in. A stream can be used as an input to another one. Even multiple streams can be used as inputs to another stream. You can merge two streams. You can filter a stream to get another one that has only those events you are interested in. You can map data values from one stream to another new one.
  • 7. REACTIVE PROGRAMMING A STREAM A stream is a sequence of ongoing events ordered in time. It can emit three different things: a value (of some type), an error, or a "completed" signal. Consider that the "completed" takes place, for instance, when the current window or view containing that button is closed. We capture these emitted events only asynchronously, by defining a function that will execute when a value is emitted, another function when an error is emitted, and another function when 'completed' is emitted. The "listening" to the stream is called subscribing. The functions we are defining are observers. The stream is the subject (or "observable") being observed.
  • 9. REACTIVE PROGRAMMING “WHY SHOULD I CONSIDER ADOPTING RP?” Reactive Programming raises the level of abstraction of your code so you can focus on the interdependence of events that define the business logic, rather than having to constantly fiddle with a large amount of implementation details. Code in RP will likely be more concise. The benefit is more evident in modern webapps and mobile apps that are highly interactive with a multitude of UI events related to data events. Apps nowadays have an abundancy of real-time events of every kind that enable a highly interactive experience to the user. We need tools for properly dealing with that, and Reactive Programming is an answer.
  • 11. REACTIVE PROGRAMMING “SO … DOES THIS MEAN THAT A PROMISE IS LIKE AN OBSERVABLE?” Yes. Observable is Promise++. In Rx you can easily convert a Promise to an Observable by doing var stream = Rx.Observable.fromPromise(promise), so let's use that. The only difference is that Observables are not Promises/A+ compliant, but conceptually there is no clash. A Promise is simply an Observable with one single emitted value. Rx streams go beyond promises by allowing many returned values. This is pretty nice, and shows how Observables are at least as powerful as Promises.
  • 13. THANKS FOR WATCHING DRAGOS IONITA software engineer https://ro.linkedin.com/in/dragos-ionita-8ab20756 REACTIVE PROGRAMMING