SlideShare a Scribd company logo
Using Fluxible to Create
Isomorphic JavaScript Applications
Who Am I?
• My name is Taylor Lovett
• Director of Web Engineering at 10up
• Open source community member
• WordPress core contributor
• Creator of the dockunit.io (Docker based testing
service)
@tlovett12
10up is hiring!
@tlovett12
taylor.lovett@10up.com
What is an isomorphic web
application?
Isomorphic Web Applications
• Applications where the same code is used for
both server side and client side rendering
• Create single page applications without having
to wait a long time for initial loading
• Run JavaScript in the browser and server side
via Node.js
Isomorphic Web Applications
• Many frameworks to accomplish this - Fluxible,
Redux, Alt, Reflux, Rendr, Meteor, etc.
• “App-like” experiences are the future of the web
What is React.js?
React.js
• Stateful, composable components or views for
high performance client/server side rendering
via JavaScript.
• Components use a virtual DOM to re-render
components very efficiently.
• Embrace tying logic into templates
• Built by Facebook
What is Flux?
Flux
• An application architecture for building highly
dynamic isomorphic JavaScript applications
using React.js
• Built by Facebook
• https://facebook.github.io/flux
Flux
• Framework constrains how data flows to prevent
application code from becoming messy.
• Unidirectional data flow
• Dispatcher, stores, and views
Views
• Views are created as React.js components.
• Views execute actions to communicate with the
server, APIs, modify data, etc.
• For example, an action named loadMore might
be executed to load more items.
Actions
• Actions, having been called from views,
communicate with external services if necessary,
and tell the dispatcher to broadcast a payload.
Stores
• Stores hold data.
• Stores register listeners with the dispatcher.
When relevant payloads are broadcasted, stores
update themselves and emit a change event.
Views (again)
• Views listen for change events from relevant
stores.
• When a store change occurs, the view
completely re-renders itself based on the new
data.
• React.js virtual DOM makes the complete re-
render performant (awesome).
Flux
What is Fluxible?
Fluxible
• Fluxible is an implementation/extension of the
Flux application architecture.
• Created by Yahoo
• https://github.com/yahoo/fluxible
Fluxible
• Vibrant community of developers with Discord
channel for support
• Has a number of helper Github repos built
around it
Let’s build something simple
Example code:
https://github.com/tlovett1/fluxible-starter
Example Application
• File system:
- server.js

- client.js

- app.js

components/

actions/

stores/
server.js
• Executed by the server
• Instantiates application code in app.js
app.js
• Creates a new Fluxible instance giving our
application “context”.
• Within that Fluxible instance we can:
• Register stores
• Export/import state (dehydrate/rehydrate)
server.js
• Passes context to tree of React components start
with the “Html” component. Fluxible wrapper
functions handle a lot of this behind the scenes.
• Saves context or state of application as JSON on
the DOM. This is called dehydrating your
application.
• Renders your application returning HTML to the
browser via Express
client.js
• This is what makes your application
“isomorphic”
• Instantiates/rehydrates your application code in
app.js with existing context or state stored in the
DOM
React Components Tools
• provideContext()



A handy Fluxible tool to provide context to React
components. Context access allows you to
execute actions within all child components.
http://fluxible.io/addons/provideContext.html
React Components Tools
• connectToStores()



Lets you easily connect stores to React
components. When a store is connected to a
component, the component will automatically re-
render when the store changes.
http://fluxible.io/addons/connectToStores.html
Router
• Fluxible gives you a pre-made store for handling
route changes.
• Fluxible also gives you a handy React navigation
link component.
https://github.com/yahoo/fluxible/tree/master/packages/fluxible-router
Example code (again):
https://github.com/tlovett1/fluxible-starter
What about framework
________?
Questions?
We need to send a PUT request to this endpoint with
our post data. Of course we must authenticate before
doing this.
@tlovett12
10up.com
taylor.lovett@10up.com
taylorlovett.com
github.com/tlovett1
dockunit.io

More Related Content

PDF
Isomorphic WordPress Applications with NodeifyWP
PPTX
Best Practices for Building WordPress Applications
PPTX
Best Practices for WordPress in Enterprise
PDF
JSON REST API for WordPress
PDF
Modernizing WordPress Search with Elasticsearch
PDF
Node.js to the rescue
PDF
Unlocking the Magical Powers of WP_Query
PPT
Intro to SPA using JavaScript & ASP.NET
Isomorphic WordPress Applications with NodeifyWP
Best Practices for Building WordPress Applications
Best Practices for WordPress in Enterprise
JSON REST API for WordPress
Modernizing WordPress Search with Elasticsearch
Node.js to the rescue
Unlocking the Magical Powers of WP_Query
Intro to SPA using JavaScript & ASP.NET

What's hot (20)

PPTX
Owin & katana
PDF
Here Be Dragons - Debugging WordPress
PPT
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
KEY
ClubAJAX Basics - Server Communication
PDF
Unleash the power of HTTP with ASP.NET Web API
KEY
WordPress APIs
PPTX
Alfresco Process Services extension project - Alfresco DevCon 2018
PDF
Getting Started with WordPress JSON REST API
PPTX
Agile sites2
PPTX
PowerShell for sharepoint 2010 administrators
PPTX
Powershell For Developers
PDF
The Need For Speed - NxtGen Cambridge
PDF
PowerShell for SharePoint Developers
PPTX
Agile sites @ telmore
PPTX
Hire laravel-php-developers- Hire Laravel Programmers
PPTX
The Next Step in Responsive - RESS
PPTX
PowerShell for SharePoint Admins
PDF
Extending WordPress as a pro
PDF
Introduction to CQ5
PDF
Intro JavaScript
Owin & katana
Here Be Dragons - Debugging WordPress
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
ClubAJAX Basics - Server Communication
Unleash the power of HTTP with ASP.NET Web API
WordPress APIs
Alfresco Process Services extension project - Alfresco DevCon 2018
Getting Started with WordPress JSON REST API
Agile sites2
PowerShell for sharepoint 2010 administrators
Powershell For Developers
The Need For Speed - NxtGen Cambridge
PowerShell for SharePoint Developers
Agile sites @ telmore
Hire laravel-php-developers- Hire Laravel Programmers
The Next Step in Responsive - RESS
PowerShell for SharePoint Admins
Extending WordPress as a pro
Introduction to CQ5
Intro JavaScript
Ad

Viewers also liked (6)

PDF
Modernizing WordPress Search with Elasticsearch
PPTX
What You Missed in Computer Science
PDF
Best Practices for WordPress
PDF
You Got React.js in My PHP
PDF
Wordpress search-elasticsearch
PPTX
The JSON REST API for WordPress
Modernizing WordPress Search with Elasticsearch
What You Missed in Computer Science
Best Practices for WordPress
You Got React.js in My PHP
Wordpress search-elasticsearch
The JSON REST API for WordPress
Ad

Similar to Fluxible (20)

PDF
TPSE Thailand 2015 - Rethinking Web with React and Flux
PDF
Introduction to React, Flux, and Isomorphic Apps
ODP
Fluxxor react library
PPTX
What is flux architecture in react
PDF
JBug_React_and_Flux_2015
PPTX
Isomorphic JavaScript – future of the web
PPTX
Flux and React.js
PDF
React & Flux Workshop
PDF
Introduce flux & react in practice
PPTX
React. Flux. Redux
PDF
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
PDF
Back to the future: Isomorphic javascript applications
PPTX
React. Flux. Redux. by Andrey Kolodnitskiy
PDF
An Intense Overview of the React Ecosystem
PPTX
ReactJS - Re-rendering pages in the age of the mutable DOM
PDF
Instant download Flux Architecture 1 edition Edition Boduch pdf all chapter
PPTX
Intro to Flux - ReactJS Warsaw #1
PDF
Front end architecture patterns
PDF
Flux Architecture 1 edition Edition Boduch
TPSE Thailand 2015 - Rethinking Web with React and Flux
Introduction to React, Flux, and Isomorphic Apps
Fluxxor react library
What is flux architecture in react
JBug_React_and_Flux_2015
Isomorphic JavaScript – future of the web
Flux and React.js
React & Flux Workshop
Introduce flux & react in practice
React. Flux. Redux
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
Back to the future: Isomorphic javascript applications
React. Flux. Redux. by Andrey Kolodnitskiy
An Intense Overview of the React Ecosystem
ReactJS - Re-rendering pages in the age of the mutable DOM
Instant download Flux Architecture 1 edition Edition Boduch pdf all chapter
Intro to Flux - ReactJS Warsaw #1
Front end architecture patterns
Flux Architecture 1 edition Edition Boduch

Recently uploaded (20)

PDF
creating-agentic-ai-solutions-leveraging-aws.pdf
PDF
This slide provides an overview Technology
PPTX
How Much Does It Cost to Build a Train Ticket App like Trenitalia in Italy.pptx
PDF
Reimagining Insurance: Connected Data for Confident Decisions.pdf
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PDF
Revolutionize Operations with Intelligent IoT Monitoring and Control
PDF
Dell Pro 14 Plus: Be better prepared for what’s coming
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
PDF
Chapter 2 Digital Image Fundamentals.pdf
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
PDF
agentic-ai-and-the-future-of-autonomous-systems.pdf
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
CroxyProxy Instagram Access id login.pptx
PPTX
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
creating-agentic-ai-solutions-leveraging-aws.pdf
This slide provides an overview Technology
How Much Does It Cost to Build a Train Ticket App like Trenitalia in Italy.pptx
Reimagining Insurance: Connected Data for Confident Decisions.pdf
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
Revolutionize Operations with Intelligent IoT Monitoring and Control
Dell Pro 14 Plus: Be better prepared for what’s coming
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Chapter 2 Digital Image Fundamentals.pdf
NewMind AI Weekly Chronicles - July'25 - Week IV
agentic-ai-and-the-future-of-autonomous-systems.pdf
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
NewMind AI Weekly Chronicles - August'25 Week I
CroxyProxy Instagram Access id login.pptx
ABU RAUP TUGAS TIK kelas 8 hjhgjhgg.pptx
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Enable Enterprise-Ready Security on IBM i Systems.pdf
Understanding_Digital_Forensics_Presentation.pptx

Fluxible

  • 1. Using Fluxible to Create Isomorphic JavaScript Applications
  • 2. Who Am I? • My name is Taylor Lovett • Director of Web Engineering at 10up • Open source community member • WordPress core contributor • Creator of the dockunit.io (Docker based testing service) @tlovett12
  • 4. What is an isomorphic web application?
  • 5. Isomorphic Web Applications • Applications where the same code is used for both server side and client side rendering • Create single page applications without having to wait a long time for initial loading • Run JavaScript in the browser and server side via Node.js
  • 6. Isomorphic Web Applications • Many frameworks to accomplish this - Fluxible, Redux, Alt, Reflux, Rendr, Meteor, etc. • “App-like” experiences are the future of the web
  • 8. React.js • Stateful, composable components or views for high performance client/server side rendering via JavaScript. • Components use a virtual DOM to re-render components very efficiently. • Embrace tying logic into templates • Built by Facebook
  • 10. Flux • An application architecture for building highly dynamic isomorphic JavaScript applications using React.js • Built by Facebook • https://facebook.github.io/flux
  • 11. Flux • Framework constrains how data flows to prevent application code from becoming messy. • Unidirectional data flow • Dispatcher, stores, and views
  • 12. Views • Views are created as React.js components. • Views execute actions to communicate with the server, APIs, modify data, etc. • For example, an action named loadMore might be executed to load more items.
  • 13. Actions • Actions, having been called from views, communicate with external services if necessary, and tell the dispatcher to broadcast a payload.
  • 14. Stores • Stores hold data. • Stores register listeners with the dispatcher. When relevant payloads are broadcasted, stores update themselves and emit a change event.
  • 15. Views (again) • Views listen for change events from relevant stores. • When a store change occurs, the view completely re-renders itself based on the new data. • React.js virtual DOM makes the complete re- render performant (awesome).
  • 16. Flux
  • 18. Fluxible • Fluxible is an implementation/extension of the Flux application architecture. • Created by Yahoo • https://github.com/yahoo/fluxible
  • 19. Fluxible • Vibrant community of developers with Discord channel for support • Has a number of helper Github repos built around it
  • 22. Example Application • File system: - server.js
 - client.js
 - app.js
 components/
 actions/
 stores/
  • 23. server.js • Executed by the server • Instantiates application code in app.js
  • 24. app.js • Creates a new Fluxible instance giving our application “context”. • Within that Fluxible instance we can: • Register stores • Export/import state (dehydrate/rehydrate)
  • 25. server.js • Passes context to tree of React components start with the “Html” component. Fluxible wrapper functions handle a lot of this behind the scenes. • Saves context or state of application as JSON on the DOM. This is called dehydrating your application. • Renders your application returning HTML to the browser via Express
  • 26. client.js • This is what makes your application “isomorphic” • Instantiates/rehydrates your application code in app.js with existing context or state stored in the DOM
  • 27. React Components Tools • provideContext()
 
 A handy Fluxible tool to provide context to React components. Context access allows you to execute actions within all child components. http://fluxible.io/addons/provideContext.html
  • 28. React Components Tools • connectToStores()
 
 Lets you easily connect stores to React components. When a store is connected to a component, the component will automatically re- render when the store changes. http://fluxible.io/addons/connectToStores.html
  • 29. Router • Fluxible gives you a pre-made store for handling route changes. • Fluxible also gives you a handy React navigation link component. https://github.com/yahoo/fluxible/tree/master/packages/fluxible-router
  • 32. Questions? We need to send a PUT request to this endpoint with our post data. Of course we must authenticate before doing this. @tlovett12 10up.com [email protected] taylorlovett.com github.com/tlovett1 dockunit.io