Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Client Server 3.0

Jesse Cravens
November 28, 2012

Client Server 3.0

6 Ways JavaScript is Revolutionizing the Client/Server Relationship

Talk from Devcon5 - San Francisco on 11.28.2012. covering:
- 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

Jesse Cravens

November 28, 2012
Tweet

More Decks by Jesse Cravens

Other Decks in Technology

Transcript

  1. Client/Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/

    Server Relationship 27 NOVEMBER 2012 Wednesday, November 28, 12
  2. @jdcravens github.com/jessecravens jessecravens.com html5hacks.com Hacks HTML5 Tips & Tools for

    Creating Interactive Web Applications Jesse Cravens & Jeff Burtoft Wednesday, November 28, 12
  3. 5 OCT 2012 DEVCON5 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
  4. 5 OCT 2012 DEVCON5 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
  5. 5 OCT 2012 DEVCON5 HTML5 Summit 6 Ways JavaScript is

    Revolutionizing the Client/Server Relationship 7 Wednesday, November 28, 12
  6. 5 OCT 2012 DEVCON5 HTML5 Summit 6 Ways JavaScript is

    Revolutionizing the Client/Server Relationship 8 Wednesday, November 28, 12
  7. 5 OCT 2012 DEVCON5 HTML5 Summit 6 Ways JavaScript is

    Revolutionizing the Client/Server Relationship 9 Wednesday, November 28, 12
  8. 5 OCT 2012 DEVCON5 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
  9. 5 OCT 2012 DEVCON5 HTML5 Summit 6 Ways JavaScript is

    Revolutionizing the Client/Server Relationship 13 Wednesday, November 28, 12
  10. 5 OCT 2012 DEVCON5 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
  11. 5 OCT 2012 DEVCON5 HTML5 Summit 6 Ways JavaScript is

    Revolutionizing the Client/Server Relationship 16 Wednesday, November 28, 12
  12. 5 OCT 2012 DEVCON5 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
  13. 5 OCT 2012 DEVCON5 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
  14. 5 OCT 2012 DEVCON5 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
  15. 5 OCT 2012 DEVCON5 HTML5 Summit 6 Ways JavaScript is

    Revolutionizing the Client/Server Relationship 20 Wednesday, November 28, 12
  16. 5 OCT 2012 DEVCON5 HTML5 Summit 6 Ways JavaScript is

    Revolutionizing the Client/Server Relationship 21 Wednesday, November 28, 12
  17. 5 OCT 2012 DEVCON5 HTML5 Summit 6 Ways JavaScript is

    Revolutionizing the Client/Server Relationship 22 Wednesday, November 28, 12
  18. 5 OCT 2012 DEVCON5 HTML5 Summit 6 Ways JavaScript is

    Revolutionizing the Client/Server Relationship 23 Wednesday, November 28, 12
  19. 5 OCT 2012 DEVCON5 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
  20. 5 OCT 2012 DEVCON5 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