SlideShare a Scribd company logo
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

More Related Content

What's hot

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
Hal Rottenberg
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
Ben 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 Documentation
LF_APIStrat
 
Delivering changes for applications and databases
Delivering changes for applications and databasesDelivering changes for applications and databases
Delivering changes for applications and databases
Eduardo Piairo
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
Davide Mauri
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
Pavel Mička
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend tooling
pksjce
 
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
Lohith Goudagere Nagaraj
 
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
Josh 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 mesh
Judy 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 - yeni
Baris Dere
 
SQL Server 2016 Temporal Tables
SQL Server 2016 Temporal TablesSQL Server 2016 Temporal Tables
SQL Server 2016 Temporal Tables
Davide Mauri
 
Database Source Control: Migrations vs State
Database Source Control: Migrations vs StateDatabase Source Control: Migrations vs State
Database Source Control: Migrations vs State
Eduardo Piairo
 
Database Source Control
Database Source ControlDatabase Source Control
Database Source Control
Dean 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 Enough
Randy 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 Roo
Morten 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
 

What's hot (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)
 

Similar to Cycling for noobs

All about that reactive ui
All about that reactive uiAll about that reactive ui
All about that reactive ui
Paul 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 things
Mat 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 / JOTB19
Markus 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 you
Markus Eisele
 
Intoduction to React
Intoduction to ReactIntoduction to React
Intoduction to React
Rubizza
 
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
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
SARCCOM
 
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
 
Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)
Betclic Everest Group Tech Team
 
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
Databricks
 
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 Enterprise
Taylor Lovett
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David 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 Potsdam
Andreas 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_monolith
Markus 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/2012
Dimitri de Putte
 
DataOps with Project Amaterasu
DataOps with Project AmaterasuDataOps with Project Amaterasu
DataOps with Project Amaterasu
DataWorks Summit/Hadoop Summit
 
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
Talbott Crowell
 

Similar to Cycling for noobs (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
 

More from 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 Mind
Steve Lee
 
2017 09-14 AAATE SteppingStones
2017 09-14 AAATE SteppingStones2017 09-14 AAATE SteppingStones
2017 09-14 AAATE SteppingStones
Steve 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 xstream
Steve Lee
 
2016 11-28 t4-i_steppingstones
2016 11-28 t4-i_steppingstones2016 11-28 t4-i_steppingstones
2016 11-28 t4-i_steppingstones
Steve 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 Azure
Steve Lee
 
Module 2-web-a11y-steve lee
Module 2-web-a11y-steve leeModule 2-web-a11y-steve lee
Module 2-web-a11y-steve lee
Steve 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-patterns
Steve 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 stack
Steve Lee
 

More from 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
 

Recently uploaded

Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 

Recently uploaded (20)

Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 

Cycling for noobs

  • 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

Editor's Notes

  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