spa, isomorphic and back to the server: our journey with javascript @ jsday 2017 in verona (italy)

155
Alex Nadalin - CTO @ namshi.com JsDay 2017 (Verona - Italy)

Upload: alessandro-nadalin

Post on 23-Jan-2018

470 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Alex Nadalin - CTO @ namshi.comJsDay 2017 (Verona - Italy)

Page 2: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

WARNING

Controversyahead

Page 3: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Take #1

Page 4: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Started with a SPA

Page 5: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

...which pissed bots off

Page 6: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

...which pissed clients off

Page 7: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

...which pissed clients off

Page 8: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

...which pissed clients off

Page 9: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Take #2

Page 10: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Isomorphic js

Page 11: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Both on the client & the server

Page 12: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

universal js

Page 13: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Works only in movies

Page 14: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

https://2015.jsday.it/talk/back-to-the-future-isomorphic-javascript-applications/

Page 15: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Clients are still angry

Page 16: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Sneak peak of a custom-madeuniversal js framework

Page 17: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Sneak peak of a custom-madeuniversal js framework

Page 18: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Sneak peak of a custom-madeuniversal js framework

Page 19: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Fonzie does not approve.

Page 20: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

The do-over

Page 21: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Simplify our codebase

Page 22: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Better client-side performance

Page 23: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

roi

Page 24: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Appealing looks

Page 25: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Best website?

Page 26: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

It’s an app.

Page 27: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

It’s an app.

Smooth transitions

Page 28: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

It’s an app.

Smooth transitions

Great (perceived) performance

Page 29: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Can a websiteMatch that?

Page 30: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Spa closely bridges the gap

Page 31: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Spa closely bridges the gap

Additional layer of complexity

Page 32: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Generally no.

Spa closely bridges the gap

Additional layer of complexity

Page 33: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Do we need it?

Page 34: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)
Page 35: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)
Page 36: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)
Page 37: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

service is king

Page 38: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

The b* stack

Page 39: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

The b* stack

Page 40: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

The b* stack

Page 41: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

The b* stack

Page 42: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

The b* stack

Page 43: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

server

Page 44: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)
Page 45: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

client

Page 46: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Webpack 2

Page 47: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Webpack 2

Tree-shaking saved us15/20% of the gzipped

bundle size

Page 48: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Say “no” to jquery(as much as possible)

Page 49: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)
Page 50: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Abstraction === cost

Page 51: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Abstraction === cost let obj = { name: 'alex', age: 28, hair: 'enough', status: 'married', job: 'who really knows', }

_.pick(obj, ['name', 'age'])

{ name: obj.name, age: obj.age,}

Page 52: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Abstraction === cost let obj = { name: 'alex', age: 28, hair: 'enough', status: 'married', job: 'who really knows', }

_.pick(obj, ['name', 'age'])

{ name: obj.name, age: obj.age,}

Page 53: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Abstraction === cost let obj = { name: 'alex', age: 28, hair: 'enough', status: 'married', job: 'who really knows', }

_.pick(obj, ['name', 'age'])

{ name: obj.name, age: obj.age,}

Page 54: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Abstraction === cost let obj = { name: 'alex', age: 28, hair: 'enough', status: 'married', job: 'who really knows', }

_.pick(obj, ['name', 'age'])

{ name: obj.name, age: obj.age,}700k ops/s 75m ops/s

Page 55: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Abstraction === cost let obj = { name: 'alex', work: { name: 'Namshi' } }

_.get(obj, 'work.name', null)

Page 56: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Abstraction === cost let obj = { name: 'alex', work: { name: 'Namshi' } }

_.get(obj, 'work.name', null)

1.3m ops/s

Page 57: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Abstraction === cost let obj = { name: 'alex', work: { name: 'Namshi' } }

let work = null;

if (obj && obj.work && obj.work.name) { work = obj.work.name }

Page 58: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Abstraction === cost let obj = { name: 'alex', work: { name: 'Namshi' } }

let work = null;

if (obj && obj.work && obj.work.name) { work = obj.work.name }

70m ops/s

Page 59: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

!Results may vary

Page 60: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

let attributes = [‘price’,‘name’,‘description’,‘url’

]

………

function sanitize(products) {return products.map(p => {

return _.pick(p, attributes) })}

Page 61: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

let attributes = [‘price’,‘name’,‘description’,‘url’

]

………

function sanitize(products) {return products.map(p => {

return _.pick(p, attributes) })}

Page 62: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

let attributes = [‘price’,‘name’,‘description’,‘url’

]

………

function sanitize(products) {return products.map(p => {

return _.pick(p, attributes) })}

Page 63: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

let attributes = [‘price’,‘name’,‘description’,‘url’

]

………

function sanitize(products) {return products.map(p => {

return _.pick(p, attributes) })} 5ms / req

Page 64: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

let attributes = [‘price’,‘name’,‘description’,‘url’

]

………

function sanitize(products) {return products.map(p => {

return _.pick(p, attributes) })} 10% / req

Page 65: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)
Page 66: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

const _ = require(‘lodash’)

Page 67: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

const _ = require(‘lodash’)

const pick = require(‘lodash/pick’)

Page 68: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

articles.filter(a => a.active).map(a => {a.title = titleCase(a.title)

return a})

Page 69: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

articles.filter(a => a.active).map(a => {a.title = titleCase(a.title)

return a})

Page 70: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

articles.filter(a => a.active).map(a => {a.title = titleCase(a.title)

return a})

Page 71: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

articles.filter(a => a.active).map(a => {a.title = titleCase(a.title)

return a})

Page 72: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

articles.filter(a => a.active).map(a => {a.title = titleCase(a.title)

return a})

700k ops/s

Page 73: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

articles.reduce((acc, a) => {if (a.active) {a.title = titlecase(a.title)acc.push(a)

}

return acc})

Page 74: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

articles.reduce((acc, a) => {if (a.active) {a.title = titlecase(a.title)acc.push(a)

}

return acc}) 4M ops/s

Page 75: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

sprites?

Page 76: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

No thanks,I do http/2

Page 77: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

300kb 500kb 200kb

Page 78: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

The old www

Page 79: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

The old www

Page 80: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

300kb 500kb

The old www

Page 81: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

300kb 500kb 800kb / tot2 conns

The old www

Page 82: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

sprites

Page 83: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

sprites

Page 84: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

1mb / tot1 conn

sprites

Page 85: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

http/2

Page 86: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

http/2

Page 87: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

800kb / tot1 conn

http/2

Page 88: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

react?

Page 89: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

“No sauce please”

Page 90: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

“No sauce please”

react-lite 25kb

preact 3kb

Page 91: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

css animations

Page 92: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

css animations

Page 94: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preconnect

<html class="en"><head>

<link preconnect="https://a.namshicdn.com" crossorigin />

Page 95: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preconnect

<html class="en"><head>

<link preconnect="https://a.namshicdn.com" crossorigin />

Page 96: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preconnect

<html class="en"><head>

<link preconnect="https://a.namshicdn.com" crossorigin />Initiate

connections

ASAP

Page 97: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preload<link

rel="preload" href="https://mycdn.com/fonts.css" as="style" onload="

this.rel='stylesheet';this.className='font-loaded'

"/>

Page 98: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preload<link

rel="preload" href="https://mycdn.com/fonts.css" as="style" onload="

this.rel='stylesheet';this.className='font-loaded'

"/>

Page 99: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preload<link

rel="preload" href="https://mycdn.com/fonts.css" as="style" onload="

this.rel='stylesheet';this.className='font-loaded'

"/>

Page 100: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preload<link

rel="preload" href="https://mycdn.com/fonts.css" as="style" onload="

this.rel='stylesheet';this.className='font-loaded'

"/>

Page 101: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preload<link

rel="preload" href="https://mycdn.com/fonts.css" as="style" onload="

this.rel='stylesheet';this.className='font-loaded'

"/>

Page 102: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preload<link

rel="preload" href="https://mycdn.com/fonts.css" as="style" onload="

this.rel='stylesheet';this.className='font-loaded'

"/>

Async

Non-blocking

CSS

Page 103: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

preload

Page 104: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

prerender window.addEventListener('load', function(){ var preRenderLink = doc.createElement('link'); preRenderLink.rel='prerender'; preRenderLink.href= '{{ nextPage }}'; document.head.appendChild(preRenderLink); });

Page 105: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

prerender window.addEventListener('load', function(){ var preRenderLink = doc.createElement('link'); preRenderLink.rel='prerender'; preRenderLink.href= '{{ nextPage }}'; document.head.appendChild(preRenderLink); });

Page 106: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

prerender window.addEventListener('load', function(){ var preRenderLink = doc.createElement('link'); preRenderLink.rel='prerender'; preRenderLink.href= '{{ nextPage }}'; document.head.appendChild(preRenderLink); });

Page 107: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

prerender window.addEventListener('load', function(){ var preRenderLink = doc.createElement('link'); preRenderLink.rel='prerender'; preRenderLink.href= '{{ nextPage }}'; document.head.appendChild(preRenderLink); });

Page 108: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

prerender window.addEventListener('load', function(){ var preRenderLink = doc.createElement('link'); preRenderLink.rel='prerender'; preRenderLink.href= '{{ nextPage }}'; document.head.appendChild(preRenderLink); });

Page 109: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

prerender

Page 110: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

SPLIT ASSETS

Page 111: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

SPLIT ASSETS

Page 112: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

SPLIT ASSETS

Page 113: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

index.html

Page 114: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

detail.html

Page 115: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Less bandwidth, good cache rate

Page 116: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Less bandwidth, good cache rate

7 req~100kb

Page 117: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Less bandwidth, good cache rate

9 req~150kb

Page 118: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Less bandwidth, good cache rate

13 req~380kb

Page 119: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

RESULTS ?

Page 120: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

-60%AVG document content loaded time

1.93 vs 4.84

Page 121: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

-14%Bounce rate

Page 122: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

+40%AVG session duration

Page 123: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

+30%Conversion rate

Page 124: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

LookingForward

to...

Page 125: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)
Page 126: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Not available in the browserhttps://github.com/grpc/grpc/issues/8682

Page 127: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)
Page 128: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Under developmenthttps://firebase.google.com/docs/cloud-messaging/

Page 129: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)
Page 130: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Under developmenthttps://githubengineering.com/githubs-post-csp-journey/

Page 132: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Old, abandoned ideahttps://youtu.be/v0xRTEf-ytE?t=16m25s

Page 133: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Still far, far awayhttps://github.com/jakearchibald/navigation-transitions

Page 134: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

“Hot” is overrated

NERD ADVICE

Page 135: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

“Hot” is overratedhttps://jakearchibald.com/2016/caching-best-practices/

“As you can see, you can hack around poor caching in your service worker, but you're way better off fixing the root of the problem. Getting your caching right makes things easier in service worker land, but also benefits browsers that don't support service worker (Safari, IE/Edge), and lets you get the most out of your CDN.”

https://jakearchibald.com/2016/caching-best-practices/

NERD ADVICE

Page 136: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

“Solve problems on the right layer”https://www.ampproject.org/learn/amp-design-principles/

NERD ADVICE

Page 137: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

“Solve problems on the right layer”https://www.ampproject.org/learn/amp-design-principles/

NERD ADVICE

Page 138: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Servers can still be pretty darn fast.

NERD ADVICE

Page 139: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

NERD ADVICE

Page 140: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Servers can still be pretty fast

NERD ADVICE

Page 141: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Servers can still be pretty fast

NERD ADVICE

Page 142: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Servers can still be pretty fast

NERD ADVICE

Page 143: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

50% within <30ms

Page 144: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

95% within <120ms

Page 145: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Take this any day

Page 146: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Measure $ wiselyhttp://250bpm.com/blog:86

NERD ADVICE

Page 147: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

NERD ADVICEAct upon what moves the needlehttps://en.wikipedia.org/wiki/Pareto_principle

Page 148: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Alessandro Nadalin

Page 149: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Alessandro Nadalin

@_odino_

Page 150: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Alessandro Nadalin

@_odino_

Namshi

Page 151: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Alessandro Nadalin

@_odino_

Namshi

CTO

Page 152: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Alessandro Nadalin

@_odino_

Namshi

CTO

odino.org

Page 153: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

Thanks!Alessandro Nadalin

@_odino_

Namshi

CTO

odino.org

Page 154: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

joind.in/talk/9e16d

Alessandro Nadalin

@_odino_

Namshi

CTO

odino.org

Page 155: SPA, isomorphic and back to the server: our journey with JavaScript @ JsDay 2017 in Verona (Italy)

we are hiring!tech.namshi.com/join-us

github.com/namshi

twitter.com/TechNamshi

tech.namshi.com