August 28th, 2009 — 12:55pm
Datasets are quite an un-impressive part of the HTML 5 specification. It is only accompanied by two examples, of which the first is relevant but small and the latter is (in my view) completely besides the potential of this new functionality. Datasets are in short a way to store custom values on nodes in the DOM tree. This has always been possible when working client-side through JavaScript by keeping a mapping between the nodes and the values stored, which meant that the values weren’t actually stored on the nodes, but just related to the nodes elsewhere (e.g. using jQuery.data).
With HTML 5 and the introduction of datasets, we can do something new. The main advantage and the really huge application area for datasets are, that you can include custom attributes in the serverside-rendered HTML, that the client-side script will use to enhance the browsing experience.
Continue reading »
10 comments » | HTML 5, Trends, jQuery
August 20th, 2009 — 12:28pm
The truth be told, us ActionScript programmers have always had it easy when it came to creating real-time, multi-user applications. We might not have had much processing power back then, but as early as Flash 5 introduced back in 2000, we got the XMLSocket object, which enabled a whole series of multi-user-applications like isometric chat worlds etc. This leaves us JavaScript programmers a bit stranded. We do have Comet and similar technologies, but true persistent connections, we have never had – unless we used a Flash object in the document somewhere, but who wants to use Flash anyway?
But with the dawn of HTML 5, this worry is irrelevant, because with HTML 5 and the greatly improved JavaScript API, we also get a brand new Web Sockets API. This will have the same basic low-level access to bi-directional communication as ActionScript got with the XMLSocket API – it wasn’t XML only, it was just the (widely used) default transport method, but it could easily be circumvented.
Quite stunning though, how such a simple mechanism arrives in JavaScript 10 years later than it did in ActionScript!
Continue reading »
9 comments » | Flash Platform, HTML 5, Trends