SlideShare a Scribd company logo
REACTIVE
PROGRAMMING
Ryan Stout, June 2014
WHAT IS
“REACTIVE”
Ryan Stout, June 2014
a buzzword
WHAT IS
“REACTIVE”
Ryan Stout, June 2014
data flows
data bindings
evented programming
actor model
stream processing
fault tolerence
WHY YOUR
WASTING YOUR LIFE
Ryan Stout, June 2014
IS IT ME OR DOES WEB
DEVELOPMENT STILL
SUCK?
Ryan Stout, June 2014
IF I HAVE TO WRITE ONE
MORE REST API, I’M GOING
TO END IT ALL
Ryan Stout, June 2014
MANAGING STATE WITH
REACTIVE PROGRAMMING
Ryan Stout, June 2014
WHERE IS AN
APP’S STATE?
Ryan Stout, June 2014
Browser (URL)
!
!
!
!
!
!
JS
!
!
!
!
!
DOM
!
!
!
Server
!
!
!
!
!
!
App
!
!
!
!
!
Database
!
!
!
Rows
Models
Fields/HTML
Models
JSON
POST PARAMS
URL/Params
WEB DEVELOPER:
Someone who moves data
from one place to another
Ryan Stout, June 2014
Reactive programming
FRONT END STATE
Ryan Stout, June 2014
Browser (URL)
!
!
!
!
!
!
JS
!
!
!
!
!
DOM
!
!
!
REACTIVE BINDINGS
Ryan Stout, June 2014
Browser (URL)
!
!
!
!
!
!
JS
!
!
!
!
!
DOM
!
!
!
<script>

var user = {

name: 'Ryan'

};



// Change name

user.name = 'Bob';



// Print if changed

console.log(user.name);

</script>



<form>

<input type="text" value="{user.name}" />

</form>
ARRAY BINDINGS
Ryan Stout, June 2014
<script>

var todos = [];



todos.push({label: 'Get users'});

todos.push({label: 'Don't bring in revenue'});

todos.push({label: 'Sell for billions to Facebook'});

</script>



{#each todos as todo}

<p>{todo.label}</p>

{/}
COMPUTED PROPERTIES
Ryan Stout, June 2014
<script>

var mealCost = 65;

var numberOfPeople = 4;

var personShare = mealCost / numberOfPeople;

</script>



<form>

<p>Meal Cost: <input type="text" value="{mealCost}" /></p>

<p>Number of People: <input type="text" value="{numberOfPeople}" /></p>

<p>Share Per Person: {personShare}</p>

</form>
COMPUTED PROPERTIES
Ryan Stout, June 2014
<script>

var index = 0;

var todos = [{label: 'Buy Milk'}, {label: 'Fix Car'}];

var currentTodo = todos[index];

</script>



<p>Index: <input type="text" value="{index}" /></p>



<h1>{currentTodo.label}</h1>



API STRATEGIES
Ryan Stout, June 2014
virtual dom
!
dom diff
checking
!
one-way
bindings
proxy objects
!
explicit function
dependencies
!
computation
dependency
graph
diff check scope
object
!
dependency
graph via
dependency
injection
VOLT
Ryan Stout, June 2014
BAIT & SWITCH
Ryan Stout, June 2014
WHAT IS VOLT?
Ryan Stout, June 2014
web framework
ruby on back-end
!
ruby on front-end
(compiled to JS with Opal)
!
share code between front and back end
reactive bindings
data synchronization
DEMO
Ryan Stout, June 2014
WHERE IS AN
APP’S STATE?
Ryan Stout, June 2014
Browser (URL)
!
!
!
!
!
!
JS
!
!
!
!
!
DOM
!
!
!
Server
!
!
!
!
!
!
App
!
!
!
!
!
Database
!
!
!
Rows
Models
Fields/HTML
Models
JSON
POST PARAMS
URL/Params
Models
THANKS!
Ryan Stout, June 2014
Volt: github.com/voltrb/volt
React: facebook.github.io/react
Ember: emberjs.com
Angular: angularjs.org
!

More Related Content

PDF
Eddy the Eagle - The Student Chatbot
SohitGatiganti
 
PDF
WordPress is advancing rAPIdly - WordCamp San Antonio 2015
Wayne Alan McWilliams
 
PDF
How to Clean Up Your Marketing Automation Database
Uberflip
 
PPTX
Low Friction Personal Data Collection - QS Portland
Aaron Parecki
 
PPTX
Task4
guest675242c
 
PDF
Link Profile Audits and Google Penalty Recovery - SMX Munich 2014
Gareth Hoyle
 
PDF
TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
tdc-globalcode
 
KEY
2012: Putting your robots to work: security automation at Twitter
Neil Matatall
 
Eddy the Eagle - The Student Chatbot
SohitGatiganti
 
WordPress is advancing rAPIdly - WordCamp San Antonio 2015
Wayne Alan McWilliams
 
How to Clean Up Your Marketing Automation Database
Uberflip
 
Low Friction Personal Data Collection - QS Portland
Aaron Parecki
 
Link Profile Audits and Google Penalty Recovery - SMX Munich 2014
Gareth Hoyle
 
TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
tdc-globalcode
 
2012: Putting your robots to work: security automation at Twitter
Neil Matatall
 

What's hot (17)

PDF
Our path to apache spark
ppetr82
 
PDF
Compassionate (Yet Candid) Code Reviews
April Wensel
 
PDF
Being an Apache Kafka Developer Hero in the World of Cloud (Ricardo Ferreira,...
confluent
 
PDF
Mejorando las busquedas en nuestras aplicaciones web con elasticsearch
UllyCarolinneSampaio
 
PPT
Putting to your Robots to Work V1.1
Neil Matatall
 
PDF
2018 Charlottesville Open Data Challenge - Alex Miller
Astraea, Inc.
 
PPTX
Schema Markup Basics - Pubcon 2017
Carrie Hill
 
PPTX
Hateoas APIs are about relationships
Matt Bishop
 
PDF
Compassionate Coding for Bootcampers
April Wensel
 
PPTX
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Aaron Parecki
 
PDF
Twitter APIs - the starter guide
Andy Piper
 
PDF
Conexão Kinghost - Otimização Prematura
Fabio Akita
 
PDF
Your government is Mashed UP!
Wynn Netherland
 
PDF
Premature optimisation: The Root of All Evil
Fabio Akita
 
PDF
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
Roy Sivan
 
PDF
Ryan jarrell resume
Ryan Jarrell
 
PDF
Riot Games - Player Focused Pipeline - Stampedecon 2015
sean_seannery
 
Our path to apache spark
ppetr82
 
Compassionate (Yet Candid) Code Reviews
April Wensel
 
Being an Apache Kafka Developer Hero in the World of Cloud (Ricardo Ferreira,...
confluent
 
Mejorando las busquedas en nuestras aplicaciones web con elasticsearch
UllyCarolinneSampaio
 
Putting to your Robots to Work V1.1
Neil Matatall
 
2018 Charlottesville Open Data Challenge - Alex Miller
Astraea, Inc.
 
Schema Markup Basics - Pubcon 2017
Carrie Hill
 
Hateoas APIs are about relationships
Matt Bishop
 
Compassionate Coding for Bootcampers
April Wensel
 
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Aaron Parecki
 
Twitter APIs - the starter guide
Andy Piper
 
Conexão Kinghost - Otimização Prematura
Fabio Akita
 
Your government is Mashed UP!
Wynn Netherland
 
Premature optimisation: The Root of All Evil
Fabio Akita
 
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
Roy Sivan
 
Ryan jarrell resume
Ryan Jarrell
 
Riot Games - Player Focused Pipeline - Stampedecon 2015
sean_seannery
 
Ad

Similar to Reactive programming (20)

PDF
From User Action to Framework Reaction
jbandi
 
PDF
From User Action to Framework Reaction
Jonas Bandi
 
PPTX
Functional reactive programming
Ahmed Kamel Taha
 
PDF
[DevDay 2019] Reactive Programming with JavaScript - By Pham Nguyen Duc, Web ...
DevDay Da Nang
 
PDF
From User Action to Framework Reaction
jbandi
 
ODP
Appstate
Tomas Kulich
 
PDF
I have a stream - Insights in Reactive Programming - Jan Carsten Lohmuller - ...
Codemotion
 
PDF
Functional Reactive Programming in JavaScript
zupzup.org
 
PDF
FRP with Ractive and RxJS
Alfonso Garcia-Caro
 
PPTX
Reactive programming
saykopatt
 
PPTX
Intro to RxJS
Alan Fadliawan
 
PPTX
Reactive Programming with RxJS
Danca Prima
 
PDF
JS Experience 2017 - Reactive Interfaces com React & RxJS
iMasters
 
PPTX
Functional Reactive Programming with RxJS
stefanmayer13
 
PDF
Moving towards Reactive Programming
Deepak Shevani
 
PDF
Reactive Programming in the Browser feat. Scala.js and Rx
Luka Jacobowitz
 
PDF
Functional Reactive Programming. What does it solve? Does it solve things? Le...
Netta Bondy
 
PPTX
WTF is Reactive Programming
Evgeny Poberezkin
 
PDF
Reactive Programming
Knoldus Inc.
 
PPTX
Reactive programming every day
Vadym Khondar
 
From User Action to Framework Reaction
jbandi
 
From User Action to Framework Reaction
Jonas Bandi
 
Functional reactive programming
Ahmed Kamel Taha
 
[DevDay 2019] Reactive Programming with JavaScript - By Pham Nguyen Duc, Web ...
DevDay Da Nang
 
From User Action to Framework Reaction
jbandi
 
Appstate
Tomas Kulich
 
I have a stream - Insights in Reactive Programming - Jan Carsten Lohmuller - ...
Codemotion
 
Functional Reactive Programming in JavaScript
zupzup.org
 
FRP with Ractive and RxJS
Alfonso Garcia-Caro
 
Reactive programming
saykopatt
 
Intro to RxJS
Alan Fadliawan
 
Reactive Programming with RxJS
Danca Prima
 
JS Experience 2017 - Reactive Interfaces com React & RxJS
iMasters
 
Functional Reactive Programming with RxJS
stefanmayer13
 
Moving towards Reactive Programming
Deepak Shevani
 
Reactive Programming in the Browser feat. Scala.js and Rx
Luka Jacobowitz
 
Functional Reactive Programming. What does it solve? Does it solve things? Le...
Netta Bondy
 
WTF is Reactive Programming
Evgeny Poberezkin
 
Reactive Programming
Knoldus Inc.
 
Reactive programming every day
Vadym Khondar
 
Ad

More from ryanstout (8)

PDF
Neural networks - BigSkyDevCon
ryanstout
 
PDF
Volt 2015
ryanstout
 
PDF
Isomorphic App Development with Ruby and Volt - Rubyconf2014
ryanstout
 
PDF
Concurrency Patterns
ryanstout
 
PDF
EmberJS
ryanstout
 
KEY
Practical Machine Learning and Rails Part2
ryanstout
 
PPTX
Practical Machine Learning and Rails Part1
ryanstout
 
PDF
Intro to Advanced JavaScript
ryanstout
 
Neural networks - BigSkyDevCon
ryanstout
 
Volt 2015
ryanstout
 
Isomorphic App Development with Ruby and Volt - Rubyconf2014
ryanstout
 
Concurrency Patterns
ryanstout
 
EmberJS
ryanstout
 
Practical Machine Learning and Rails Part2
ryanstout
 
Practical Machine Learning and Rails Part1
ryanstout
 
Intro to Advanced JavaScript
ryanstout
 

Recently uploaded (20)

PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Doc9.....................................
SofiaCollazos
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Software Development Methodologies in 2025
KodekX
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
The Future of Artificial Intelligence (AI)
Mukul
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 

Reactive programming

  • 2. WHAT IS “REACTIVE” Ryan Stout, June 2014 a buzzword
  • 3. WHAT IS “REACTIVE” Ryan Stout, June 2014 data flows data bindings evented programming actor model stream processing fault tolerence
  • 4. WHY YOUR WASTING YOUR LIFE Ryan Stout, June 2014
  • 5. IS IT ME OR DOES WEB DEVELOPMENT STILL SUCK? Ryan Stout, June 2014
  • 6. IF I HAVE TO WRITE ONE MORE REST API, I’M GOING TO END IT ALL Ryan Stout, June 2014
  • 7. MANAGING STATE WITH REACTIVE PROGRAMMING Ryan Stout, June 2014
  • 8. WHERE IS AN APP’S STATE? Ryan Stout, June 2014 Browser (URL) ! ! ! ! ! ! JS ! ! ! ! ! DOM ! ! ! Server ! ! ! ! ! ! App ! ! ! ! ! Database ! ! ! Rows Models Fields/HTML Models JSON POST PARAMS URL/Params
  • 9. WEB DEVELOPER: Someone who moves data from one place to another Ryan Stout, June 2014
  • 11. FRONT END STATE Ryan Stout, June 2014 Browser (URL) ! ! ! ! ! ! JS ! ! ! ! ! DOM ! ! !
  • 12. REACTIVE BINDINGS Ryan Stout, June 2014 Browser (URL) ! ! ! ! ! ! JS ! ! ! ! ! DOM ! ! ! <script>
 var user = {
 name: 'Ryan'
 };
 
 // Change name
 user.name = 'Bob';
 
 // Print if changed
 console.log(user.name);
 </script>
 
 <form>
 <input type="text" value="{user.name}" />
 </form>
  • 13. ARRAY BINDINGS Ryan Stout, June 2014 <script>
 var todos = [];
 
 todos.push({label: 'Get users'});
 todos.push({label: 'Don't bring in revenue'});
 todos.push({label: 'Sell for billions to Facebook'});
 </script>
 
 {#each todos as todo}
 <p>{todo.label}</p>
 {/}
  • 14. COMPUTED PROPERTIES Ryan Stout, June 2014 <script>
 var mealCost = 65;
 var numberOfPeople = 4;
 var personShare = mealCost / numberOfPeople;
 </script>
 
 <form>
 <p>Meal Cost: <input type="text" value="{mealCost}" /></p>
 <p>Number of People: <input type="text" value="{numberOfPeople}" /></p>
 <p>Share Per Person: {personShare}</p>
 </form>
  • 15. COMPUTED PROPERTIES Ryan Stout, June 2014 <script>
 var index = 0;
 var todos = [{label: 'Buy Milk'}, {label: 'Fix Car'}];
 var currentTodo = todos[index];
 </script>
 
 <p>Index: <input type="text" value="{index}" /></p>
 
 <h1>{currentTodo.label}</h1>
 

  • 16. API STRATEGIES Ryan Stout, June 2014 virtual dom ! dom diff checking ! one-way bindings proxy objects ! explicit function dependencies ! computation dependency graph diff check scope object ! dependency graph via dependency injection
  • 18. BAIT & SWITCH Ryan Stout, June 2014
  • 19. WHAT IS VOLT? Ryan Stout, June 2014 web framework ruby on back-end ! ruby on front-end (compiled to JS with Opal) ! share code between front and back end reactive bindings data synchronization
  • 21. WHERE IS AN APP’S STATE? Ryan Stout, June 2014 Browser (URL) ! ! ! ! ! ! JS ! ! ! ! ! DOM ! ! ! Server ! ! ! ! ! ! App ! ! ! ! ! Database ! ! ! Rows Models Fields/HTML Models JSON POST PARAMS URL/Params Models
  • 22. THANKS! Ryan Stout, June 2014 Volt: github.com/voltrb/volt React: facebook.github.io/react Ember: emberjs.com Angular: angularjs.org !