SlideShare a Scribd company logo
Isomorphic React+Flux at
Yahoo
Mr. Friday
About me
● MMDays (2007~)
● Yahoo TW (2010)
● Yahoo US (2011~)
○ Frontpage
○ News
○ MyYahoo
○ ...
Agenda
● Isomorphic
● React + Flux
● Isomorphic Flux
● Challenges
● Q&A
Isomorphic Web
Client side Single Page Application
● Benefits: Fast, richer user experiences
● Drawbacks:
○ SEO
○ Potential double work
○ Performance
○ Legacy browsers
Examples
● No page reload
● Same URL, different
experiences after reload
● Any way to reuse the code ?
Isomorphic React + Flux at Yahoo
Isomorphic React + Flux at Yahoo
Isomorphic React + Flux at Yahoo
Yahoo had tried it ...
● “First open source isomorphic framework to
get any press” - Airbnb
● Lesson learned:
○ Server side YUI was too heavy
○ Sync Server/Client state and routing was hard
○ YUI format is problematic in Node
React JS
● Finite state
machine
● Re-render
everytime
● Virtual DOM to
save perf.
Flux
● Uni-directional data flow
Isomorphic + React + Flux ?
● Plain javascript to run efficiently on both
server and client
● State transferring between server/client is
easy
● Challenge: Flux is client side only.
Server side Flux
Implementation details
https://speakerdeck.com/mridgway/isomorphic-
flux starting slide 26
https://github.com/yahoo/flux-examples
Challenges - Server-only Libs
● Every code needs to run on server/client.
Need a way to handle server side only
libraries.
○ Create a service that only runs on server side
○ Move them to APIs
○ Apache traffic server
CSS Challenges
● Dynamic modules brings additonal CSS
challenges
● Webpack is not good at including CSS
● In tradition, we use CSS combo tool. Now
we either need to reimplement it in react
environment, or find something else.
CSS: How facebook did it
https://speakerdeck.com/vjeux/react-css-in-js
CSS: How Yahoo did it
http://www.smashingmagazine.com/2013/10/21/challenging-css-best-practices-atomic-approach/
Holy Grail
Q&A
● questions ?
Thank you !
Ad

More Related Content

What's hot (6)

Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
Yos Riady
 
AD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web DevelopmentAD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web Development
Shean McManus
 
A powerful web application server (intravision IBM Connect 2013 Update) Febru...
A powerful web application server (intravision IBM Connect 2013 Update) Febru...A powerful web application server (intravision IBM Connect 2013 Update) Febru...
A powerful web application server (intravision IBM Connect 2013 Update) Febru...
Per Henrik Lausten
 
Web Applications Development with MEAN Stack
Web Applications Development with MEAN StackWeb Applications Development with MEAN Stack
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
Introduction to Nodejs and Isomorphic javascript
Introduction to Nodejs and Isomorphic javascriptIntroduction to Nodejs and Isomorphic javascript
Introduction to Nodejs and Isomorphic javascript
ChenKuo Chen
 
Don't Make Me Wait! A Primer on Site Speed
Don't Make Me Wait! A Primer on Site SpeedDon't Make Me Wait! A Primer on Site Speed
Don't Make Me Wait! A Primer on Site Speed
Joe Fleming
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
Yos Riady
 
AD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web DevelopmentAD109 Navigating the Jungle of Modern Web Development
AD109 Navigating the Jungle of Modern Web Development
Shean McManus
 
A powerful web application server (intravision IBM Connect 2013 Update) Febru...
A powerful web application server (intravision IBM Connect 2013 Update) Febru...A powerful web application server (intravision IBM Connect 2013 Update) Febru...
A powerful web application server (intravision IBM Connect 2013 Update) Febru...
Per Henrik Lausten
 
Web Applications Development with MEAN Stack
Web Applications Development with MEAN StackWeb Applications Development with MEAN Stack
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
Introduction to Nodejs and Isomorphic javascript
Introduction to Nodejs and Isomorphic javascriptIntroduction to Nodejs and Isomorphic javascript
Introduction to Nodejs and Isomorphic javascript
ChenKuo Chen
 
Don't Make Me Wait! A Primer on Site Speed
Don't Make Me Wait! A Primer on Site SpeedDon't Make Me Wait! A Primer on Site Speed
Don't Make Me Wait! A Primer on Site Speed
Joe Fleming
 

Similar to Isomorphic React + Flux at Yahoo (20)

Parallel programing in web applications - public.pptx
Parallel programing in web applications - public.pptxParallel programing in web applications - public.pptx
Parallel programing in web applications - public.pptx
Guy Bary
 
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)
From nothing to a video under 2 seconds / Mikhail Sychev  (YouTube)From nothing to a video under 2 seconds / Mikhail Sychev  (YouTube)
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)
Ontico
 
Web Assembly
Web AssemblyWeb Assembly
Web Assembly
Valerio Como
 
About order form improvements
About order form improvementsAbout order form improvements
About order form improvements
Gengo
 
Introduction to Gengo's New Order Form tech
Introduction to Gengo's New Order Form techIntroduction to Gengo's New Order Form tech
Introduction to Gengo's New Order Form tech
Gengo
 
Tools and libraries for common problems (Early Draft)
Tools and libraries for common problems (Early Draft)Tools and libraries for common problems (Early Draft)
Tools and libraries for common problems (Early Draft)
rc2209
 
Seo for single page applications
Seo for single page applicationsSeo for single page applications
Seo for single page applications
JustinGillespie12
 
Moving From Angular to React
Moving From Angular to ReactMoving From Angular to React
Moving From Angular to React
Ilya Gurevich
 
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Learnosity
 
Html5 storage suggestions for challenges.pptx
Html5 storage   suggestions for challenges.pptxHtml5 storage   suggestions for challenges.pptx
Html5 storage suggestions for challenges.pptx
deepmoteria
 
Introduction to MeteorJS
Introduction to MeteorJSIntroduction to MeteorJS
Introduction to MeteorJS
Weiming Chen
 
Wade.Go Introduction Speech - SFD HCMC 2014
Wade.Go Introduction Speech - SFD HCMC 2014Wade.Go Introduction Speech - SFD HCMC 2014
Wade.Go Introduction Speech - SFD HCMC 2014
Nguyễn Thành Hải
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)
Kazuhiro Ogura
 
Harnessing the cloud_for_saa_s_hosted_platfor
Harnessing the cloud_for_saa_s_hosted_platforHarnessing the cloud_for_saa_s_hosted_platfor
Harnessing the cloud_for_saa_s_hosted_platfor
Luke Summerfield
 
Making sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developersMaking sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developers
Lewiz
 
Decoupled (Headless) Drupal
Decoupled (Headless) DrupalDecoupled (Headless) Drupal
Decoupled (Headless) Drupal
Daniel Stout
 
2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer
Horacio Gonzalez
 
Undo, Redo and Collaboration in Web Applications
Undo, Redo and Collaboration in Web ApplicationsUndo, Redo and Collaboration in Web Applications
Undo, Redo and Collaboration in Web Applications
Miro Cupak
 
Drupal BigPipe: What have I learned
Drupal BigPipe: What have I learnedDrupal BigPipe: What have I learned
Drupal BigPipe: What have I learned
Radim Klaška
 
East bay full stack developers meetup August 2019
East bay full stack developers meetup August 2019East bay full stack developers meetup August 2019
East bay full stack developers meetup August 2019
Connor Leech
 
Parallel programing in web applications - public.pptx
Parallel programing in web applications - public.pptxParallel programing in web applications - public.pptx
Parallel programing in web applications - public.pptx
Guy Bary
 
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)
From nothing to a video under 2 seconds / Mikhail Sychev  (YouTube)From nothing to a video under 2 seconds / Mikhail Sychev  (YouTube)
From nothing to a video under 2 seconds / Mikhail Sychev (YouTube)
Ontico
 
About order form improvements
About order form improvementsAbout order form improvements
About order form improvements
Gengo
 
Introduction to Gengo's New Order Form tech
Introduction to Gengo's New Order Form techIntroduction to Gengo's New Order Form tech
Introduction to Gengo's New Order Form tech
Gengo
 
Tools and libraries for common problems (Early Draft)
Tools and libraries for common problems (Early Draft)Tools and libraries for common problems (Early Draft)
Tools and libraries for common problems (Early Draft)
rc2209
 
Seo for single page applications
Seo for single page applicationsSeo for single page applications
Seo for single page applications
JustinGillespie12
 
Moving From Angular to React
Moving From Angular to ReactMoving From Angular to React
Moving From Angular to React
Ilya Gurevich
 
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Educate 2017: Quick 'n Lazy: How we keep things speedy while staying out of y...
Learnosity
 
Html5 storage suggestions for challenges.pptx
Html5 storage   suggestions for challenges.pptxHtml5 storage   suggestions for challenges.pptx
Html5 storage suggestions for challenges.pptx
deepmoteria
 
Introduction to MeteorJS
Introduction to MeteorJSIntroduction to MeteorJS
Introduction to MeteorJS
Weiming Chen
 
Wade.Go Introduction Speech - SFD HCMC 2014
Wade.Go Introduction Speech - SFD HCMC 2014Wade.Go Introduction Speech - SFD HCMC 2014
Wade.Go Introduction Speech - SFD HCMC 2014
Nguyễn Thành Hải
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)
Kazuhiro Ogura
 
Harnessing the cloud_for_saa_s_hosted_platfor
Harnessing the cloud_for_saa_s_hosted_platforHarnessing the cloud_for_saa_s_hosted_platfor
Harnessing the cloud_for_saa_s_hosted_platfor
Luke Summerfield
 
Making sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developersMaking sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developers
Lewiz
 
Decoupled (Headless) Drupal
Decoupled (Headless) DrupalDecoupled (Headless) Drupal
Decoupled (Headless) Drupal
Daniel Stout
 
2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer
Horacio Gonzalez
 
Undo, Redo and Collaboration in Web Applications
Undo, Redo and Collaboration in Web ApplicationsUndo, Redo and Collaboration in Web Applications
Undo, Redo and Collaboration in Web Applications
Miro Cupak
 
Drupal BigPipe: What have I learned
Drupal BigPipe: What have I learnedDrupal BigPipe: What have I learned
Drupal BigPipe: What have I learned
Radim Klaška
 
East bay full stack developers meetup August 2019
East bay full stack developers meetup August 2019East bay full stack developers meetup August 2019
East bay full stack developers meetup August 2019
Connor Leech
 
Ad

Isomorphic React + Flux at Yahoo