Download - Future of JavaScript
![Page 1: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/1.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Eyal VardiCEO E4D Solutions LTD
Microsoft MVP Visual C#site: www.e4d.co.il
“Everything that can be written in JavaScript
will eventually be written in JavaScript .”
(’ Atwood s law)
![Page 2: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/2.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
About Me
ConsultingMentoringProjects
![Page 3: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/3.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
JavaScript History
![Page 4: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/4.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
In The Beginning... In 1995 Netscape hired a young lad by
the name of Brenden Eich to take charge of designing a new language.
Eich decided to create a loosly-typed scripting language that will appeal to web developers.
By December of 1995 'LiveScript' is born! (and quickly renamed 'JavaScript')
![Page 5: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/5.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Standardization With the mess created by IE3's JScript
Netscape, Sun and ECMA decide to standardize JavaScript and create 'ECMAScript‘.
In the meantime, Netscape and Microsoft releases the '4.0' browser generation, each with its own implementation of the DOM.
![Page 6: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/6.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
ECMAScript Versions
![Page 8: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/8.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
![Page 9: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/9.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
![Page 10: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/10.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
HTML 5 )Changes The Rules of The
Game(
![Page 11: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/11.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Single Page Web Apps (SPA)
![Page 12: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/12.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Traditional apps
Browser Request
Index.html
MVC4
Traditional Request / Response for ALL rendered content and assets
![Page 13: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/13.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Web Application (SPA)
Initial Request
Application.htm
MVC4
RequireJS Loader
Page1 Partial.htm
IndexViewModel.js
Application.js (bootstrap)
ViewModel (#index)
ViewModel (#login)
Model (LoginModel)JSON Requests
HTML5 localstorage
Handling disconnection
![Page 14: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/14.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Web App Building Block
Comm
unication
DAL
UI
BL (MV*)
Offline Storage
Entities
Module Module Module
Server
![Page 15: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/15.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
The Challenge with Web Apps (SPA) DOM Manipulation Routing Templates & Data Binding Ajax Modules History Caching Validations Testing
![Page 16: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/16.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
![Page 17: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/17.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
![Page 18: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/18.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Web API Growth
Source: www.programmableweb.com – current APIs: 4,535
![Page 19: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/19.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
WCF vs. ASP.NET Web API
SOAP WSDL HTTP
![Page 20: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/20.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
POST SimpleService.asmx/EchoString HTTP/1.1 Host: localhost:1489 User-Agent: Mozilla/5.0 Accept: text/html Content-Type: application/json; Content-Length: 27 ...
XML, JSON, SOAP, AtomPub ...
HTTP Communication
Headers
Data
Verb URL
![Page 21: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/21.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
POST SimpleService.asmx/EchoString HTTP/1.1 Host: localhost:1489 User-Agent: Mozilla/5.0 Accept: text/html,application/xhtml+xml Content-Type: application/json; Content-Length: 27 ...
JSON vs. SOAP
{"Age":37,"FirstName":"Eyal",
"ID":"123", "LastName":"Vardi“ }
Headers
Data
Verb URL
<Envelope> <Header> <!–- Headers --> <!-- Protocol's & Polices --> </Header> <Body> <!– XML Data --> </Body> </Envelope>
![Page 28: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/28.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Node.js Building Blocks
libuv V8Js, C+
+Node.
js
Google JavaScript engine
A high performance, cross-platform evented I/O library
![Page 29: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/29.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Node.JS Advantages
Architecture
Single Thread
App == Server
Middleware
Deployment
XCopy
Run
Everywhere
Community
53,228
Packages
2.5M Download
in day.
Tools
![Page 31: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/31.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Microsoft And Node.js
Today’s release enables Custom APIs to
be written using Node.js (we will support
writing Custom APIs in .NET as well in a
future release)…
Scott Guthrie Corporate Vice President in the Microsoft Server and Tools Business.
![Page 33: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/33.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Everything’s Gone JavaScript “Everything that can be written in
JavaScript will eventually be written in JavaScript”. – Atwood’s law
JavaScript is now an integral part of several operating systems: Windows 8 Firefox OS Gnome (Linux) Chrome OS (Chromebooks)
![Page 34: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/34.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
The Hardware World JavaScript is also moving quickly into the
hardware world:
Arduino
Tessel
Espruino
Nodebots
![Page 35: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/35.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
What’s new in ECMAScript 6.0 JavaScript history
Syntax
Functions
Classes
Collections
Iterators &
Generators
Modules
Template String
Modules
Proxy
![Page 36: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/36.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
ParallelJS Parallelizes JavaScript code that uses the
array methods mapPar(), filterPar() and reducePar().
Array.prototype.mapPar()
Array.prototype.filterPar()
Array.prototype.reducePar()
Thread 2
Thread 4
Thread 1Thread 3Thread 1
![Page 38: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/38.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Near-Native Performance (ASM.JS)
* Chrome and Opera Optimize for Mozilla-Pioneered Asm.js
![Page 39: Future of JavaScript](https://reader036.vdocuments.net/reader036/viewer/2022062405/554f4f0db4c905b9508b4c19/html5/thumbnails/39.jpg)
© 2013 E4D LTD. All rights reserved. Tel: 054-5-767-300, Email: [email protected]
Thankseyalvardi.wordpress.com
Eyal VardiCEO E4D Solutions LTDMicrosoft MVP Visual C#blog: www.e4d.co.il