81
FAST SLIM CORREC / John Dalziel / @crashposition / Worthing Digital / 7th November 02013 / The Story Of How THE “GLUE OF THE INTERNET” BECAME THE WORLD’S MOST POPULAR PROGRAMMING LANGUAGE image: http://imgur.com/7pOwI

Fast Slim Correct: The History and Evolution of JavaScript

  • View
    1.843

  • Download
    0

Embed Size (px)

DESCRIPTION

A look back at how JavaScript has evolved over the past 18 years - how it broke out of the browser and can now be found in the most unexpected places. Presented at Worthing Digital, 7th Nov 2013.

Citation preview

Page 1: Fast Slim Correct: The History and Evolution of JavaScript

FASTSLIMCORRECT

/ John Dalziel / @crashposition / Worthing Digital / 7th November 02013

/ The Story Of HowTHE “GLUE OF THE INTERNET” BECAME THE WORLD’S MOST POPULAR PROGRAMMING LANGUAGE

image: http://imgur.com/7pOwI

Page 2: Fast Slim Correct: The History and Evolution of JavaScript

[SPOILER] JAVASCRIPTis the Glue Of The Internet

/ FAST SLIM CORRECT

Page 3: Fast Slim Correct: The History and Evolution of JavaScript

THE RACE FOR SPEEDTHE RACE FOR SPEED

http://creativejs.com/2013/06/the-race-for-speed-part-1-the-javascript-engine-family-tree/http://creativejs.com/2013/06/the-race-for-speed-part-2-how-javascript-compilers-work/http://creativejs.com/2013/06/the-race-for-speed-part-3-javascript-compiler-strategies/http://creativejs.com/2013/06/the-race-for-speed-part-4-the-future-for-javascript/

/ FAST SLIM CORRECT

Page 4: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

What is JavaScript?some History bitssome Science bitssome Examples

Page 5: Fast Slim Correct: The History and Evolution of JavaScript

RECIPE: + + + HTML

/ FAST SLIM CORRECTJAVASCRIPT RECIPES

A WEB BROWSER

A JAVASCRIPT ENGINE

JAVASCRIPT CODE

HTML CODE

Page 6: Fast Slim Correct: The History and Evolution of JavaScript

WHAT IS JAVASCRIPT?a native programming language for the web

/ FAST SLIM CORRECT

Page 7: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

CSS

JavaScript

ANATOMY OF A MODERN WEB

PAGE

Page 8: Fast Slim Correct: The History and Evolution of JavaScript

ANATOMY OF A MODERN WEB

PAGE

/ FAST SLIM CORRECT

DEMO

Page 9: Fast Slim Correct: The History and Evolution of JavaScript

JAVASCRIPT IS USEFUL

/ FAST SLIM CORRECT

WEB LANGUAGESKEYBOARD, MOUSE & TOUCH

WEB SERVERS & APIsMONITOR & SPEAKERS

Page 10: Fast Slim Correct: The History and Evolution of JavaScript

JAVASCRIPT IS EVERYWHERE

/ FAST SLIM CORRECT

•JavaScript is built into the BROWSER

•on 6 million TABLETS,

•on over 1 billion SMARTPHONES,

•on over 2 billion COMPUTERS,

•and in plenty of other places to...

Page 11: Fast Slim Correct: The History and Evolution of JavaScript

JAVASCRIPT IS POPULAR

/ FAST SLIM CORRECT

http://redmonk.com/sogrady/2013/02/28/language-rankings-1-13/

Page 12: Fast Slim Correct: The History and Evolution of JavaScript

“JavaScript is 18...now it’s not my responsibility;

it can go out, vote, join the Navy,get drunk and gamble in most states.”

BRENDAN EICHMOZILLA, 2013

/ FAST SLIM CORRECT

Page 13: Fast Slim Correct: The History and Evolution of JavaScript

HELLO WORLDthe History Bit: Part 1

/ FAST SLIM CORRECT

Page 14: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

1995

Page 15: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

THE WEB in 19951995

Page 16: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

THE WEB in 19951995

Page 17: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

THE WEB in 19951995

Page 18: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

THE WEB in 19951995

Page 19: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

HTML

ANATOMY of a WEB PAGE

1995

Page 20: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTINTERNET EXPLORER vs

NETSCAPE

1995

Page 21: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTNETSCAPE’S VISION FOR JAVASCRIPT

1995

“We aimed to provide a “glue language” for the Web designers and part time programmers who

were building Web content from components such as images, plugins,

and Java applets.”

“We saw Java as the “component language” used by higher-priced

programmers.”

Page 22: Fast Slim Correct: The History and Evolution of JavaScript

Joins NETSCAPE in April 1995.

/ FAST SLIM CORRECT

BRENDAN EICH1995

DESIGNS MOCHALIVESCRIPTJAVASCRIPT...IN 10

DAYS

Page 23: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT“IT COULD HAVE BEEN WORSE”

eval()

global objects

with(){}

closures

prototypes

first class functions

array = []

obj = {}

JAVA

SCHEME

SELF}}

1995

Page 24: Fast Slim Correct: The History and Evolution of JavaScript

BECOMING USEFULthe History Bit: Part 2

/ FAST SLIM CORRECT

Page 25: Fast Slim Correct: The History and Evolution of JavaScript

“It may be slow. But it’s hard to use.”

ANDREW S TANENBAUMregarding the IBM PC

/ FAST SLIM CORRECT

http://www.gdargaud.net/Humor/QuotesHardwareSoftware.html

Page 26: Fast Slim Correct: The History and Evolution of JavaScript

RECIPE: + + + HTML

/ FAST SLIM CORRECT

DHTMLFORM VALIDATION

1995 - 2000

TICKERS & POP UPS

DEMO

ROLLOVERS

DEMO

DYNAMIC HTML

Page 27: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

XHR2000

RECIPE: + + + HTML + XHR

2005

GOOGLE MAPS

2004

GOOGLE MAIL

2000

OUTLOOK WEB

XMLHttpRequest

Page 28: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

AJAX2005

RECIPE: + + + HTML + XHR + XML

JESSE JAMES GARRETT

ASYNCHRONOUS JAVASCRIPT and XML

Page 29: Fast Slim Correct: The History and Evolution of JavaScript

THINGS inside THINGSthe Science Bit: Part 1

/ FAST SLIM CORRECT

The difference between: a Web Browser a JavaScript Engine a JavaScript Compiler

Page 30: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

a WEB BROWSER

WEB BROWSER

Page 31: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTinside a WEB BROWSER

USER INTERFACE

BROWSER ENGINE

RENDERING ENGINE

JS ENGINENETWORKING

DA

TA

DISPLAY

WEB BROWSER

Page 32: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTinside a WEB BROWSER

USER INTERFACE

BROWSER ENGINE

RENDERING ENGINE

DA

TA

WEB BROWSER

JS ENGINENETWORKING DISPLAY

Page 33: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTa JAVASCRIPT ENGINE

WEB BROWSER

JAVASCRIPT ENGINE

Page 34: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTinside a JAVASCRIPT

ENGINE

LEXER PARSER

TRANSLATOR

INTERPRETERNATIVE

CODE

TOKENSAST

BYTE CODE

WEB BROWSER

JAVASCRIPT ENGINE

Page 35: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTa JAVASCRIPT COMPILER

COMPILER COMPILER

COMPILERCOMPILERNATIVE CODE

TOKENSAST

BYTE CODE

WEB BROWSER

JAVASCRIPT ENGINE

Page 36: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTBROWSER / ENGINE /

COMPILER

COMPILER COMPILER

COMPILERCOMPILER

WEB BROWSER

JAVASCRIPT ENGINE

Page 37: Fast Slim Correct: The History and Evolution of JavaScript

FAST, SLIM, CORRECTthe History Bit: Part 3

/ FAST SLIM CORRECT

Page 38: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTFAST, SLIM, CORRECT

Fast

Slim

Correct

Faster code can accomplish more work in less time.Faster code can tackle more complex tasks.

Slim code downloads faster.Some slim code can compile faster.

Correct code will do what you expected.

Page 39: Fast Slim Correct: The History and Evolution of JavaScript

“Fast, Slim, Correct. Pick any two, so long as one is correct.”

BRENDAN EICH, MOZILLAregarding JavaScript compilers

/ FAST SLIM CORRECT

Page 40: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTJAVASCRIPT ENGINE FAMILY

TREE

1998

Fast Slim Correct

JAVASCRIPT in 1998

Page 41: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

WEB STANDARDS

Fast Slim Correct

JAVASCRIPT after 1998

1998+

Page 42: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTLIBRARIES and MINIFIERS

2006+

Fast Slim Correct

JAVASCRIPT in 2006

var dateRE = /^createdOnid/;var dates=[], els=document.getElementsByTagName('*');for (var i=els.length;i--;) {if (dateRE.test(els[i].id]) {

dates.push(els[i])}};

JAVASCRIPT

var dates = $('*[id^="createdOnid"]');

JQUERY

Page 43: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTJAVASCRIPT ENGINE FAMILY

TREE

2006

Fast Slim Correct

JAVASCRIPT in 2006

Page 44: Fast Slim Correct: The History and Evolution of JavaScript

MAKING JS FASTthe Science Bit: Part 2

/ FAST SLIM CORRECT

How to make JavaScript Fast

Page 45: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTinside a JAVASCRIPT

ENGINE

LEXER PARSER

TRANSLATOR

INTERPRETERNATIVE

CODE

TOKENSAST

BYTE CODE

WEB BROWSER

JAVASCRIPT ENGINE

Page 46: Fast Slim Correct: The History and Evolution of JavaScript

THE RACE FOR SPEEDTHE RACE FOR SPEED

http://creativejs.com/2013/06/the-race-for-speed-part-1-the-javascript-engine-family-tree/http://creativejs.com/2013/06/the-race-for-speed-part-2-how-javascript-compilers-work/http://creativejs.com/2013/06/the-race-for-speed-part-3-javascript-compiler-strategies/http://creativejs.com/2013/06/the-race-for-speed-part-4-the-future-for-javascript/

/ FAST SLIM CORRECT

Page 47: Fast Slim Correct: The History and Evolution of JavaScript

magic happens...

magic happens...JAVASCRIPT

FAST NATIVE CODE

/ FAST SLIM CORRECT

Page 48: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTJAVASCRIPT ENGINE FAMILY

TREE

2008+

Fast Slim Correct

JAVASCRIPT after 2008

Page 49: Fast Slim Correct: The History and Evolution of JavaScript

“any application that can be written in JavaScript, will eventually be written in JavaScript”

JEFF ATWOODSTACKOVERFLOW, 2009

/ FAST SLIM CORRECT

Page 50: Fast Slim Correct: The History and Evolution of JavaScript

JAVASCRIPT APPLICATIONSGames and Applications

/ FAST SLIM CORRECT

Page 51: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTJAVASCRIPT APPLICATIONSGAMES

RECIPE: + + + + WebGL

Page 52: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTJAVASCRIPT APPLICATIONSINTERACTIVE DATA VISUALISATION

RECIPE: + + +

Page 53: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTJAVASCRIPT APPLICATIONSCOMMUNICATION

RECIPE: + + + + WebRTC

GOOGLE HANGOUTS

FACEBOOK CHAT

Page 54: Fast Slim Correct: The History and Evolution of JavaScript

JAVASCRIPT AS EVERYTHINGCompilers and Emulators

/ FAST SLIM CORRECT

Page 55: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

http://copy.sh/v24/http://bellard.org/jslinux/

http://archive.vg/blog/12-feature/114-a-big-list-of-browser-based-emulators-and-ports-of-classic-games

JAVASCRIPT as EMULATORPC, LINUX, APPLE II, C64, NES, ZX

SPECTRUM, ATARI ST, AMIGA...

http://estyjs.azurewebsites.net/ http://jsspeccy.zxdemo.org/

RECIPE: + + +

Page 56: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

http://www.teamten.com/lawrence/projects/turbo_pascal_compiler/demo/

https://github.com/mozilla/narcissus

JAVASCRIPT as COMPILERPASCAL, LUA, SMALLTALK, JAVASCRIPT

RECIPE: + + +

Page 57: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT2013

RECIPE: + + + +

http://vimeo.com/77289033

JAVASCRIPT as MONEYBITCOIN WALLET

Page 58: Fast Slim Correct: The History and Evolution of JavaScript

EVERYTHING AS JAVASCRIPTCross-Compilers and LLVM

/ FAST SLIM CORRECT

Page 59: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTCOMPILE to JAVASCRIPTCOFFEESCRIPT, TYPESCRIPT, DART to

JAVASCRIPT

Page 60: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTCOMPILE to JAVASCRIPTLLVM to JAVASCRIPT

Page 61: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

C CLANG

COMPILE to JAVASCRIPTC to LLVM to JAVASCRIPT

Page 62: Fast Slim Correct: The History and Evolution of JavaScript

“JavaScript is assembly language for the web.”

SCOTT HANSELMANMICROSOFT, 2011

/ FAST SLIM CORRECT

Page 63: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

asm.js

DEMO

CLANG

COMPILE to JAVASCRIPTUNREAL ENGINE 3 to JAVASCRIPT

Page 64: Fast Slim Correct: The History and Evolution of JavaScript

JAVASCRIPT AS DATAJSON

/ FAST SLIM CORRECT

Page 65: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

JSON2006

RECIPE: +

DOUGLAS CROCKFORD

<Person> <name>Douglas Crockford</name> <discovers>JSON</discovers> <employer>Yahoo</employer></Person>

XML{“name”:”Douglas Crockford”, ”discovers”:”JSON”, employer:”Yahoo”}

JSON

JAVASCRIPT OBJECT NOTATION

Page 66: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

JSON2006

RECIPE: +

NOSQL DATABASES

Page 67: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

JSON2006

RECIPE: +

http://www.wiredprairie.us/blog/index.php/archives/1754

NEST THERMOSTAT

Page 68: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

JSON2006

RECIPE: +

http://www4.mercedes-benz.com/manual-cars/ba/foss/content/en/assets/FOSS_licences.pdf

MERCEDES S CLASS

Page 69: Fast Slim Correct: The History and Evolution of JavaScript

JAVASCRIPT ON A SERVERNodeJS

/ FAST SLIM CORRECT2009

Page 70: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

JAVASCRIPT ENGINE

NODEJSJAVASCRIPT ENGINE ON THE SERVER

2009

Page 71: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

NODEJSDESKTOP AUTOMATION

RECIPE: + +

PHOTOSHOP GENERATORGRUNT

2009

Page 72: Fast Slim Correct: The History and Evolution of JavaScript

JAVASCRIPT ON HARDWAREMicroPCs and MicroControllers

/ FAST SLIM CORRECT

Page 73: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTCOMPUTER ON A BOARDRASPBERRY PI

Page 74: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

http://theoreticalideations.com/2013/09/03/its-alive-my-node-jsrasperry-pi-powered-aquarium-is-up-and-running/

COMPUTER ON A BOARDRASPBERRY PI AQUARIUM

RECIPE: + + + + Aquarium

Page 75: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECTMICROCONTROLLERSARDUINO, BEAGLEBOARD, TESSEL, LEGO MINDSTORMS-NXT

https://nodejsmodules.org/tags/legohttp://tessel.io/http://beagleboard.org/support/bonescript/https://github.com/rwaldron/johnny-five

RECIPE: + +

Page 76: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

http://glench.com/make/nodejs-robot/

RECIPE: + + + Arduino + Robot

ROBOTSNODEJS WiFi-EXTENDING ROBOT

Page 77: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

https://github.com/felixge/node-ar-drone

ROBOTSPARROT AR DRONE 2.0

RECIPE: + + + AR Drone

Page 78: Fast Slim Correct: The History and Evolution of JavaScript

WHAT HAVE WE LEARNED?Please Make It Stop Now

/ FAST SLIM CORRECT

Page 79: Fast Slim Correct: The History and Evolution of JavaScript

/ FAST SLIM CORRECT

C, JAVALUA, PASCAL

Page 80: Fast Slim Correct: The History and Evolution of JavaScript

THANK YOUFor Your Time

/ FAST SLIM CORRECT

Page 81: Fast Slim Correct: The History and Evolution of JavaScript

FASTSLIMCORRECT

/ John Dalziel / @crashposition / Worthing Digital / 7th November 02013

/ The Story Of HowTHE “GLUE OF THE INTERNET” BECAME THE WORLD’S MOST POPULAR PROGRAMMING LANGUAGE

image: http://imgur.com/7pOwI