SlideShare a Scribd company logo
DEV07
Functional Reactive Programming
Alessandro Melchiori
alessandro@codiceplastico.com - @amelchiori
http://melkio.codiceplastico.com/
Grazie a
Platinum
Sponsor
Functional Reactive Programming
Functional Reactive Programming
It's declarative, stateless, side-effects free and immutable
Functional programming
It's declarative, stateless, side-effects free and immutable
Functional programming
describes what we
want, not how we want
it
It's declarative, stateless, side-effects free and immutable
Functional programming
describes what we
want, not how we want
it
system relys only on
inputs, not external
state
It's declarative, stateless, side-effects free and immutable
Functional programming
describes what we
want, not how we want
it
system relys only on
inputs, not external
state
once value has been set,
we can't override its
value
Return new value,
instead of altering
existing ones
Give me five functions
and I’ll raise up the world
[map; filter; reduce; collect; zip]
let source = [ 1; 2; 3]
let result =
List.map (fun x -> x*2) source
val result : int list = [2; 4; 6]
map
let source = [ 1; 2; 3]
let result =
List.filter (fun x -> x > 1) source
val result : int list = [2; 3]
filter
let source = [ 1; 2; 3]
let result =
List.reduce (fun acc curr -> acc + curr) source
val result : int = 6
reduce
let source = [ [ 1; 2; 3]; [ 4; 5 ] ]
let result =
List.collect (fun x -> x) source
val result : int list = [1; 2; 3; 4; 5; 6]
collect
let source1 = [ 1; 2; 3]
let source2 = [‘A’;’B’;’C’]
let result =
List.zip source1 source2
val res : (int * char) list = [(1, 'A'); (2, 'B'); (3, 'C')]
zip
Functional Reactive Programming
Functional Reactive Programming
A programming paradigm oriented around data flows
and the propagation of change.
Reactive programming
Reactive systems are responsive, resilient, elastic and message driven
Reactive manifesto (http://www.reactivemanifesto.org/)
Reactive programming
Reactive programming
1
2
sum
1diff
4
…readily responsive to a stimulus…
Reactive programming
1
1
sum
1diff
4
Reactive programming
1
1
sum
1diff
4
Reactive programming
1
1
sum
1diff
4
Reactive programming
1
1
sum
1diff
4
Reactive programming
1
1
sum
1diff
4
Reactive programming
1
1
sum
1diff
4
Reactive programming
1
1
sum
2diff
4
Reactive extensions
Rx is a library for composing asynchronous and event-based programs
using observable sequences and LINQ-style query operators
(https://msdn.microsoft.com/en-us/data/gg577609.aspx)
Reactive extensions
Rx is a library for composing asynchronous and event-based programs
using observable sequences and LINQ-style query operators
(https://msdn.microsoft.com/en-us/data/gg577609.aspx)
Reactive extensions
Rx is a library for composing asynchronous and event-based programs
using observable sequences and LINQ-style query operators
(https://msdn.microsoft.com/en-us/data/gg577609.aspx)
Reactive extensions
Rx is a library for composing asynchronous and event-based programs
using observable sequences and LINQ-style query operators
(https://msdn.microsoft.com/en-us/data/gg577609.aspx)
Reactive extensions
Rx is a library for composing asynchronous and event-based programs
using observable sequences and LINQ-style query operators
(https://msdn.microsoft.com/en-us/data/gg577609.aspx)
Reactive extensions
• a set of types representing asynchronous data streams
• a set of operators to query asynchronous data streams
• a set of types to parameterize concurrency
Reactive extensions
RX = Observables + LINQ +
Schedulers
demo
intro
Reactive extensions
Reactive extensions
publisher
Reactive extensions
publisher subscriber
Reactive extensions
publisher subscriberboth
The Observable type adds two missing semantics to the Gang of Four's
Observer pattern, which are available in the Iterable type:
• The ability for the producer to signal to the consumer that there is no
more data available
• The ability for the producer to signal to the consumer that an error
has occurred
Reactive extensions
Reactive extensions
RX mantra
everything can be a stream
Reactive extensions: map
1 2 3 4
A B C D
Reactive extensions: filter
1 2 3 4
2 4
Reactive extensions: scan
1 2 3 4
1 3 6 10
Reactive extensions: zip
1 2 3 4
1, A 2, B 3, C 4, D
A B C D
demo
Clicks counter
Reactive extensions
demo
Autocomplete textbox
Recap
• Functional programming
• Reactive programming
• Reactive extensions (Rx.*)
FRP is agnostic about languages.
It's a mindset
Q&A
Tutto il materiale di questa sessione su
http://www.communitydays.it/
Lascia subito il feedback su questa sessione,
potrai essere estratto per i nostri premi!
Seguici su
Twitter @CommunityDaysIT
Facebook http://facebook.com/cdaysit
#CDays15

More Related Content

PDF
Building Scalable Applications with Laravel
Muhammad Shakeel
 
PDF
Software Design Patterns in Laravel by Phill Sparks
Phill Sparks
 
PDF
akka-scalaphx-jun2015
Terry Drozdowski
 
PDF
RxJS - The Basics & The Future
Tracy Lee
 
PPTX
Relay: Seamless Syncing for React (VanJS)
Brooklyn Zelenka
 
PDF
Eclipse Day India 2015 - Unleashing the Java 8 Tooling in Eclipse
Eclipse Day India
 
PDF
RxJS: A Beginner & Expert's Perspective - ng-conf 2017
Tracy Lee
 
ODP
Elixir absinthe-basics
Ruben Amortegui
 
Building Scalable Applications with Laravel
Muhammad Shakeel
 
Software Design Patterns in Laravel by Phill Sparks
Phill Sparks
 
akka-scalaphx-jun2015
Terry Drozdowski
 
RxJS - The Basics & The Future
Tracy Lee
 
Relay: Seamless Syncing for React (VanJS)
Brooklyn Zelenka
 
Eclipse Day India 2015 - Unleashing the Java 8 Tooling in Eclipse
Eclipse Day India
 
RxJS: A Beginner & Expert's Perspective - ng-conf 2017
Tracy Lee
 
Elixir absinthe-basics
Ruben Amortegui
 

What's hot (20)

PPTX
Into to GraphQL
shobot
 
PPTX
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Raffi Khatchadourian
 
PDF
GraphQL
Cédric GILLET
 
PDF
Dynamically Composing Collection Operations through Collection Promises
Marcus Denker
 
PDF
Testing Alfresco extensions
ITD Systems
 
PDF
GraphQL & Relay
Viacheslav Slinko
 
PDF
GraphQL + relay
Cédric GILLET
 
PDF
GraphQL
Joel Corrêa
 
PPTX
Expressing the Context - A Functional Way
Rodrigo G. de A.
 
PDF
Reflection in Pharo: Beyond Smalltak
Marcus Denker
 
PDF
Reflection in Pharo: Beyond Smalltak
Marcus Denker
 
PPTX
Useful practices of creation automatic tests by using cucumber jvm
Anton Shapin
 
PDF
GraphQL With Relay Part Deux
Brad Pillow
 
PDF
GraphQL: The Missing Link Between Frontend and Backend Devs
Sashko Stubailo
 
PDF
Raphael Amorim - Scrating React Fiber
React Conf Brasil
 
PDF
GraphQL: Enabling a new generation of API developer tools
Sashko Stubailo
 
PDF
Variables in Pharo5
Marcus Denker
 
PDF
[HUN][Hackersuli] Androidos alkalmazássebészet, avagy gumikesztyűt fel és irá...
hackersuli
 
PPTX
BDD from QA side
Anton Shapin
 
PDF
Introduction to GraphQL
Brainhub
 
Into to GraphQL
shobot
 
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Raffi Khatchadourian
 
Dynamically Composing Collection Operations through Collection Promises
Marcus Denker
 
Testing Alfresco extensions
ITD Systems
 
GraphQL & Relay
Viacheslav Slinko
 
GraphQL + relay
Cédric GILLET
 
GraphQL
Joel Corrêa
 
Expressing the Context - A Functional Way
Rodrigo G. de A.
 
Reflection in Pharo: Beyond Smalltak
Marcus Denker
 
Reflection in Pharo: Beyond Smalltak
Marcus Denker
 
Useful practices of creation automatic tests by using cucumber jvm
Anton Shapin
 
GraphQL With Relay Part Deux
Brad Pillow
 
GraphQL: The Missing Link Between Frontend and Backend Devs
Sashko Stubailo
 
Raphael Amorim - Scrating React Fiber
React Conf Brasil
 
GraphQL: Enabling a new generation of API developer tools
Sashko Stubailo
 
Variables in Pharo5
Marcus Denker
 
[HUN][Hackersuli] Androidos alkalmazássebészet, avagy gumikesztyűt fel és irá...
hackersuli
 
BDD from QA side
Anton Shapin
 
Introduction to GraphQL
Brainhub
 
Ad

Viewers also liked (6)

PDF
Introduction to Functional Reactive Programming
Edward Amsden
 
PDF
Introduction To Functional Reactive Programming Poznan
Eliasz Sawicki
 
PPTX
Real world functional reactive programming
Eric Polerecky
 
PDF
Functional Reactive Programming / Compositional Event Systems
Leonardo Borges
 
PDF
(Functional) reactive programming (@pavlobaron)
Pavlo Baron
 
PDF
Reactive design: languages, and paradigms
Dean Wampler
 
Introduction to Functional Reactive Programming
Edward Amsden
 
Introduction To Functional Reactive Programming Poznan
Eliasz Sawicki
 
Real world functional reactive programming
Eric Polerecky
 
Functional Reactive Programming / Compositional Event Systems
Leonardo Borges
 
(Functional) reactive programming (@pavlobaron)
Pavlo Baron
 
Reactive design: languages, and paradigms
Dean Wampler
 
Ad

Similar to Functional Reactive Programming (20)

PPTX
Mini training - Reactive Extensions (Rx)
Betclic Everest Group Tech Team
 
PDF
RxJS - The Reactive Extensions for JavaScript
Viliam Elischer
 
PDF
Demystifying Reactive Programming
Tom Bulatewicz, PhD
 
PDF
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
adanaswordbz
 
PPTX
Reactive programming
saykopatt
 
PDF
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
sboavxkt784
 
PDF
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
datumveimar
 
PDF
ReactiveX
BADR
 
PDF
[DevDay 2019] Reactive Programming with JavaScript - By Pham Nguyen Duc, Web ...
DevDay Da Nang
 
PDF
Intro to Functional Reactive Programming In Scala
Diego Alonso
 
PPTX
Functional reactive programming
Ahmed Kamel Taha
 
PPTX
Solve it Differently with Reactive Programming
Supun Dissanayake
 
PDF
Moving towards Reactive Programming
Deepak Shevani
 
PPTX
Quick look in Reactive Extensions
johnlvidal
 
PDF
Functional Reactive Programming - What does it solve? Does it solve things? L...
Netta Bondy
 
PDF
A Quick Intro to ReactiveX
Troy Miles
 
PPTX
RxSwift
Kristaps Grinbergs
 
PPTX
Intro to RxJS
Alan Fadliawan
 
PDF
Reactive programming - Observable
Dragos Ionita
 
PDF
Unite 2017 - Reactive Programming - Pieter Nijs
N Core
 
Mini training - Reactive Extensions (Rx)
Betclic Everest Group Tech Team
 
RxJS - The Reactive Extensions for JavaScript
Viliam Elischer
 
Demystifying Reactive Programming
Tom Bulatewicz, PhD
 
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
adanaswordbz
 
Reactive programming
saykopatt
 
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
sboavxkt784
 
Programming Reactive Extensions and LINQ 1st Edition Jesse Liberty
datumveimar
 
ReactiveX
BADR
 
[DevDay 2019] Reactive Programming with JavaScript - By Pham Nguyen Duc, Web ...
DevDay Da Nang
 
Intro to Functional Reactive Programming In Scala
Diego Alonso
 
Functional reactive programming
Ahmed Kamel Taha
 
Solve it Differently with Reactive Programming
Supun Dissanayake
 
Moving towards Reactive Programming
Deepak Shevani
 
Quick look in Reactive Extensions
johnlvidal
 
Functional Reactive Programming - What does it solve? Does it solve things? L...
Netta Bondy
 
A Quick Intro to ReactiveX
Troy Miles
 
Intro to RxJS
Alan Fadliawan
 
Reactive programming - Observable
Dragos Ionita
 
Unite 2017 - Reactive Programming - Pieter Nijs
N Core
 

More from Alessandro Melchiori (20)

PDF
C# metaprogramming with source generator.pdf
Alessandro Melchiori
 
PDF
Scale your (aks) cluster, luke!
Alessandro Melchiori
 
PDF
A quick introduction to AKS
Alessandro Melchiori
 
PDF
Developing reliable applications with .net core and AKS
Alessandro Melchiori
 
PDF
VS Code tools for docker
Alessandro Melchiori
 
PPTX
Developing reliable applications with .net core and AKS
Alessandro Melchiori
 
PDF
How to search...better! (azure search)
Alessandro Melchiori
 
PDF
AKS: k8s e azure
Alessandro Melchiori
 
PDF
How to search...better!
Alessandro Melchiori
 
PPTX
A quick tour around Azure Dev Spaces
Alessandro Melchiori
 
PPTX
Azure functions: from a function to a whole application in 60 minutes
Alessandro Melchiori
 
PPTX
Aks: k8s e azure
Alessandro Melchiori
 
PDF
Monitoring docker: from zero to Azure
Alessandro Melchiori
 
PPTX
Cooking Akka.net and Azure Service Fabric together
Alessandro Melchiori
 
PPTX
Azure data platform overview
Alessandro Melchiori
 
PPTX
ACR + ACS + VSTS: a complete ALM pipeline with docker and azure
Alessandro Melchiori
 
PPTX
Docker & Azure
Alessandro Melchiori
 
PDF
Docker and Azure
Alessandro Melchiori
 
PPTX
Come ti "pusho" il web con WebSockets: da 0 a SignalR
Alessandro Melchiori
 
PPTX
Docker & azure
Alessandro Melchiori
 
C# metaprogramming with source generator.pdf
Alessandro Melchiori
 
Scale your (aks) cluster, luke!
Alessandro Melchiori
 
A quick introduction to AKS
Alessandro Melchiori
 
Developing reliable applications with .net core and AKS
Alessandro Melchiori
 
VS Code tools for docker
Alessandro Melchiori
 
Developing reliable applications with .net core and AKS
Alessandro Melchiori
 
How to search...better! (azure search)
Alessandro Melchiori
 
AKS: k8s e azure
Alessandro Melchiori
 
How to search...better!
Alessandro Melchiori
 
A quick tour around Azure Dev Spaces
Alessandro Melchiori
 
Azure functions: from a function to a whole application in 60 minutes
Alessandro Melchiori
 
Aks: k8s e azure
Alessandro Melchiori
 
Monitoring docker: from zero to Azure
Alessandro Melchiori
 
Cooking Akka.net and Azure Service Fabric together
Alessandro Melchiori
 
Azure data platform overview
Alessandro Melchiori
 
ACR + ACS + VSTS: a complete ALM pipeline with docker and azure
Alessandro Melchiori
 
Docker & Azure
Alessandro Melchiori
 
Docker and Azure
Alessandro Melchiori
 
Come ti "pusho" il web con WebSockets: da 0 a SignalR
Alessandro Melchiori
 
Docker & azure
Alessandro Melchiori
 

Recently uploaded (20)

PPTX
Coupa-Overview _Assumptions presentation
annapureddyn
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Architecture of the Future (09152021)
EdwardMeyman
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
This slide provides an overview Technology
mineshkharadi333
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Software Development Company | KodekX
KodekX
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Beyond Automation: The Role of IoT Sensor Integration in Next-Gen Industries
Rejig Digital
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Coupa-Overview _Assumptions presentation
annapureddyn
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Architecture of the Future (09152021)
EdwardMeyman
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
This slide provides an overview Technology
mineshkharadi333
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Software Development Company | KodekX
KodekX
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Beyond Automation: The Role of IoT Sensor Integration in Next-Gen Industries
Rejig Digital
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 

Functional Reactive Programming

Editor's Notes

  • #3: Slide da mostrare prima di iniziare la sessione – non rimuovere!
  • #53: Ultima slide, obbligatoria