32
Client/Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/ Server Relationship 27 NOVEMBER 2012 Wednesday, November 28, 12

Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Embed Size (px)

DESCRIPTION

- Device Access Within the Browser - Client Side Processing w/ Background Threads - Device Detection and Descriptors / - Adaptive Frameworks - HTML5 Connectivity Revolution and HTTP 2.0 - Single Runtime, Shared Syntax - Embedded JavaScript

Citation preview

Page 1: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Client/Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship27 NOVEMBER 2012

Wednesday, November 28, 12

Page 2: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

@jdcravensgithub.com/jessecravensjessecravens.comhtml5hacks.com

HacksHTML5

Tips & Tools for Creating Interactive Web Applications

Jesse Cravens & Jeff Burtoft

Wednesday, November 28, 12

Page 3: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

node.JS HacksSummer 2013

HACKS

Wednesday, November 28, 12

Page 4: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Client/Server 3.0: 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Wednesday, November 28, 12

Page 5: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

6 ways JavaScript is Revolutionizing the Client/Server Relationship

•Device Access Within the Browser•Client Side Processing w/ Background Threads•Device Detection and Descriptors / Adaptive Frameworks•HTML5 Connectivity Revolution and HTTP 2.0•Single Runtime, Shared Syntax•Embedded JavaScript

5

Wednesday, November 28, 12

Page 6: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

#1 Device Access within the Browser

•Adobe Cordova (phoneGap)•Device API is now defunct.•getUserMedia/Stream API (no native IE support ... yet?)•GeoLocation API broad support (except IE8)•Device Orientation, Device Motion, (poorly supported /

hacky)

6

The Client Gets Smarter.JavaScript Device APIs continue to evolve, allowing more access to device hardware, services and applications such as the camera, microphone, system sensors, native address books, calendars and native messaging applications.

Wednesday, November 28, 12

Page 7: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

7

Wednesday, November 28, 12

Page 8: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

8

Wednesday, November 28, 12

Page 9: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

9

Wednesday, November 28, 12

Page 10: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

GeoLocation Hacksfrom ‘HTML5 Hacks’

Wednesday, November 28, 12

Page 11: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Device Orientation Hacksfrom ‘HTML5 Hacks Xtra’

Wednesday, November 28, 12

Page 12: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

#2: Client-Side Background Threads

•Browser runs a single threaded, event loop• Dedicated Web Workers• Shared Web Workers

•Async Programming Models, Reactionary Systems• Interpreters are Maturing (V8)

12

The Client Gets More Powerful.Web Workers API enables background threads in the browser, making heavy computations realistic.

Wednesday, November 28, 12

Page 13: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

13

Wednesday, November 28, 12

Page 14: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Web Workers Hacksfrom ‘HTML5 Hacks’

Wednesday, November 28, 12

Page 15: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

#3: Device Detection and Adaptive/Responsive Frameworks

•CSS3 Media Queries•Responsive Grids•Modernizr•Polyfill Support - Cross Platform Compliance•Adaptive Frameworks (UA Sniffing - Maps to Templates)•State of DDRs (Device Description Repositories)• W3C Device Description Working Group (DDWG) (closed 2008)• WURFL (commercial Oct 2011)• OpenDDR - based on W3C's DDR Simple API, .NET, Java• Device Atlas

15

Wednesday, November 28, 12

Page 16: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

16

Wednesday, November 28, 12

Page 17: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

ResponderJSwith Fn-Responsive

Wednesday, November 28, 12

Page 18: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

#4: HTML5 Connectivty Revolution and HTTP 2.0

•Web Sockets API•XHR2•Event Source and Server Sent Events•SPDY•CORS

18

Wednesday, November 28, 12

Page 19: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

19

http://marakana.com/s/peter_lubbers_the_html5_connectivity_revolution_devcon5,1170/index.html

HTML5 Connectivity

Wednesday, November 28, 12

Page 20: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

19

http://marakana.com/s/peter_lubbers_the_html5_connectivity_revolution_devcon5,1170/index.html

HTML5 Connectivity

Wednesday, November 28, 12

Page 21: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

20

Wednesday, November 28, 12

Page 22: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

21

Wednesday, November 28, 12

Page 23: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

22

Wednesday, November 28, 12

Page 24: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

23

Wednesday, November 28, 12

Page 25: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

RobodeckSocket.io Driven Collaborative Presentations

Wednesday, November 28, 12

Page 26: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

node-spdyHello World

Wednesday, November 28, 12

Page 27: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

#5: Single Language, Shared Syntax•Node Streams - IO as it should be• Linux Pipes• Modular• Different Types of Streams

•Browserify - Build tool to Normalize APIs between Client/Server• node-browserify - adds require()• http-browserify - adds http()

•DomNode - wrap common I/O bound APIs in node style stream

•Browser-stream - open pipable streams to and from the browser, with Socket.io

26

Node.js has enabled the same language, single runtime. But, the paradigms are still quite different. Next steps are shared APIs.

Wednesday, November 28, 12

Page 28: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Node Streamsfrom NodeJSHacks

Wednesday, November 28, 12

Page 29: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

5 OCT 2012DEVCON5 HTML5 Summit

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

#6 Embedded JavaScript•more and more JavaScript Ubiquity• JavaScript Arduino Wrappers• Noduino• Johnny Five

•Server moves to the Client• Beaglebone (Angstrom Linux)• Bonescript

•Mongoose ORM• Mongo JavaScript CLI

•node-ar-drone

28

There is a barrier of entry to learning SQL, C and C++, and Linux. JavaScript is opening new worlds for Developers.

Not to mention, the server is now on the client.

Wednesday, November 28, 12

Page 30: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Embedded NodeJSfrom NodeJSHacks

Wednesday, November 28, 12

Page 31: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Image APIDragDrop, XHR2 FormData, Express Restful Services

Wednesday, November 28, 12

Page 32: Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Relationship

© 2012 frog. All rights reserved.

Wednesday, November 28, 12