SlideShare a Scribd company logo
1 of 13
Download to read offline
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
“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

What's hot

Microservices with spring boot
Microservices  with spring bootMicroservices  with spring boot
Microservices with spring bootMesut Can Gurle
 
Demystifying Reactive Programming
Demystifying Reactive ProgrammingDemystifying Reactive Programming
Demystifying Reactive ProgrammingTom Bulatewicz, PhD
 
Reactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJavaReactive java - Reactive Programming + RxJava
Reactive java - Reactive Programming + RxJavaNexThoughts Technologies
 
Reactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project ReactorReactive Programming In Java Using: Project Reactor
Reactive Programming In Java Using: Project ReactorKnoldus Inc.
 
Declarative Concurrency with Reactive Programming
Declarative Concurrency with Reactive ProgrammingDeclarative Concurrency with Reactive Programming
Declarative Concurrency with Reactive ProgrammingFlorian Stefan
 
Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021sumitahuja94
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/FluxKeuller Magalhães
 
Akka for big data developers
Akka for big data developersAkka for big data developers
Akka for big data developersTaras Fedorov
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - TalkMatthias Noback
 
New York City Meetup- 6th March 2021
New York City Meetup- 6th March 2021New York City Meetup- 6th March 2021
New York City Meetup- 6th March 2021NeerajKumar1965
 
Ratpack and Grails 3 GR8Conf US 2014
Ratpack and Grails 3 GR8Conf US 2014Ratpack and Grails 3 GR8Conf US 2014
Ratpack and Grails 3 GR8Conf US 2014Lari Hotari
 
Interop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough CodeInterop 2015: Hardly Enough Theory, Barley Enough Code
Interop 2015: Hardly Enough Theory, Barley Enough CodeJeremy Schulman
 
Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Lari Hotari
 
Why actor-based systems are the best for microservices
Why actor-based systems are the best for microservicesWhy actor-based systems are the best for microservices
Why actor-based systems are the best for microservicesYaroslav Tkachenko
 
Cloud computing-2 (1)
Cloud computing-2 (1)Cloud computing-2 (1)
Cloud computing-2 (1)JUDYFLAVIAB
 
SignalR for ASP.NET Developers
SignalR for ASP.NET DevelopersSignalR for ASP.NET Developers
SignalR for ASP.NET DevelopersShivanand Arur
 
MuleSoft Surat Virtual Meetup#27 - MuleSoft Runtime 4.4, Transit Gateway and ...
MuleSoft Surat Virtual Meetup#27 - MuleSoft Runtime 4.4, Transit Gateway and ...MuleSoft Surat Virtual Meetup#27 - MuleSoft Runtime 4.4, Transit Gateway and ...
MuleSoft Surat Virtual Meetup#27 - MuleSoft Runtime 4.4, Transit Gateway and ...Jitendra Bafna
 

What's hot (20)

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

Similar to Reactive programming - Observable

Reactive programming with cycle.js
Reactive programming with cycle.jsReactive programming with cycle.js
Reactive programming with cycle.jsluca mezzalira
 
My Gentle Introduction to RxJS
My Gentle Introduction to RxJSMy Gentle Introduction to RxJS
My Gentle Introduction to RxJSMattia Occhiuto
 
Moving towards Reactive Programming
Moving towards Reactive ProgrammingMoving towards Reactive Programming
Moving towards Reactive ProgrammingDeepak Shevani
 
Diving into event-sourcing and event-driven architectures
Diving into event-sourcing and event-driven architecturesDiving into event-sourcing and event-driven architectures
Diving into event-sourcing and event-driven architecturesUnai Esteibar
 
Web Application Vulnerabilities
Web Application VulnerabilitiesWeb Application Vulnerabilities
Web Application VulnerabilitiesPamela Wright
 
Real world functional reactive programming
Real world functional reactive programmingReal world functional reactive programming
Real world functional reactive programmingEric Polerecky
 
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016DevOpsDays Tel Aviv
 
Cutting the Fat
Cutting the FatCutting the Fat
Cutting the FatCodemotion
 
Mvi an architecture for reactive programming
Mvi an architecture for reactive programmingMvi an architecture for reactive programming
Mvi an architecture for reactive programmingluca mezzalira
 
Starting Your DevOps Journey – Practical Tips for Ops
Starting Your DevOps Journey – Practical Tips for OpsStarting Your DevOps Journey – Practical Tips for Ops
Starting Your DevOps Journey – Practical Tips for OpsDynatrace
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJSDaine Mawer
 
Cutting the Fat by Tiffany Conroy
Cutting the Fat by Tiffany ConroyCutting the Fat by Tiffany Conroy
Cutting the Fat by Tiffany ConroyCodemotion
 
The Big Picture - Integrating Buzzwords
The Big Picture - Integrating BuzzwordsThe Big Picture - Integrating Buzzwords
The Big Picture - Integrating BuzzwordsAlessandro Giorgetti
 
No Silver Bullet Essence and Accidents ofSoftware Engineeri.docx
No Silver Bullet Essence and Accidents ofSoftware Engineeri.docxNo Silver Bullet Essence and Accidents ofSoftware Engineeri.docx
No Silver Bullet Essence and Accidents ofSoftware Engineeri.docxcurwenmichaela
 
A3 - AR Code Planetarium CST.pdf
A3 - AR Code Planetarium CST.pdfA3 - AR Code Planetarium CST.pdf
A3 - AR Code Planetarium CST.pdfJames Anderson
 
The macro of microservices
The macro of microservicesThe macro of microservices
The macro of microservicesSoftware Guru
 

Similar to Reactive programming - Observable (20)

DZone_RC_RxJS
DZone_RC_RxJSDZone_RC_RxJS
DZone_RC_RxJS
 
Reactive programming with cycle.js
Reactive programming with cycle.jsReactive programming with cycle.js
Reactive programming with cycle.js
 
My Gentle Introduction to RxJS
My Gentle Introduction to RxJSMy Gentle Introduction to RxJS
My Gentle Introduction to RxJS
 
Moving towards Reactive Programming
Moving towards Reactive ProgrammingMoving towards Reactive Programming
Moving towards Reactive Programming
 
Diving into event-sourcing and event-driven architectures
Diving into event-sourcing and event-driven architecturesDiving into event-sourcing and event-driven architectures
Diving into event-sourcing and event-driven architectures
 
Asynchronyin net
Asynchronyin netAsynchronyin net
Asynchronyin net
 
Web Application Vulnerabilities
Web Application VulnerabilitiesWeb Application Vulnerabilities
Web Application Vulnerabilities
 
Real world functional reactive programming
Real world functional reactive programmingReal world functional reactive programming
Real world functional reactive programming
 
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
 
Cutting the Fat
Cutting the FatCutting the Fat
Cutting the Fat
 
Ruby fuza 2016
Ruby fuza 2016Ruby fuza 2016
Ruby fuza 2016
 
Mvi an architecture for reactive programming
Mvi an architecture for reactive programmingMvi an architecture for reactive programming
Mvi an architecture for reactive programming
 
Starting Your DevOps Journey – Practical Tips for Ops
Starting Your DevOps Journey – Practical Tips for OpsStarting Your DevOps Journey – Practical Tips for Ops
Starting Your DevOps Journey – Practical Tips for Ops
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
Cutting the Fat by Tiffany Conroy
Cutting the Fat by Tiffany ConroyCutting the Fat by Tiffany Conroy
Cutting the Fat by Tiffany Conroy
 
The Big Picture - Integrating Buzzwords
The Big Picture - Integrating BuzzwordsThe Big Picture - Integrating Buzzwords
The Big Picture - Integrating Buzzwords
 
No Silver Bullet Essence and Accidents ofSoftware Engineeri.docx
No Silver Bullet Essence and Accidents ofSoftware Engineeri.docxNo Silver Bullet Essence and Accidents ofSoftware Engineeri.docx
No Silver Bullet Essence and Accidents ofSoftware Engineeri.docx
 
Rx Swift
Rx SwiftRx Swift
Rx Swift
 
A3 - AR Code Planetarium CST.pdf
A3 - AR Code Planetarium CST.pdfA3 - AR Code Planetarium CST.pdf
A3 - AR Code Planetarium CST.pdf
 
The macro of microservices
The macro of microservicesThe macro of microservices
The macro of microservices
 

More from Dragos Ionita

Adventures with Angular 2
Adventures with Angular 2Adventures with Angular 2
Adventures with Angular 2Dragos Ionita
 
The new way to write a frontend software
The new way to write a frontend softwareThe new way to write a frontend software
The new way to write a frontend softwareDragos Ionita
 
Robotics and Arduino (Arduino UNO)
Robotics and Arduino (Arduino UNO)Robotics and Arduino (Arduino UNO)
Robotics and Arduino (Arduino UNO)Dragos Ionita
 
Html5 - Awesome APIs
Html5 - Awesome APIsHtml5 - Awesome APIs
Html5 - Awesome APIsDragos Ionita
 
Hybrid Mobile Application with Ionic Framework
Hybrid Mobile Application with Ionic FrameworkHybrid Mobile Application with Ionic Framework
Hybrid Mobile Application with Ionic FrameworkDragos Ionita
 
Powerful JavaScript Tips and Best Practices
Powerful JavaScript Tips and Best PracticesPowerful JavaScript Tips and Best Practices
Powerful JavaScript Tips and Best PracticesDragos Ionita
 
Google Tag Manager (GTM)
Google Tag Manager (GTM)Google Tag Manager (GTM)
Google Tag Manager (GTM)Dragos Ionita
 

More from Dragos Ionita (7)

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

Recently uploaded

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 

Recently uploaded (20)

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 

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.
  • 10.
  • 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