Javascript State of the Union 2015

140
26 de Setembro, 2015

Transcript of Javascript State of the Union 2015

Page 1: Javascript State of the Union 2015

26 de Setembro, 2015

Page 2: Javascript State of the Union 2015

Javascript State of the Union

Huge

26 de Setembro, 2015

Page 3: Javascript State of the Union 2015

1. Introdução2. De onde viemos3. Onde estamos

4. Para onde estamos indo

5. Conclusão

Agenda

Page 4: Javascript State of the Union 2015

Introdução.

Page 5: Javascript State of the Union 2015

Caio Vaccaro.Senior Web Engineer | Huge. Developer Team Lead. NY / RIO. 8 anos de experiência. Front-End, Back-End, Infraestrutura, Integração contínua, treinamentos.

@caiovaccaro

/in/caiovaccaro

/caiovaccaro

Page 6: Javascript State of the Union 2015
Page 7: Javascript State of the Union 2015
Page 8: Javascript State of the Union 2015

Nós fazemos produtos digitais.

Page 9: Javascript State of the Union 2015

State of the Union.

Page 10: Javascript State of the Union 2015
Page 11: Javascript State of the Union 2015

1. Por que tantas mudanças? 2. O que tem mudado? 3. O que não muda?

Introdução:

Page 12: Javascript State of the Union 2015

Timeline.Introdução

Page 13: Javascript State of the Union 2015

1. Linguagens Imperativas. 2. Linguagens Funcionais.3. Computadores e gadgets.4. Processadores. 5. Empresas. 6. Internet e navegadores. 7. HTML/CSS/JS. 8. Frameworks JS.

Timeline:

Page 14: Javascript State of the Union 2015

1. Linguagens Imperativas. 2. Linguagens Funcionais.3. Computadores e gadgets.4. Processadores. 5. Empresas. 6. Internet e navegadores. 7. HTML/CSS/JS. 8. Frameworks JS.

Timeline:

Page 15: Javascript State of the Union 2015

De onde viemos.

Page 16: Javascript State of the Union 2015

1950.

Page 17: Javascript State of the Union 2015

Fortran(Imperativa)

1950

Page 18: Javascript State of the Union 2015

Fortran(Imperativa)

Computador

1950

Page 19: Javascript State of the Union 2015

Fortran(Imperativa)

Computador

Lisp(Funcional)

1950

Page 20: Javascript State of the Union 2015
Page 21: Javascript State of the Union 2015

1950

Fortran(Imperativa)

Computador

Lisp(Funcional)

IBM

Page 22: Javascript State of the Union 2015

Paradigmas de programação

1. Imperativo.

2. Funcional.

3. Reativo.

4. Orientado a objeto.

5. Orientado a evento.

Page 23: Javascript State of the Union 2015

1950

Fortran(Imperativa)

Computador

Lisp(Funcional)

IBM

Page 24: Javascript State of the Union 2015

1950

Fortran(Imperativa)

Lisp(Funcional)

Page 25: Javascript State of the Union 2015

1950

Lisp(Funcional)

Fortran(Imperativa)

Algol

Page 26: Javascript State of the Union 2015

1970.

Page 27: Javascript State of the Union 2015

1950

Lisp(Funcional)

Fortran(Imperativa)

Algol

Page 28: Javascript State of the Union 2015

1950

M.P.P

1970

Algol

Fortran

Lisp

Page 29: Javascript State of the Union 2015

1950

M.P.P

1970

Algol

Fortran

Lisp

Page 30: Javascript State of the Union 2015

1950

M.P.P

1970

Algol

Fortran

Lisp

IBM Xerox

Smalltalk (MVC, OOP)

Xerox & Apple

Page 31: Javascript State of the Union 2015
Page 32: Javascript State of the Union 2015

1950

M.P.P

1970

Algol

Fortran

Lisp

Smalltalk (MVC, OOP)

Page 33: Javascript State of the Union 2015

Arquitetura de software

1. MV*.

2. Microservices.

3. Peer-to-peer.

4. Publish-subscribe.

5. Dependency injection.

Page 34: Javascript State of the Union 2015

1950

M.P.P

1970

Algol

Fortran

Lisp

Smalltalk (MVC, OOP)

Page 35: Javascript State of the Union 2015

M.P.P

Lisp Scheme Haskell

1950 1970

Algol

Fortran Smalltalk (MVC, OOP)

C C++

Page 36: Javascript State of the Union 2015

HTML

M.P.P

Lisp Scheme Haskell

1950 1970

Algol

Fortran Smalltalk (MVC, OOP)

C C++

Concorrência

386

Page 37: Javascript State of the Union 2015

1990.

Page 38: Javascript State of the Union 2015

HTML

M.P.P

Lisp Scheme Haskell

1950 1970

Algol

Fortran Smalltalk (MVC, OOP)

Concorrência

386

C C++

Page 39: Javascript State of the Union 2015

HTML

M.P.P

Lisp Scheme Haskell

1950 1970Fortran Smalltalk (MVC, OOP)

1990

Concorrência

386

Page 40: Javascript State of the Union 2015

M.P.P

Athlon

Pentium

Pentium IIConcorrência

386

1950 1970Fortran

Smalltalk (MVC, OOP)

1990

Python

Ruby

PHP

Java

(Binding)

AMD Yahoo eBay/Amazon

AltavistaW3C

Page 41: Javascript State of the Union 2015

AMD Yahoo eBay/Amazon

AltavistaW3C

M.P.P

Athlon

Pentium

Pentium IIConcorrência

386

1950 1970Fortran

1990

Python

Ruby

PHP

Java

(Binding)

wwwEmail SMTP IRC

Page 42: Javascript State of the Union 2015

AMD Yahoo eBay/Amazon

AltavistaW3C

M.P.P

Athlon

Pentium

Pentium IIConcorrência

386

HTML HTML2

CSS

1950 1970Fortran

1990

Python

Ruby

PHP

Java

(Binding)

wwwEmail SMTP IRC

Page 43: Javascript State of the Union 2015

wwwEmail SMTP IRC Netscape

Apache

HTML HTML2

CSS

1950 1970Fortran

1990

Python

Ruby

PHP

Java

(Binding)

Javascript

M.P.P

Athlon

Pentium

Pentium IIConcorrência

386

Page 44: Javascript State of the Union 2015

wwwEmail SMTP IRC Netscape

Apache

HTML HTML2

CSS

1950 1970Fortran

1990

Python

Ruby

PHP

Java

(Binding)

Javascript

M.P.P

Athlon

Pentium

Pentium IIConcorrência

386

IE

Page 45: Javascript State of the Union 2015

2000.

Page 46: Javascript State of the Union 2015

wwwEmail SMTP IRC Netscape

Apache

HTML HTML2

CSS

1950 1970Fortran

1990

Python

Ruby

PHP

Java

(Binding)

Javascript

M.P.P

Athlon

Pentium

Pentium IIConcorrência

386

IE

Page 47: Javascript State of the Union 2015

M.P.P

Athlon

Pentium

Pentium II

wwwEmail SMTP IRC Netscape

Apache

HTML HTML2

CSS

Fortran

Python

Ruby

PHP

Java

(Binding)

Javascript

IE

1970 2000

Page 48: Javascript State of the Union 2015

HTML HTML2

CSS

Fortran

Python

Ruby

PHP

Java

(Binding)

Javascript

1970

Python

Ruby

PHP

Java

(Binding)

Javascript

M.P.P

Athlon

Pentium

Pentium II

IE7...wwwEmail SMTP IRC Netscape

Apache

IEIE

2000

Page 49: Javascript State of the Union 2015

IE7...wwwEmail SMTP IRC Netscape

Apache

IEIE

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

M.P.P

Athlon

Pentium

Pentium II

1970Fortran

Python

Ruby

PHP

Java

(Binding)

HTML HTML2

CSS

Javascript

2000

IEAjax JSON

XHTML

Page 50: Javascript State of the Union 2015

IE7...wwwEmail SMTP IRC Netscape

Apache

IEIE

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

1970Fortran

Python

Ruby

PHP

Java

(Binding)

HTML HTML2

CSS

Javascript

2000

Wikipedia

Netflix

Hotmail

Pentium III Pentium 4M.P.P

Athlon

Pentium

Pentium II

Ajax JSON

XHTML

Page 51: Javascript State of the Union 2015

O “Front-end” era praticamente declarativo.

Page 52: Javascript State of the Union 2015
Page 53: Javascript State of the Union 2015
Page 54: Javascript State of the Union 2015
Page 55: Javascript State of the Union 2015

Pentium III Pentium 4M.P.P

Athlon

Pentium

Pentium II

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

HTML HTML2

CSS

Javascript

2000

Wikipedia

Netflix

Hotmail

Ajax JSON

XHTML

IE7...wwwEmail SMTP IRC Netscape

Apache

IEIE

Page 56: Javascript State of the Union 2015

Pentium III Pentium 4M.P.P

Athlon

Pentium

Pentium II

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

HTML HTML2

CSS

Javascript

wwwEmail SMTP IRC Netscape

Apache

IE7...

Wikipedia

Netflix

Hotmail

Ajax JSON

XHTML

2000

Windows 3.1 iMac I Laptops

Page 57: Javascript State of the Union 2015

Pentium III Pentium 4M.P.P

Athlon

Pentium

Pentium II

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

HTML HTML2

CSS

Javascript

wwwEmail SMTP IRC Netscape

Apache

IE7...

Wikipedia

Netflix

Hotmail

Ajax JSON

XHTML

2000

Windows 3.1 iMac I LaptopsDual core

Quad core

Page 58: Javascript State of the Union 2015

Pentium III Pentium 4M.P.P

Athlon

Pentium

Pentium II

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

HTML HTML2

CSS

Javascript

wwwEmail SMTP IRC Netscape

Apache

IE7...

Wikipedia

Netflix

Hotmail

Ajax JSON

XHTML

2000

Windows 3.1 iMac I LaptopsDual core

Quad core

Firefox

Chrome

Page 59: Javascript State of the Union 2015

2000

Pentium III Pentium 4M.P.P

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

HTML HTML2

CSS

wwwEmail SMTP IRC IE7...

Wikipedia

Netflix

Hotmail

Ajax JSON

XHTML

Windows 3.1 iMac I LaptopsDual core

Quad core

Firefox

Chrome

Page 60: Javascript State of the Union 2015

Ajax JSON

XHTML

Wikipedia

Netflix

Hotmail

2000

Dojo

Prototype.js

Pentium III Pentium 4M.P.P

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

HTML HTML2

CSS

wwwEmail SMTP IRC IE7...

Dual core

Quad core

Firefox

Chrome

Page 61: Javascript State of the Union 2015
Page 62: Javascript State of the Union 2015

Ajax JSON

XHTML

Wikipedia

Netflix

Hotmail

2000

Dojo

Prototype.js

Pentium III Pentium 4M.P.P

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

HTML HTML2

CSS

wwwEmail SMTP IRC IE7...

Dual core

Quad core

Firefox

Chrome

Page 63: Javascript State of the Union 2015

Ajax JSON

XHTML

Wikipedia

Netflix

Hotmail

2000

Dojo

Prototype.js

Pentium III Pentium 4M.P.P

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

HTML HTML2

CSS

wwwEmail SMTP IRC IE7...

Dual core

Quad core

Firefox

Chrome

Facebook

Gmail

Page 64: Javascript State of the Union 2015

Ajax JSON

XHTML

Wikipedia

Netflix

Hotmail

2000

Dojo

Prototype.js

Pentium III Pentium 4M.P.P

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

HTML HTML2

CSS

wwwEmail SMTP IRC IE7...

Dual core

Quad core

Firefox

Chrome

Facebook

Gmail

ECMA5

Ajax boomRESTful

IE8

Page 65: Javascript State of the Union 2015

Como era o código nessa época?

Page 66: Javascript State of the Union 2015
Page 67: Javascript State of the Union 2015
Page 68: Javascript State of the Union 2015
Page 69: Javascript State of the Union 2015
Page 70: Javascript State of the Union 2015
Page 71: Javascript State of the Union 2015
Page 72: Javascript State of the Union 2015
Page 73: Javascript State of the Union 2015

Wikipedia

Netflix

Hotmail

2000

Dojo

Prototype.js

Pentium III Pentium 4M.P.P

AMD Yahoo eBay/Amazon

AltavistaW3C

Google

Ajax JSON

XHTMLHTML HTML2

CSS

wwwEmail SMTP IRC IE7...

Dual core

Quad core

Firefox

Chrome

Facebook

Gmail

ECMA5

Ajax boomRESTful

IE8

Page 74: Javascript State of the Union 2015

Python

Ruby

PHP

Java

(Binding) Node

2000

wwwEmail SMTP IRC IE7...

Firefox

Chrome

Dojo

Prototype.js

IE8

Ajax JSON

XHTMLHTML HTML2

CSS

ECMA5

Ajax boomRESTful

Page 75: Javascript State of the Union 2015
Page 76: Javascript State of the Union 2015

Ajax JSON

XHTMLHTML HTML2

CSS

ECMA5

Ajax boomRESTful

Python

Ruby

PHP

Java

(Binding) Node

2000

wwwEmail SMTP IRC IE7...

Firefox

Chrome

Dojo

Prototype.js

IE8

Page 77: Javascript State of the Union 2015

Ajax JSON

XHTMLHTML HTML2

CSS

ECMA5

Ajax boomRESTful

Python

Ruby

PHP

Java

(Binding) Node

2000

Dojo

Prototype.js

YUIjQuerymooToolsCoffeeScriptJavascriptMVC

Sass

Page 78: Javascript State of the Union 2015
Page 79: Javascript State of the Union 2015

Ajax JSON

XHTMLHTML HTML2

CSS

ECMA5

Ajax boomRESTful

Python

Ruby

PHP

Java

(Binding) Node

2000

Dojo

Prototype.js

YUIjQuerymooToolsCoffeeScriptJavascriptMVC

Sass

Page 80: Javascript State of the Union 2015

Ajax JSON

XHTMLHTML HTML2

CSS

ECMA5

Ajax boomRESTful

Dojo

Prototype.js

YUIjQuerymooToolsCoffeeScriptJavascriptMVC

Sass

iMac I Laptops iPhoneTouch 2

Google Car2000

Page 81: Javascript State of the Union 2015

Onde estamos.

Page 82: Javascript State of the Union 2015

2010-15.

Page 83: Javascript State of the Union 2015

i7, 6 cores12 threads

2010 2015

Page 84: Javascript State of the Union 2015

i7, 6 cores12 threads

iPhone iPadSmartTVs

2010 2015

Page 85: Javascript State of the Union 2015

i7, 6 cores12 threads

iPhone iPadSmartTVs

IE9

IE10 IE11

2010 2015

Page 86: Javascript State of the Union 2015

i7, 6 cores12 threads

HTML5

CSS3

ECMA5

Ajax boomRESTful

iPhone iPadSmartTVs

IE9

IE10 IE11

2010 2015

Page 87: Javascript State of the Union 2015

Trend de GUI e “componentização”.

Page 88: Javascript State of the Union 2015

“Modules speak to the rest of the

application when something interesting

happens and an intermediate layer

interprets and reacts to these

messages.”

Addy Osmani.

Page 89: Javascript State of the Union 2015

1. MV*.

2. Binding.

3. SPA.

4. Desktop/Mobile.

GUI

Page 90: Javascript State of the Union 2015
Page 91: Javascript State of the Union 2015

i7, 6 cores12 threads

HTML5

CSS3

ECMA5

Ajax boomRESTful

iPhone iPadSmartTVs

IE9

IE10 IE11

2010 2015

Page 92: Javascript State of the Union 2015

i7, 6 cores12 threads

IE9

IE10 IE11

HTML5

CSS3

ECMA5

Ajax boomRESTful

ExtJS

Processing

Mustache

Phonegap

Angular

Stylus

Three.js

Backbone

Knockout

Bootstrap

Underscore

Jasmine

Browserify

Ember

Socket.IO

Q

lodash

TodoMVC

Typescript

NPM

RxJSLess

2010 2015

Page 93: Javascript State of the Union 2015

i7, 6 cores12 threads

HTML5

CSS3

ECMA5

Ajax boomRESTful

IE9

IE10 IE11

ExtJS

Processing

Mustache

Phonegap

Angular

Stylus

Three.js

Backbone

Knockout

Bootstrap

Underscore

Jasmine

Browserify

Ember

Socket.IO

Q

lodash

TodoMVC

Typescript

NPM

RxJSLess

2010 2015

Page 94: Javascript State of the Union 2015

i7, 6 cores12 threads

HTML5

CSS3

ECMA5

Ajax boomRESTful

IE9

IE10 IE11

ExtJS

Processing

Mustache

Phonegap

Angular

Stylus

Three.js

Backbone

Knockout

Bootstrap

Underscore

Jasmine

Browserify

Ember

Socket.IO

Q

lodash

TodoMVC

Typescript

NPM

RxJSLess

2010 2015

Edge

ECMA6WebAssemblyIsomorphic

Page 95: Javascript State of the Union 2015

HTML5

CSS3

ECMA5

Ajax boomRESTful

IE9

IE10 IE11

ExtJS

Processing

Mustache

Phonegap

Angular

Stylus

Three.js

Backbone

Knockout

Bootstrap

Underscore

Jasmine

Browserify

Ember

Socket.IO

Q

lodash

TodoMVC

Typescript

NPM

RxJSLess

ECMA6WebAssemblyIsomorphic

Meteor

Momment

Drone

Webpack

Babel

Ionic

Immutable

React

Polymer

Aurelia

bacon.js

flow

Velocity

Maple

Relay

Angular 2

Cycle.js

Riot

Haml

Jade

2010 2015Edge

Page 96: Javascript State of the Union 2015

WTF? O que aconteceu?

Page 97: Javascript State of the Union 2015

Do spaghetti às GUIs.Onde estamos

Page 98: Javascript State of the Union 2015

1. AJAX.2. MVC.

3. Binding.

4. Modules.

Do Spaghetti às GUIs

Page 99: Javascript State of the Union 2015

Benefícios do Client-Side.Onde estamos

Page 100: Javascript State of the Union 2015

1. Experiência melhor.2. Mínimo no Back-End.3. Back-End independente.

4. Front-End independente.

Benefícios do Client-side

Page 101: Javascript State of the Union 2015

Problemas do Client-Side.Onde estamos

Page 102: Javascript State of the Union 2015

1. Página branca.2. SEO.3. Pode ser devagar.

4. Lógica duplicada.

5. Falta de escalabilidade.

Problemas do Client-side antes de 2015

Page 103: Javascript State of the Union 2015

Em 2015.

Page 104: Javascript State of the Union 2015

Uma possível solução.Onde estamos

Page 105: Javascript State of the Union 2015

1. Programação funcional reativa.2. Estruturas imutáveis.3. Query languages mais inteligentes.

Client-side em 2015, uma possível solução

Page 106: Javascript State of the Union 2015

1. Página branca.2. SEO.3. Pode ser devagar.

4. Lógica duplicada.

5. Falta de escalabilidade.

Problemas do Client-side antes de 2015

Page 107: Javascript State of the Union 2015

Para onde estamos indo.

Page 108: Javascript State of the Union 2015

Javascript.Para onde estamos indo

Page 109: Javascript State of the Union 2015

ES6/ES7/ES8/Macros.

Page 110: Javascript State of the Union 2015

Mais controle nos browsers.

Page 111: Javascript State of the Union 2015

Mais Back-End no Front.

Page 112: Javascript State of the Union 2015

Paralelismo e concorrência.

Page 113: Javascript State of the Union 2015

Offline e wearables.

Page 114: Javascript State of the Union 2015

Funcional.

Page 115: Javascript State of the Union 2015

Universal/Isomorphic.

Page 116: Javascript State of the Union 2015

Web Assembly.

Page 117: Javascript State of the Union 2015

2020.

Page 118: Javascript State of the Union 2015

2020:

• Código nas escolas.

• Mais de 1 milhão de empregos para programadores.

• Carros com IA.

• Drones de entrega, transporte e militares.

• Diagnósticos por IA.

• Realidade aumentada com SO.

• Impressão 3D.

• Pagamentos mobile.

• Reconhecimento de voz e de pessoa.

• Robôs.

• 4 milhões de motoristas desempregados.

Page 119: Javascript State of the Union 2015

2020:

• Elastic search, GraphQL e outras novas query languages.

• Apps offline.

• Wearables.

• Pós-React.

• IOT, bilhões de coisas pequenas conectadas na web.

• IOT industrial e militar.

• Smart homes.

• Empregos e empresas por IA.

Page 120: Javascript State of the Union 2015

Desemprego + Drones + IA + IOT + AR

Page 121: Javascript State of the Union 2015

Conclusão.

Page 122: Javascript State of the Union 2015

1. Por que tantas mudanças? 2. O que tem mudado? 3. O que não muda?

Conclusão:

Page 123: Javascript State of the Union 2015
Page 124: Javascript State of the Union 2015

Mas por que tantas mudanças?

Page 125: Javascript State of the Union 2015

O que nós fazemos?

Page 126: Javascript State of the Union 2015

Humans + Pain + Web = ∞

Page 127: Javascript State of the Union 2015

1. Aproximar à nossa realidade. 2. Ir além.

Web:

Page 128: Javascript State of the Union 2015

Nós resolvemos problemas.

Page 129: Javascript State of the Union 2015
Page 130: Javascript State of the Union 2015
Page 131: Javascript State of the Union 2015
Page 132: Javascript State of the Union 2015
Page 133: Javascript State of the Union 2015
Page 134: Javascript State of the Union 2015

Computadores evoluem. Se os princípios mudassem não haveria

base para evolução.

Page 135: Javascript State of the Union 2015

Agradecimentos:

• João Pagnoncelli.

• Rafael Gomes.

• Gabriel Godoy.

• Kevin Chevallier.

• Isabella Silveira.

• Douglas Monteiro.

• Marcos Rodrigues.

Page 136: Javascript State of the Union 2015

Fontes:

• https://en.wikipedia.org/wiki/Moore%27s_law

• https://en.wikipedia.org/wiki/Microprocessor_chronology

• https://en.wikipedia.org/wiki/Bell%27s_law_of_computer_classes

• https://en.wikipedia.org/wiki/Data_binding

• https://people.apache.org/~xli/presentations/history_Intel_CPU.pdf

• http://www.wolframalpha.com/docs/timeline/computable-knowledge-

history-5.html

• http://www.wolframalpha.com/docs/timeline/computable-knowledge-

history-6.html

• https://en.wikipedia.org/wiki/Timeline_of_computing

• https://en.wikipedia.org/wiki/History_of_computing_hardware

Page 137: Javascript State of the Union 2015

Fontes:

• https://en.wikipedia.org/wiki/Timeline_of_programming_languages

• https://medium.com/javascript-scene/get-ready-for-the-future-f4cf7610b985

• http://cdn.oreillystatic.com/news/graphics/prog_lang_poster.pdf

• http://www.worldsciencefestival.com/wp-content/uploads/2013/12/A-History-of-

Computer-Science.jpg

• http://archive.wired.com/images/article/magazine/1701/ff_mac3_f.jpg

• http://anddum.com/timeline/timelinepics/inteltimeline.gif

• http://brewhouse.io/images/posts/2015/05/frameworks-1-0.png

• http://webdesignergeeks.com/wp-content/uploads/2011/08/800px-

Web_development_timeline.png

• https://farm9.staticflickr.com/8529/8588701778_91aeb65377_o.png

Page 138: Javascript State of the Union 2015

Fontes:

• http://www.w3.org/2005/01/timelines/timeline-2500x998.png

• http://www.cooscountywatchdog.com/uploads/8/7/3/0/8730508/4030670.jpg?

697

• http://homepages.rpi.edu/home/37/clarkr6/public_html/images2/timeline.jpg

• http://images.hardwarecanucks.com/image//skymtl/CPU/INTEL-2014/

INTEL-2014-4.png

• http://i.imgur.com/NFysh.png

Page 139: Javascript State of the Union 2015

Obrigado.

@caiovaccaro /in/caiovaccaro /caiovaccaro

Page 140: Javascript State of the Union 2015

26 de Setembro, 2015