SlideShare une entreprise Scribd logo
1  sur  18
Cycling for noobs
cycleconf April 2016
Steve Lee
steve@opendirective.com
@SteveALee
Why CycleJS & RP?
• Background in embedded realtime
comms & early Windows
–Async messages, events, signals
• Result of review of client side tools
• Good components model
• Declarative code 
• Explicit data flow & transformation
Concerns
• Requires a “brain rewire”
• High barrier to reuse & contribution
• How do Progressive Enhancement?
• Slower initial development
• Are custom element tags clearer?
Still learning and testing
• But is looking promising so far
Quick Demo of Brian
• Designed for people with cognitive disabilities
– eg dementia or learning disabilities.
• Easy access to media and communications
• Various grades of UI complexity
– https://brian.opendirective.com
– https://brian.opendirective.com/assistant
– https://github.com/opendirective/brian
Initially RP feels like …
Leading to this …
Image: Remy by Stormy Peters
Drowning?
• Cycle opinionated use of Reactive frameworks
– All side effects in drivers
– Main made of pure function(s)
• Drivers are not complex– one liners are common
• Imagine flows splitting and joining (aka a
graph)
– Split: const stream2$ = stream1$
– Join .merge()
– Needs visualisation tools
– Play “Where’s my water” 
Brain aches
• State, state and state!
– Problem for imperative too; cycle brings clarity
– Externally persisted eg user settings
– DB via API (eg pouchdb)
– Scan or single atom?
– Is single atom as bad as global state?
• Higher order operators eg flatMap – XS helps
• How to map web app experience to RP
Resources
• Egghead.com – RxJS and CycleJS
• Staltz’s guide to Reactive Programming
– https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
• XStream
– http://staltz.com/xstream/
• RxMarbles
– http://rxmarbles.com/
• RxJS 5 docs: overview, operator selector
– http://reactivex.io
• RxJS 4 docs
– https://github.com/Reactive-Extensions/RxJS/tree/master/doc
Stop Press!
Stalz’s announcement of the XStream reactive
streams library for CycleJS means a good
number of the issues I hit have disappeared 0/
• http://staltz.com/xstream/
• http://staltz.com/why-we-built-xstream.html
XStream happiness
• Web apps use few of the many RxJS operators
– map, startWith, filter, merge, scan,
combineLatest, withLatestFrom,
mergeMap
• Hot vs cold, plus interaction with splitting
• Schedulers
• RxJS size on mobile
Debugging / testing
• http://staltz.com/how-to-debug-rxjs-code.html
• .do(x=>console.log(‘txt’, x))
• .subscribe(x=>console.log(‘txt’, x))
• Log all inputs and outputs (in production too)
• Unit test win with pure functions, less mocking
• ASCII Marble test descriptions 0/
• Global exception handler may be useful?
Relax, don’t sweat it
• This is RP with Observables, not full FRP
– Observable + iterator = streams
• No guilt - use non pure main function
• But, refactor out any code smells and anti
patterns as soon as possible. Pay your
Technical debt early
Hygge yourself happy
Wants
• Visualisation and debugging tools
• RxMarbles to cover higher order operators
• Examples of common idioms / patterns
• Repository of drivers
• Enhancing newbie on-boarding
Possible Bugs
• DOM driver seems to change capture/bubbling
– .do(preventPropagation()), cough
• No error event for img loading
– In line function handler with VDOM
• Extra click event on a removed node
– .filter(.parentElement !== null)
• Crazy bug with driver not getting item but added
subscribe does
• Reactivex.io docs for Observable.from missing
Cycle FTW

Contenu connexe

Tendances

Splunk Quick Overview for Emirates Travel Hackathon
Splunk Quick Overview for Emirates Travel HackathonSplunk Quick Overview for Emirates Travel Hackathon
Splunk Quick Overview for Emirates Travel HackathonHal Rottenberg
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With JestBen McCormick
 
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...Continuous Delivery Amsterdam - Microservices in action at the Dutch National...
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...Bert Jan Schrijver
 
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your DocumentationLF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your DocumentationLF_APIStrat
 
Delivering changes for applications and databases
Delivering changes for applications and databasesDelivering changes for applications and databases
Delivering changes for applications and databasesEduardo Piairo
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveDavide Mauri
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best PracticesPavel Mička
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend toolingpksjce
 
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless DreamsRainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless DreamsJosh Carlisle
 
Evolution of integration and microservices patterns with service mesh
Evolution of integration and microservices patterns with service meshEvolution of integration and microservices patterns with service mesh
Evolution of integration and microservices patterns with service meshJudy Breedlove
 
Scala for java developers 6 may 2017 - yeni
Scala for java developers   6 may 2017 - yeniScala for java developers   6 may 2017 - yeni
Scala for java developers 6 may 2017 - yeniBaris Dere
 
SQL Server 2016 Temporal Tables
SQL Server 2016 Temporal TablesSQL Server 2016 Temporal Tables
SQL Server 2016 Temporal TablesDavide Mauri
 
Database Source Control: Migrations vs State
Database Source Control: Migrations vs StateDatabase Source Control: Migrations vs State
Database Source Control: Migrations vs StateEduardo Piairo
 
Database Source Control
Database Source ControlDatabase Source Control
Database Source ControlDean Willson
 
Minimum Viable Architecture - Good Enough is Good Enough
Minimum Viable Architecture - Good Enough is Good EnoughMinimum Viable Architecture - Good Enough is Good Enough
Minimum Viable Architecture - Good Enough is Good EnoughRandy Shoup
 
Haufe #msaday: "Building a Microservice Ecosystem"
Haufe #msaday: "Building a Microservice Ecosystem"Haufe #msaday: "Building a Microservice Ecosystem"
Haufe #msaday: "Building a Microservice Ecosystem"Daniel Bryant
 
Rapid With Spring Roo
Rapid With Spring RooRapid With Spring Roo
Rapid With Spring RooMorten Lileng
 
An introduction in to the world of front end automation - frontend ne (02 07-15)
An introduction in to the world of front end automation - frontend ne (02 07-15)An introduction in to the world of front end automation - frontend ne (02 07-15)
An introduction in to the world of front end automation - frontend ne (02 07-15)frontendne
 

Tendances (20)

Splunk Quick Overview for Emirates Travel Hackathon
Splunk Quick Overview for Emirates Travel HackathonSplunk Quick Overview for Emirates Travel Hackathon
Splunk Quick Overview for Emirates Travel Hackathon
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...Continuous Delivery Amsterdam - Microservices in action at the Dutch National...
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...
 
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your DocumentationLF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
 
Delivering changes for applications and databases
Delivering changes for applications and databasesDelivering changes for applications and databases
Delivering changes for applications and databases
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
 
Do you queue
Do you queueDo you queue
Do you queue
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend tooling
 
ASP.NET MVC - Latest & Greatest So Far
ASP.NET MVC - Latest & Greatest So FarASP.NET MVC - Latest & Greatest So Far
ASP.NET MVC - Latest & Greatest So Far
 
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless DreamsRainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
 
Evolution of integration and microservices patterns with service mesh
Evolution of integration and microservices patterns with service meshEvolution of integration and microservices patterns with service mesh
Evolution of integration and microservices patterns with service mesh
 
Scala for java developers 6 may 2017 - yeni
Scala for java developers   6 may 2017 - yeniScala for java developers   6 may 2017 - yeni
Scala for java developers 6 may 2017 - yeni
 
SQL Server 2016 Temporal Tables
SQL Server 2016 Temporal TablesSQL Server 2016 Temporal Tables
SQL Server 2016 Temporal Tables
 
Database Source Control: Migrations vs State
Database Source Control: Migrations vs StateDatabase Source Control: Migrations vs State
Database Source Control: Migrations vs State
 
Database Source Control
Database Source ControlDatabase Source Control
Database Source Control
 
Minimum Viable Architecture - Good Enough is Good Enough
Minimum Viable Architecture - Good Enough is Good EnoughMinimum Viable Architecture - Good Enough is Good Enough
Minimum Viable Architecture - Good Enough is Good Enough
 
Haufe #msaday: "Building a Microservice Ecosystem"
Haufe #msaday: "Building a Microservice Ecosystem"Haufe #msaday: "Building a Microservice Ecosystem"
Haufe #msaday: "Building a Microservice Ecosystem"
 
Rapid With Spring Roo
Rapid With Spring RooRapid With Spring Roo
Rapid With Spring Roo
 
An introduction in to the world of front end automation - frontend ne (02 07-15)
An introduction in to the world of front end automation - frontend ne (02 07-15)An introduction in to the world of front end automation - frontend ne (02 07-15)
An introduction in to the world of front end automation - frontend ne (02 07-15)
 

Similaire à Getting Started with CycleJS and Reactive Programming

All about that reactive ui
All about that reactive uiAll about that reactive ui
All about that reactive uiPaul van Zyl
 
Reaktive Programmierung mit den Reactive Extensions (Rx)
Reaktive Programmierung mit den Reactive Extensions (Rx)Reaktive Programmierung mit den Reactive Extensions (Rx)
Reaktive Programmierung mit den Reactive Extensions (Rx)NETUserGroupBern
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the thingsMat Mannion
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Markus Eisele
 
Nine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youNine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youMarkus Eisele
 
Intoduction to React
Intoduction to ReactIntoduction to React
Intoduction to ReactRubizza
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraLINAGORA
 
Architecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureArchitecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureSARCCOM
 
Architecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering CultureArchitecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering Cultureifnu bima
 
Radical Speed for SQL Queries on Databricks: Photon Under the Hood
Radical Speed for SQL Queries on Databricks: Photon Under the HoodRadical Speed for SQL Queries on Databricks: Photon Under the Hood
Radical Speed for SQL Queries on Databricks: Photon Under the HoodDatabricks
 
SYED_DANISH_J2EE_8YRs
SYED_DANISH_J2EE_8YRsSYED_DANISH_J2EE_8YRs
SYED_DANISH_J2EE_8YRsdanish ali
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseTaylor Lovett
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache UsergridDavid M. Johnson
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamAndreas Grabner
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Jeremy Likness
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithMarkus Eisele
 
Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Dimitri de Putte
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applicationsTalbott Crowell
 

Similaire à Getting Started with CycleJS and Reactive Programming (20)

All about that reactive ui
All about that reactive uiAll about that reactive ui
All about that reactive ui
 
Reaktive Programmierung mit den Reactive Extensions (Rx)
Reaktive Programmierung mit den Reactive Extensions (Rx)Reaktive Programmierung mit den Reactive Extensions (Rx)
Reaktive Programmierung mit den Reactive Extensions (Rx)
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the things
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19
 
Nine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youNine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take you
 
Intoduction to React
Intoduction to ReactIntoduction to React
Intoduction to React
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
Architecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureArchitecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering Culture
 
Architecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering CultureArchitecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering Culture
 
Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)
 
Radical Speed for SQL Queries on Databricks: Photon Under the Hood
Radical Speed for SQL Queries on Databricks: Photon Under the HoodRadical Speed for SQL Queries on Databricks: Photon Under the Hood
Radical Speed for SQL Queries on Databricks: Photon Under the Hood
 
SYED_DANISH_J2EE_8YRs
SYED_DANISH_J2EE_8YRsSYED_DANISH_J2EE_8YRs
SYED_DANISH_J2EE_8YRs
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in Enterprise
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
 
Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012
 
DataOps with Project Amaterasu
DataOps with Project AmaterasuDataOps with Project Amaterasu
DataOps with Project Amaterasu
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applications
 

Plus de Steve Lee

2017-09-15 T4I Maavis, son on Brian is Always in Mind
2017-09-15 T4I Maavis, son on Brian is Always in Mind2017-09-15 T4I Maavis, son on Brian is Always in Mind
2017-09-15 T4I Maavis, son on Brian is Always in MindSteve Lee
 
2017 09-14 AAATE SteppingStones
2017 09-14 AAATE SteppingStones2017 09-14 AAATE SteppingStones
2017 09-14 AAATE SteppingStonesSteve Lee
 
Getting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstreamGetting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstreamSteve Lee
 
2016 11-28 t4-i_steppingstones
2016 11-28 t4-i_steppingstones2016 11-28 t4-i_steppingstones
2016 11-28 t4-i_steppingstonesSteve Lee
 
2016-08-25 TechExeter - going serverless with Azure
2016-08-25 TechExeter - going serverless with Azure2016-08-25 TechExeter - going serverless with Azure
2016-08-25 TechExeter - going serverless with AzureSteve Lee
 
Module 2-web-a11y-steve lee
Module 2-web-a11y-steve leeModule 2-web-a11y-steve lee
Module 2-web-a11y-steve leeSteve Lee
 
10 min intro to web a11y
10 min intro to web a11y10 min intro to web a11y
10 min intro to web a11ySteve Lee
 
TS11 Community anti-patterns
TS11 Community anti-patternsTS11 Community anti-patterns
TS11 Community anti-patternsSteve Lee
 
Open accessibility – why is ‘open’ good for web accessibility?
Open accessibility – why is ‘open’ good for web accessibility?Open accessibility – why is ‘open’ good for web accessibility?
Open accessibility – why is ‘open’ good for web accessibility?Steve Lee
 
Mobile a11y stack
Mobile a11y stackMobile a11y stack
Mobile a11y stackSteve Lee
 

Plus de Steve Lee (10)

2017-09-15 T4I Maavis, son on Brian is Always in Mind
2017-09-15 T4I Maavis, son on Brian is Always in Mind2017-09-15 T4I Maavis, son on Brian is Always in Mind
2017-09-15 T4I Maavis, son on Brian is Always in Mind
 
2017 09-14 AAATE SteppingStones
2017 09-14 AAATE SteppingStones2017 09-14 AAATE SteppingStones
2017 09-14 AAATE SteppingStones
 
Getting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstreamGetting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstream
 
2016 11-28 t4-i_steppingstones
2016 11-28 t4-i_steppingstones2016 11-28 t4-i_steppingstones
2016 11-28 t4-i_steppingstones
 
2016-08-25 TechExeter - going serverless with Azure
2016-08-25 TechExeter - going serverless with Azure2016-08-25 TechExeter - going serverless with Azure
2016-08-25 TechExeter - going serverless with Azure
 
Module 2-web-a11y-steve lee
Module 2-web-a11y-steve leeModule 2-web-a11y-steve lee
Module 2-web-a11y-steve lee
 
10 min intro to web a11y
10 min intro to web a11y10 min intro to web a11y
10 min intro to web a11y
 
TS11 Community anti-patterns
TS11 Community anti-patternsTS11 Community anti-patterns
TS11 Community anti-patterns
 
Open accessibility – why is ‘open’ good for web accessibility?
Open accessibility – why is ‘open’ good for web accessibility?Open accessibility – why is ‘open’ good for web accessibility?
Open accessibility – why is ‘open’ good for web accessibility?
 
Mobile a11y stack
Mobile a11y stackMobile a11y stack
Mobile a11y stack
 

Dernier

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
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.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
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
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Dernier (20)

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
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
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
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...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Getting Started with CycleJS and Reactive Programming

  • 1. Cycling for noobs cycleconf April 2016 Steve Lee steve@opendirective.com @SteveALee
  • 2. Why CycleJS & RP? • Background in embedded realtime comms & early Windows –Async messages, events, signals • Result of review of client side tools • Good components model • Declarative code  • Explicit data flow & transformation
  • 3. Concerns • Requires a “brain rewire” • High barrier to reuse & contribution • How do Progressive Enhancement? • Slower initial development • Are custom element tags clearer?
  • 4. Still learning and testing • But is looking promising so far
  • 5. Quick Demo of Brian • Designed for people with cognitive disabilities – eg dementia or learning disabilities. • Easy access to media and communications • Various grades of UI complexity – https://brian.opendirective.com – https://brian.opendirective.com/assistant – https://github.com/opendirective/brian
  • 7. Leading to this … Image: Remy by Stormy Peters
  • 8. Drowning? • Cycle opinionated use of Reactive frameworks – All side effects in drivers – Main made of pure function(s) • Drivers are not complex– one liners are common • Imagine flows splitting and joining (aka a graph) – Split: const stream2$ = stream1$ – Join .merge() – Needs visualisation tools – Play “Where’s my water” 
  • 9. Brain aches • State, state and state! – Problem for imperative too; cycle brings clarity – Externally persisted eg user settings – DB via API (eg pouchdb) – Scan or single atom? – Is single atom as bad as global state? • Higher order operators eg flatMap – XS helps • How to map web app experience to RP
  • 10. Resources • Egghead.com – RxJS and CycleJS • Staltz’s guide to Reactive Programming – https://gist.github.com/staltz/868e7e9bc2a7b8c1f754 • XStream – http://staltz.com/xstream/ • RxMarbles – http://rxmarbles.com/ • RxJS 5 docs: overview, operator selector – http://reactivex.io • RxJS 4 docs – https://github.com/Reactive-Extensions/RxJS/tree/master/doc
  • 11. Stop Press! Stalz’s announcement of the XStream reactive streams library for CycleJS means a good number of the issues I hit have disappeared 0/ • http://staltz.com/xstream/ • http://staltz.com/why-we-built-xstream.html
  • 12. XStream happiness • Web apps use few of the many RxJS operators – map, startWith, filter, merge, scan, combineLatest, withLatestFrom, mergeMap • Hot vs cold, plus interaction with splitting • Schedulers • RxJS size on mobile
  • 13. Debugging / testing • http://staltz.com/how-to-debug-rxjs-code.html • .do(x=>console.log(‘txt’, x)) • .subscribe(x=>console.log(‘txt’, x)) • Log all inputs and outputs (in production too) • Unit test win with pure functions, less mocking • ASCII Marble test descriptions 0/ • Global exception handler may be useful?
  • 14. Relax, don’t sweat it • This is RP with Observables, not full FRP – Observable + iterator = streams • No guilt - use non pure main function • But, refactor out any code smells and anti patterns as soon as possible. Pay your Technical debt early
  • 16. Wants • Visualisation and debugging tools • RxMarbles to cover higher order operators • Examples of common idioms / patterns • Repository of drivers • Enhancing newbie on-boarding
  • 17. Possible Bugs • DOM driver seems to change capture/bubbling – .do(preventPropagation()), cough • No error event for img loading – In line function handler with VDOM • Extra click event on a removed node – .filter(.parentElement !== null) • Crazy bug with driver not getting item but added subscribe does • Reactivex.io docs for Observable.from missing

Notes de l'éditeur

  1. OpenDirective = Rgardler + myself
  2. Disability – congenital or accident Age relate degeneration Situational disability
  3. Disability – congenital or accident Age relate degeneration Situational disability
  4. Disability – congenital or accident Age relate degeneration Situational disability