We don't need no plug-ins! HTML 5 is enough
Written by Ian Elliot   
Monday, 26 April 2010

Why do we need plug-ins such as Flash and Silverlight to create web apps that have the same facilities as desktop apps? With HTML we don't and Google proves it!

 

We don't need no stinking plug-ins!

We have grown accustomed to the idea that to create Rich Internet Applications RIAs we need to extend the capabilities of the browser. In many cases the capabilities that we need to extend were crippled to implement some sort of security barrier between the untrustworthy application and the innocent user.

quake

Quake in a browser!

Adding back these capabilities and extending the browser experience to make it more like the desktop has always been achieved using a browser plug-in - Silverlight or Flash being the obvious market leading examples. However, the downside is that the user has to be persuaded to download the add-in and this often means that they simply don't bother to view the content or use the app. Even Java FX, which is currently as close to a plug-in free RIA development environment you can find, has a set of runtime requirements that not all browsers or machines meet. Currently if you want to implement a RIA then you generally need to consider using a plug-in, or at the very least a non-standard development environment.

If you think about the idea of using a plug-in to add facilities to a browser the whole idea seems mad. You have a machine with an operating system. This hosts a browser which has limited abilities partly for security purposes and partly because it has to run on a range of platforms. However, most host platforms have graphics and multimedia capabilities that go well beyond basic HTML. These are simply ignored by the browser but delivered by the plug-in. In fact why not just dump the operating system and make the browser the OS.

This is, of course, the nightmare that first forced Microsoft to take  the web, HTML and browsers seriously. They seem to have forgotten this lesson and currently seem quite unperturbed by Google's Chrome OS which is designed to be an OS for web applications. This is a radical approach and might not prove popular depending on how well the whole thing is promoted and there are some problems. Any new browser OS has to support the current standards and if it is also going to run RIAs then it also has to support plug-ins. Getting rid of the separate OS layer doesn't get rid of plug-ins - but it might in the future.

What is really surprising is that many RIA developers don't realise how much can actually be achieved using standard HTML and JavaScript. In most cases the lack of standard vector graphics, multimedia support and access to local storage is what usually forces even knowledgeable developers to pick a plug-in to provide a richer environment.

All of this could be about to change with the introduction of HTML 5 which includes Canvas - a 2D vector graphics system, media playback, and offline storage database and drag-and-drop support. It also features new form controls and forms support PUT and DELETE to make REST easier to implement. If you want to move beyond 2D vector graphics then there is WebGL which links Javascript to OpenGL so that you can write 3D code which draws on the Canvas element. When you think of the standard subsystems like OpenGL that are available on a wide range of platforms it only seems reasonable that they should be part of the new standard browser environment. 

Of course the big problem is - does it all work? After all we have lots of experience with Flash, Silverlight and even Java FX can we simply throw these environments away and work with HTML 5 augmented by JavaScript libraries? The answer seems to be yes and Google have demonstrated that this includes 3D games - not normally an application that you think of running in a native browser. In a blog entry Chris Ramsdale recounts how a group of Google people decided to use their 20% time devoted to their own projects to implement Quake II using nothing but HTML 5 - i.e. no plug-ins. They took an existing Java port of the 3D game and use the Google Web Toolkit, WebGL and WebSockets to cross-compile into JavaScript. The resulting program ran at acceptable frame rates - 25-30fps - and while not of practical importance as there are already web implementations of Quake it proves that plug-in-less 3D games are more than possible. Given that WebGL is to incorporate hardware based acceleration rendering rates should improve. If you want to play with the code it can be downloaded from Google.

 

quake2

So what does all this mean? It is clear that a 3D action game isn't the same thing as a commercial web app and you still might worry that implementing your latest project using nothing but HTML 5 is risky - but wait the clue is in the "using nothing but".

The point is that approaching an app via HTML is standards based and in principle it should be able to run on any modern browser. Also given that the Chrome OS has adopted the same technologies this is also a chance for simplification and unification in that it might not be the browser that offers the runtime environment for your next HTML 5 app but an HTML 5 based OS.

It looks as if some of the madness created by trying to move the desktop into the browser might finally be coming to an end with the browser finally mutating into the desktop.

<ASIN:0596806027>

<ASIN:0672330970>

<ASIN:1430228741>

<ASIN:1430227907>

<ASIN:0240813286>

<ASIN:0321719913>

Last Updated ( Monday, 26 April 2010 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.