Tuesday, March 14. 2006
HTML 5, a pre-preview.
I've been remiss lately about keeping up to date with HTML 5. To be honest, I am a little scared, Microsoft is only just coming out with a new version of Internet Explorer that might actually be HTML 4.01 and CSS 2.1 compatible. They might... soon... maybe? So I am hesitant to start playing with some new tech that will be implemented many years after the fact.
But damn, there is some cool stuff inside of the HTML5 working draft...
First, a little rundown of what is in there
- More semantically named containers. This is just a fancy way of saying: less <div> blocks with classes, more structural elements. Instead of <div class="nav"> or <div class="footer">, we get <nav> and <footer> elements. HORRAY! Some of the more interesting elements are: section, nav, article, aside (for a sidebar), header and footer.
- The canvas element, which allows you to paint on it using Javascript, and has an astounding number of 2D graphical methods, including gradients, paths, inserting images, using images or other canvases as patterns, scaling, translation and rotation. The only thing that is really missing is the drawing of text, which when you look at the problem of figuring out font metrics across a wide array of platforms with a wide array of display capabilities, you can see why.
- A few additions of inline elements, such as: t (for date and/or time info), gauge (for a static gauge, like a rating) and progress (for a dynamic progress bar). Again, good semantics, good stuff.
- Some microformat specific tags, such as calendar and card, which will take the child elements, and attempt to parse them as a hCalendar and hCard.
- A datagrid element, which is like a table, but is meant to be updated, added to, subtracted from, or sorted dynamically.
- Menu and Command elements, that are for building things like toolbars, context menus, and such.
- Forms are getting a new face-lift, mostly from another specification, which means a whole new schwack of input types (dates and times, URLs, numbers, etc.) and validation (mark inputs as required, set maximum and minimum limits), regular expression validation (!), auto-complete, PUT and DELETE methods are allowed (WHOO HOO!), definitions as to how forms should be posted to different schemes (i.e. you could PUT the results of a form submission into a file:, ftp: or mailto: scheme. )
- Client side persistent storage. Ho-lee carp. This is like cookies plus plus (pronounced ploos ploos). Essentially they are like cookies, but they are much better defined. There is the sessionStorage which is specific to a single browser window, and single domain only. But there is a globalStorage, which is persistent across windows, sessions, and potentially even domains. You can set up values inside of the globalStorage that are accessible to all domains, all .net domains, or all jonnay.net subdomains, or just the blog.jonnay.net subdomain. Yes, I'm worried too. But surely someone thought about how dumb this is. And even if they didn't, you'll be able to disable the globalStorage object across domains and subdomains, right? right?
- Editing pages in-line. Yup you heard me. Imagine noticing one of the ubiquitous spelling or grammatical errors on my blog, and just changing it right then, and right there, and then the server lets me know that someone suggested a correction... and BAM! This looks like powerful stuff, and would completely transform wikis as we know them.
- Server Event Model. Whoah. Server-Push. Nice. Essentially a persistent connection is made to a client, and information is sent to that client when the information is available. This is different from AJAX/XmlHttpRequest.
- There is a cross-domain cross-document messaging protocol (!) which allows the transmission of messages from one domain to another in a secure way. This looks really cool, but also looks really dangerous.
Remember, this is a first draft, so things will be changing.
And some ranting ensues...
The sad fact of the matter is, chances are companies like Google are going to get right behind this specification, but Microsoft is going to take one look at this spec, and (if they haven't already) reject it out of hand. I doubt they will do so much as badly implement it. They will send their people into the W3C to subvert it, and make sure that it never hits recommended status. Why? Because this specification is more then just HTML, it is the Web Applications Specification 1.0. Which is about to render large chunks of your operating system null and void.
Which makes me think... perhaps the definition of an operating system is already in transition. The more useful, and interesting web applications become, the more time I spend in my web-browser. There will come a point where home computers and operating systems become less about running separate applications and more about storage and retrieval of information from the intarweb. The storage is no problem, we've been doing the right-click-save-as tango for years. It is the secure retrieval that is going to be interesting. I could files being laid out in different zones: The world, The tribe, The users, and You. As per usual, there would be read-write permissions. "The tribe" is more a zone place-holder. You might have 4 or five similar zones, one for family, one for friends, one for work, etc.
At any rate, operating system design is going to change radically over the next few years, and there seems to be a few major models:
- The Microsoft method, which is to make every computer a client, and not capable of being a server unless you buy the Microsoft 20X6 (twenty-exty-six) Server for $5,000, and takes a team of 20 MCSBs (Microsoft Certified Strong Bads), and really only Microsoft Clients talk to Microsoft Servers.
- The Apple method, where every computer is a client, and every computer is a server, and is generally compatible with any other client and server out there, as long as they talk in standard methods. Although if an Apple talks to another Apple, much hipster-love ensues. This is different from the Microsoft model, because while Microsoft seeks to extend the current specification (and thus breaks it), Apple extends the current specification, according to the specification, thus not breaking it.
- The OSS method, where every computer is a server, and can be a client too. Strictly standards compliant where possible, and tries hard to work with the other two proprietary models with various degrees of success.
Note that these are just generalizations. Apple can be just as good at the Microsoft game (iTunes DRM anyone?), but generally it seems to me that the platform is about: standards first, extensions and user experience second, without compromising both. Also, note how Microsoft is going to be circling the waggons over the next few years. They've talked about standards and interoperability, but in fact they will be doing nothing of the sort. They are going to be trying very hard to maintain the iron-grip of control they had before Linux and OSX hit the market, but that will be hard, as more and more people notice that there are better, more functional alternatives.
Whoah. That got ranty. Sorry.




