The rise of single-page applications

60
#feecbr @caridy

description

In the last couple of years we have seen an explosion of single-page applications beyond the traditional complex applications, making its way into the mainstream and the consequent appearance of frameworks to facilitate the creation of these applications for desktop and mobile devices. In this session we will cover the motivations and implications of creating single-page apps, as well as the current state of the industry, the trends that are starting to arise in the field and the role of nodejs to facilitate the initial render process on the server side before handing over the control to the browser, as a way to speed up the initial rendering as the new bread of what we call isomorphic javascript applications.

Transcript of The rise of single-page applications

Page 1: The rise of single-page applications

#feecbr @caridy

Page 2: The rise of single-page applications

The rise of single-page applications

Page 3: The rise of single-page applications

Caridy Patiño Principal Frontend Engineer at Yahoo! [email protected] @caridy

Page 4: The rise of single-page applications
Page 5: The rise of single-page applications

modown

Page 6: The rise of single-page applications

The Time Machine (2002)

the future!

Page 7: The rise of single-page applications

http://www.flickr.com/photos/roddh/7998107606/

what is coming next?

Page 8: The rise of single-page applications

http://www.flickr.com/photos/diverkeith/379540273/

the next big wave

Page 9: The rise of single-page applications

from web applications to single-page applications

to “isomorphic” applications

Page 10: The rise of single-page applications

evolution of web applications

Page 11: The rise of single-page applications

urls

Page 12: The rise of single-page applications

url #fragments

Page 13: The rise of single-page applications

websites

Page 14: The rise of single-page applications

ajax (web 2.0)

Page 15: The rise of single-page applications

complex apps became popular

Page 16: The rise of single-page applications

http://www.flickr.com/photos/pennstatelive/8972110324/

need for speed

Page 17: The rise of single-page applications

http://www.flickr.com/photos/indigotimbre/66258903/

users were happy with the broken web

Page 18: The rise of single-page applications

back/forward buttons patched by using #fragments

Page 19: The rise of single-page applications

the broken web was fixed

Page 20: The rise of single-page applications

we hack things to avoid disrupting the workflow with a full page reload to fulfill an action as a consequence of a

user interaction

Page 21: The rise of single-page applications

only seconds of our users’ attention

Page 22: The rise of single-page applications

it is all about performance

Page 23: The rise of single-page applications

single-page applications

Page 24: The rise of single-page applications

support for multiple states to react to user interaction

Page 25: The rise of single-page applications
Page 26: The rise of single-page applications

users can switch between different states in no time

Page 27: The rise of single-page applications

building single-page applications today

Page 28: The rise of single-page applications

Mojito

EmberJS

AngularJSRendr

BackboneMeteor

DerbyJS

YAF

React

Page 29: The rise of single-page applications

support a chain of user interactions to fulfill an operation without

a full page refresh

Page 30: The rise of single-page applications

the problem with single page applications

Page 31: The rise of single-page applications

client side MVC as we know it!

index.html

*.js, *.css

datadata

data

data

browser FE Box CDN API

time

to c

onsu

me

info

rmat

ion

Page 32: The rise of single-page applications

isomorphic applications

Page 33: The rise of single-page applications

url driven web applications

Page 34: The rise of single-page applications

isomorphic apps are single-page apps without breaking any of the core

features of the web (history, openness, url, seo)

Page 35: The rise of single-page applications

app code

client runtime

server runtime

Datarest/API

isomorphic app

Page 36: The rise of single-page applications

writing application code that runs in multiple runtimes

(server and client)

Page 37: The rise of single-page applications

rendering initial state on the server, then let the browser takes over

Page 38: The rise of single-page applications

server passes the control to the browser to continue function as a

single page application

Page 39: The rise of single-page applications
Page 40: The rise of single-page applications

progressive enhancement, graceful degradation,

and performance as a feature

Page 41: The rise of single-page applications

performance as a way to enhance user experience

Page 42: The rise of single-page applications

recommendations for building isomorphic applications

Page 43: The rise of single-page applications

MVC* for the win

Page 44: The rise of single-page applications

conventions over configurations

Page 45: The rise of single-page applications

avoid opinionated frameworks when building complex apps

Page 46: The rise of single-page applications

app framework

libraries

app foundation

app code libraries

app code

opinionated framework vs library-foundation

Page 47: The rise of single-page applications

libraries over frameworks

Page 48: The rise of single-page applications

use template engines to do UI data bindings

Page 49: The rise of single-page applications

/#!/dont-do-it/

Page 50: The rise of single-page applications
Page 51: The rise of single-page applications

nodejs as the server runtime

Page 52: The rise of single-page applications

building blocks rather than prescriptions

Page 53: The rise of single-page applications

building blocks for isomorphic javascript applications

Page 54: The rise of single-page applications

extending express

Page 55: The rise of single-page applications

ES6 centric

Page 56: The rise of single-page applications

we call it “modown”

Page 57: The rise of single-page applications

modown is a set of libraries and components to power single page applications

Page 58: The rise of single-page applications

modown components

mojito-next (yui, search)

hermes (flickr)

assembler (touchdown)

Page 59: The rise of single-page applications

npmjs.org/search?q=modown

Page 60: The rise of single-page applications

Thanks @caridy