yahoo mail moving to react

29
Building Yahoo Mail over the years React Meetup ⎪ September 25, 2014

Upload: subramanyan-murali

Post on 25-May-2015

90.417 views

Category:

Technology


5 download

DESCRIPTION

Yahoo React meetup

TRANSCRIPT

Page 1: Yahoo Mail moving to React

Bu i l d ing Yahoo Ma i l ove r t he yea rs

R e a c t M e e t u p S e p t e m b e r 2 5 , 2 0 1 4⎪

Page 2: Yahoo Mail moving to React

Subramanyan MuraliEngineering Manager, Yahoo Mail

[email protected]

@rmsguhan

Page 3: Yahoo Mail moving to React

I want to share …

History of Mail Moving to the React way The optimistic update use case

Page 4: Yahoo Mail moving to React

A little bit of history …

Page 5: Yahoo Mail moving to React

1999First gen

C++, HTML

Ajax for world peace ?

2004Oddpost

Java, Python, JS

2008ClassicPHP, JS

2010The One

PHP, YUI, JS

Page 6: Yahoo Mail moving to React

Modern Mail

PHP, Apache on server

YUI on the client

First byte flush using big pipe

Shared templates between client and server

C grade to A grade browser support

Page 7: Yahoo Mail moving to React

Model View Controller

Page 8: Yahoo Mail moving to React

Mail Storage

Model

Controller

View Model

Controller

View

PH

P L

au

nch

YU

I Wo

rkspa

ce

Network Proxy

Server Client

Page 9: Yahoo Mail moving to React

Interesting Moments

Page 10: Yahoo Mail moving to React

Events

Controllers ask for Data & prime models

Models dispatch events handled by views

Views dispatch events handled by other views

Dispatched events causing cycle reaction

Page 11: Yahoo Mail moving to React

Folder View

List View Message View

Page 12: Yahoo Mail moving to React

Controller

Message View

Model

Delete Message

Event Handlermsg:remove

Model

Folder View

Controller

fld:change

List View

Controller

Model

XHR Request

Web Service

SuccessRequest

Page 13: Yahoo Mail moving to React
Page 14: Yahoo Mail moving to React

Evolving for the future

Page 15: Yahoo Mail moving to React

2015Next gen

NodeJS, React + Flux, MicroJS

Page 16: Yahoo Mail moving to React

“ The Age of large platform libraries is over ”

Page 17: Yahoo Mail moving to React

What we wanted

Predictable flow ~ Easy Debugging

Modernize the code base

Isomorphic application

Independently deployable components

Page 18: Yahoo Mail moving to React

React + Flux

Page 19: Yahoo Mail moving to React

Message ViewMSG_REMOVE

Action Creator

Folder View

List View

Message Store Folder Store

emit-change

emit-change

emit-change

Dispatcher

callbacks

Page 20: Yahoo Mail moving to React

Optimistic Updates

Page 21: Yahoo Mail moving to React

Folder View

List View

Message View MSG_REMOVE

Action Creator

Message Store Folder Store

emit-change

emit-change

emit-change

Dispatcher

callbacks

XHR Request

Web Service

MSG_REMOVE_SUCCESS

XHR Success

Page 22: Yahoo Mail moving to React

Folder View

List View

Message View MSG_REMOVE

Action Creator

Message Store Folder Store

emit-change

emit-change

emit-change

Dispatcher

callbacks

XHR Request

Web Service

MSG_REMOVE_FAIL

XHR Failure

Page 23: Yahoo Mail moving to React
Page 24: Yahoo Mail moving to React

Transactional Stores

First Byte Flush

Record and Replay actions

Page 25: Yahoo Mail moving to React

Community can help !

Page 26: Yahoo Mail moving to React

We need to solve …

First Byte Flush for Flux applications Debugging Transactional Stores XHR Responsibility, Actions or stores Testing components Style and Lint checks on JSX Build versioning and bundling

› Server side and on-demand

Page 27: Yahoo Mail moving to React

Yahoo is contributing back

Page 28: Yahoo Mail moving to React

dispatchrroutr

flux-router-component

@mridgwaygithub.com/yahoo/

Page 29: Yahoo Mail moving to React

See you soon !