WebSockets and HTML5 on GlassFish

Santiago has started writing about HTML5 and GlassFish 3.

Last week he showed a simple Web application that controls an HTML5 video object remotely (post).  The example works using WebSockets connected from the server to two browser windows - playback activity in the master window is reflected instantaneously on the slave window.  Simple code but helps understand how these features can be used.

This week Santiago created a screencast (HD) based on that example and posted it to GlassFishVideos. I just placed it in a HTML5 playlist together with an earlier video from Alexis on WebSockets support in Milestone 2 of GlassFish 3.1.

I'll use this opportunity to capture a few key links on this area, hopefully it will save you some time.

HTML5 really is a collection of specifications, carried in different places: W3C, WHAT WG, IETF.  Some of the specifications relate to document syntax/semantics, some to (JavaScript) APIs, some to protocols.  The whole set is available as a (large) single document: Web Applications 1.0; a nice table is in the WHAT's FAQ: What are the various versions of the spec.

A good entry point is WhatWG.org, which includes the specs for Web Applications 1.0, HTML 5 and Web Workers and plenty of other good content like FAQ and Wiki. HTML 5 properly describes the document format and semantics (Wikipedia,  WHAT's Editors Draft, W3C Editor's Draft). There are many HTML5 tutorials out there; I like Mark Pilgrim's Dive into HTML5 (avail under CC-BY-3.0 License).

Websockets (Wikipedia, API@W3C, Protocol@IETF) is the technology used in Santiago's example. Gregor Roth recently published a two part series that also covered WebSockets as well as Server-Sent Events, a higher-level API intended to manipulate the DOM from the server side.

Expect more HTML5 posts and videos; in the meantime, enjoy!

Update: some Twitter feedback suggested we tried the HTML 5 video enclosure, so we did! Feedback is welcome on how tit works for your browser and the video can be seen here on YouTube.


Post a Comment:
Comments are closed for this entry.