End-to-end  W3C APIs   By Alexandre MorgautJS.everywhere(2012) Europe
Presentation•   Wakanda Community manager•   W3C AC member•   Web Architect•   JS Expert, REST Lover, NoSQL Fanboy•   W3C ...
Agenda• The World Wide Web• The Standards• Server-Side JavaScript• Web Applications• Now & Tomorrow
The World Wide Web
The Web• WWW: WorldWideWeb  (aka “Hypertext Project”) • UDI: Uniform Document Identifier • HTML: Hypertext Markup Language...
REST• Representational State Transfer • Client-Server • Stateless, Cache, Uniform Interface • Layered System • Code on Dem...
Web Standards
W3C• Created at the MIT in 1994• Led by Tim Berners-Lee and Dr. Jeffrey Jaffe• Joint agreement among three "Host Instituti...
IANA• Internet Assigned Numbers Authority• created by Jon Postel and Joyce K. Reynolds• department of ICANN Names and Numb...
IETF• Internet Engineering Task Force• organized activity of the Internet Society (ISOC)• cooperates with W3C & ISO/IEC• m...
ECMA•   European Computer Manufacturers Association•   Standards    •   CD-ROM, ECMAScript, C#, Office Open XML File Forma...
WaSP•   Web Standards Project•   founded in 1998 by Georges Olsen, Glenn Davis, & Jeffrey Zeldman•   convinced in 2001    ...
WHATWG•   Web Hypertext Application Technology Working Group•   founded in 2004 by individuals from Apple, the Mozilla & O...
CommonJS•   created in 2009 by Kevin Dangoor as ServerJS on Mozilla Wiki    •   standards for JavaScript on the server    ...
Server-Side JavaScript
Engines• Mozilla SpiderMonkey• Mozilla Rhino• Webkit JavaScriptCore• Google V8• Microsoft Chakra• Opera Carakan
Standards• ECMAScript• CommonJS
Servers• Microsoft IIS• Persevere• Jaxer• node.js• Wakanda• RingoJS• SilkJS
NoSQL Databases• CouchDB• MongoDB• Riak• WakandaDB• ArangoDB• OrientDB
More than 60Server-Side JavaScript  implementations
Web Application “1.0”
HTML5 APIs• XMLHttpRequest 2    • Web Cryptography• Blob                • ImageData• File / FileSystem   • Typed Arrays• W...
WebCL“This section proposes mechanisms fortransferring pixel data between WebCLmemory objects and HTML media elements.Serv...
Web SQL“This document was on the W3CRecommendation track but specification workhas stopped. The specification reached anim...
Web SQL“This document was on the W3CRecommendation track but specification workhas stopped. The specification reached anim...
Web SQL“This document was on the W3CRecommendation track but specification workhas stopped. The specification reached anim...
Async & Sync• XMLHttpRequest(method, url, async)• FileReaderSync()• requestFileSystemSync()• openDatabaseSync()• indexedDB...
IndexedDB“The synchronous database API methodsprovide a blocking access pattern to IndexedDBdatabases. Since they block th...
Web Workers• Dedicated or Shared• No Window, No Document• WorkerGlobal, WorkerUtils• WorkerNavigator, WorkerLocation• post...
Concept• Server JS contexts == Workers • multi-threaded -> Dedicated Workers • single threaded EventLoop -> Shared• Server...
Now & Tomorrow
RingoJS• W3C • Web Worker• CommonJS • Modules • System, fs, binary, IO, Unit Test• Other: console
SilkJS• W3C • XMLHttpRequest• CommonJS • Modules
node.js• W3C via modules • XMLHttpRequest (node-xmlhttprequest) • Web Sockets (node-websocket-client) • DOM (node-o3-fastx...
Wakanda• W3C • XMLHttpRequest, WindowTimer, • Web Storage, Web Worker, • File, FileSystem, Blob, ...• CommonJS • Modules, ...
Wakanda extensions• Web Storage • sessionStorage + user.storage & storage• Web Workers • Worker & SharedWorker + SystemWor...
Server-SideJavaScript ContextCommonJS (module.id, require, ...)Worker (importScripts, WindowTimer, ...)
Summary•   ECMAScript is already everywhere•   Modules: CommonJS already standard, AMD, ECMAScript 6•   Many W3C APIs alre...
Client and Server JavaScript APIs     W3C Community Grouphttp://www.w3.org/community/jseverywhere/
Upcoming SlideShare
Loading in …5
×

End to-end W3C - JS.everywhere(2012) Europe

1,906 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,906
On SlideShare
0
From Embeds
0
Number of Embeds
60
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

End to-end W3C - JS.everywhere(2012) Europe

  1. 1. End-to-end W3C APIs By Alexandre MorgautJS.everywhere(2012) Europe
  2. 2. Presentation• Wakanda Community manager• W3C AC member• Web Architect• JS Expert, REST Lover, NoSQL Fanboy• W3C “jseverywhere“ community group @amorgaut
  3. 3. Agenda• The World Wide Web• The Standards• Server-Side JavaScript• Web Applications• Now & Tomorrow
  4. 4. The World Wide Web
  5. 5. The Web• WWW: WorldWideWeb (aka “Hypertext Project”) • UDI: Uniform Document Identifier • HTML: Hypertext Markup Language • HTTP: Hypertext Transfer Protocol• created in 1989 by Tim Berners-Lee
  6. 6. REST• Representational State Transfer • Client-Server • Stateless, Cache, Uniform Interface • Layered System • Code on Demand: JavaScript• defined in 2000 by Roy Thomas Fielding
  7. 7. Web Standards
  8. 8. W3C• Created at the MIT in 1994• Led by Tim Berners-Lee and Dr. Jeffrey Jaffe• Joint agreement among three "Host Institutions" • MIT, ERCIM, Keio University• Working Groups • HTML, MathML, RDF, SVG, CSS, Audio, Device...
  9. 9. IANA• Internet Assigned Numbers Authority• created by Jon Postel and Joyce K. Reynolds• department of ICANN Names and Numbers) (Internet Corporation for Assigned• manages • Domain Names, IP Addresses, Protocol registries• MIME Media Types • application, text, image, multipart...
  10. 10. IETF• Internet Engineering Task Force• organized activity of the Internet Society (ISOC)• cooperates with W3C & ISO/IEC• manages the RFCs (Request For Comments) • DNS, FTP, HTTP, SMTP, Zlib, Cookie, Atom
  11. 11. ECMA• European Computer Manufacturers Association• Standards • CD-ROM, ECMAScript, C#, Office Open XML File Formats• JavaScript • ECMA-262 aka ECMAScript aka ISO/IEC 16262 • TC39-TG1 managed by Mr. J. Neumann • E4X: ECMAScript for XML • ECMAScript Internationalization API • Test262 http://wiki.ecmascript.org
  12. 12. WaSP• Web Standards Project• founded in 1998 by Georges Olsen, Glenn Davis, & Jeffrey Zeldman• convinced in 2001 Microsoft, Netscape, Opera & other browsers to support HTML 4.01, XHTML 1.0, CSS1, and ECMAScript• AcidTests (by Ian Hickson) • 1: HTML 4 & CSS 1 • 2: CSS 1 & CSS 2 • 3: HTML 4, XHTML 1.0, CSS 2.1, DOM 2, ECMAScript 3.1 • Today last versions of all major Browsers 100% compliant
  13. 13. WHATWG• Web Hypertext Application Technology Working Group• founded in 2004 by individuals from Apple, the Mozilla & Opera• Led by Ian Hickson• Created to work on HTML5 based on Web Apps 1.0 + Web Forms 2.0 while the W3C choose to concentrate on XHTML• HTML being a living standard (no more versions)• Proposed • Web Workers, Web Storage, Web Sockets, ...• New W3C working group created in 2007 to work on HTML5• WHATWG & W3C editions of HTML5 can have some differences
  14. 14. CommonJS• created in 2009 by Kevin Dangoor as ServerJS on Mozilla Wiki • standards for JavaScript on the server • Narwhal, Helma NG, v8CGI, GPSEE, chiron, Persevere• Renamed CommonJS • command line tools, desktop, addon, or browser implementations • joined by CouchDB, Wakanda, Sproutcore, node.js, RequireJS...• Modules, Packages, and Promises• Binary, FileSystem, System, I/O stream, Socket I/O• Browser like APIs: worker, console, HTTP client
  15. 15. Server-Side JavaScript
  16. 16. Engines• Mozilla SpiderMonkey• Mozilla Rhino• Webkit JavaScriptCore• Google V8• Microsoft Chakra• Opera Carakan
  17. 17. Standards• ECMAScript• CommonJS
  18. 18. Servers• Microsoft IIS• Persevere• Jaxer• node.js• Wakanda• RingoJS• SilkJS
  19. 19. NoSQL Databases• CouchDB• MongoDB• Riak• WakandaDB• ArangoDB• OrientDB
  20. 20. More than 60Server-Side JavaScript implementations
  21. 21. Web Application “1.0”
  22. 22. HTML5 APIs• XMLHttpRequest 2 • Web Cryptography• Blob • ImageData• File / FileSystem • Typed Arrays• Web SQL • Storage Quota• Web Storage • System Information• Web Workers • URL• Web Sockets • WebCL
  23. 23. WebCL“This section proposes mechanisms fortransferring pixel data between WebCLmemory objects and HTML media elements.Server-side or Web Worker basedimplementations of WebCL will not berequired to support these features.”https://cvs.khronos.org/svn/repos/registry/trunk/public/webcl/spec/latest/index.html#4
  24. 24. Web SQL“This document was on the W3CRecommendation track but specification workhas stopped. The specification reached animpasse: all interested implementors haveused the same SQL backend (Sqlite), but weneed multiple independent implementationsto proceed along a standardisation path.” http://www.w3.org/TR/webdatabase/
  25. 25. Web SQL“This document was on the W3CRecommendation track but specification workhas stopped. The specification reached animpasse: all interested implementors haveused the same SQL backend (Sqlite), but weneed multiple independent implementationsto proceed along a standardisation path.” http://www.w3.org/TR/webdatabase/
  26. 26. Web SQL“This document was on the W3CRecommendation track but specification workhas stopped. The specification reached animpasse: all interested implementors haveused the same SQL backend (Sqlite), but weneed multiple independent implementationsto proceed along a standardisation path.” http://www.w3.org/TR/webdatabase/ Should we define a JSDBC API?
  27. 27. Async & Sync• XMLHttpRequest(method, url, async)• FileReaderSync()• requestFileSystemSync()• openDatabaseSync()• indexedDBSync.open()• localStorage.getItem()
  28. 28. IndexedDB“The synchronous database API methodsprovide a blocking access pattern to IndexedDBdatabases. Since they block the callingthread they are only available fromworkers.” http://www.w3.org/TR/IndexedDB/#sync-database
  29. 29. Web Workers• Dedicated or Shared• No Window, No Document• WorkerGlobal, WorkerUtils• WorkerNavigator, WorkerLocation• postMessage(), onmessage(), onerror()• importScripts()
  30. 30. Concept• Server JS contexts == Workers • multi-threaded -> Dedicated Workers • single threaded EventLoop -> Shared• Server JS contexts === Remote JS Workers
  31. 31. Now & Tomorrow
  32. 32. RingoJS• W3C • Web Worker• CommonJS • Modules • System, fs, binary, IO, Unit Test• Other: console
  33. 33. SilkJS• W3C • XMLHttpRequest• CommonJS • Modules
  34. 34. node.js• W3C via modules • XMLHttpRequest (node-xmlhttprequest) • Web Sockets (node-websocket-client) • DOM (node-o3-fastxml), IndexedDB (perstore)• CommonJS • Modules, Packages• Other: console
  35. 35. Wakanda• W3C • XMLHttpRequest, WindowTimer, • Web Storage, Web Worker, • File, FileSystem, Blob, ...• CommonJS • Modules, System, Unit Test• Other: console
  36. 36. Wakanda extensions• Web Storage • sessionStorage + user.storage & storage• Web Workers • Worker & SharedWorker + SystemWorker
  37. 37. Server-SideJavaScript ContextCommonJS (module.id, require, ...)Worker (importScripts, WindowTimer, ...)
  38. 38. Summary• ECMAScript is already everywhere• Modules: CommonJS already standard, AMD, ECMAScript 6• Many W3C APIs already applicable server-side• Same APIs means ➡ better learning curve ➡ more shared libraries / modules ➡ DRY -> shared Model work Offline
  39. 39. Client and Server JavaScript APIs W3C Community Grouphttp://www.w3.org/community/jseverywhere/

×