Please mind the gap to the platform

Not so long ago there was a flurry of panic in the .NET space after Microsoft announced that Windows 8 was going to be an HTML5 platform, without making it clear as to how existing .NET features such as Silverlight were going to fit into the picture. At around this time I happened to come across the book: HTML5 Up and Running by Mark Pilgrim.

This is a very slim book, with only 199 pages, but was a very informative read. The introduction is a very concise history of the development of web standards, explaining the W3C’s aborted detour in its attempt to make HTML into an XML vocabulary. The book then goes through the various parts of the HTML5 specification, covering topics such as canvas, local storage, the new semantic elements and offline applications, as well as covering in depth topics such as video and geo-location. The chapter on video covered more information on container formats and the various video and audio encodings than I’ve ever seen in one place before, even explaining the utilities to use to do the various encodings. The author covers each of the major browsers, and discusses how well they support the various specifications.

All of the chapters contain examples of the technology, and the author emphasises libraries such as Modernizr which allow applications to dynamically determine which parts of the HTML5 specification are supported by the hosting browser, allowing the application to use a plug-in such as Google Gears to support the missing functionality or simply degrade the user experience. The only technology that didn’t get a lot of coverage was Web Workers for which there is a lot of tutorial material available elsewhere.

This was a brilliant compact read for the busy developer and I highly recommended it.

I should also point to a Mix video which offers a deep dive into canvas.

Application development for mobile applications is an area where it seems that web applications, with their new HTML5 ability that allows them to run offline, might just be a good thing. For certain types of application, writing in HTML5 would allow an application writer to produce applications that run on a number of different mobiles, without the need to produce different versions for the different Gui libraries and more specifically the different languages that the platforms use for development. While looking into the topic of application development using HTML, CSS and JavaScript I came across the online book: Building iPhone Apps With HTML, CSS and JavaScript by Jonathan Stark

This book uses the PhoneGap open-source library to produce the final native application. PhoneGap is a framework that uses a native application to launch an embedded Webkit based browser which can then run a portable HTML/JS application. The advantage of this type of development is that the JavaScript based application can be debugged in the normal desktop browser before it is moved on to the mobile platform. The disadvantage is that in order to get a native looking application, the CSS has to be written for each of the platforms to get the correct look and feel, though some of this CSS comes with the PhoneGap platform (though it does contain Webkit CSS extensions for various kinds of gradient fill etc). PhoneGap does allow the JavaScript to call out into native code via a url based protocol, so a portable application can go native in places to implement things that require the speed or closeness to the platform of native code.

PhoneGap is also making its way onto the Windows Mobile, and it will be interesting to see at what point it is sensible to switch from a native application written in Silverlight from one written in HTML/JS. There is a (very biased in my opinion) article comparing the two platforms here.

Advertisements
This entry was posted in Books. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s