Friday, March 28, 2008

Saving Ourselves From the Unweb

[This article is based on a talk by Alex Russell, the co-founder of Dojo, that he gave at the Visual Ajax User Group, with added editorializing and pontification by Chris Keene, CEO of WaveMaker. You can safely assume that anything insightful and true came from Alex's talk and anything smarmy and argumentative is part of Chris' "value add"]

The original use case for the web - researchers working with static documents - doesn't bear much resemblance to the multi-media, consumer-oriented web we have today. The HTML web browser infrastructure that got us this far won't get us the rest of the way.

The web has always been about the worst platform for any particular task (unless your task is to display a poorly formatted doctoral thesis). Ubiquity, searchability and combinability have always made up for the web's many weaknesses.

We are reaching a fork in the road, however, where the web's traditional strengths may be dramatically eroded by a "hollowing out" of the HTML semantics. There are basically two responses to this challenge of evolving the web. They are:
  1. Evolve HTML = Better Semantics, Smarter Clients. Evolve the existing web by pushing browser vendors to add semantic HTML capabilities that support next generation web apps. This allows for the web to remain a collaborative community that preserves the advantages which the web has traditionally enjoyed even sa it transitions to handle new tasks.
  2. Hollow out HTML = the "Un-web". Abandon HTML and replace it with a powerful but proprietary alternative like Adobe Flex or Microsoft Silverlight. Let's call this the Un-web, as it carves out walled gardens which will curtail the web's traditional openness.
The web needs to evolve to support building the Rich Internet Applications that people want to use. At the same time, web tools need to evolve to be able to handle the increasing complexity of building these apps.

Example of Semantic HTML - The Dojo Grid

Web development and customer expectations have far outstripped the table management capabilities of HTML. Why do we expect so little from HTML? Is it too much to ask for capabilities like locked columns and subcolumn formatting? Is the only solution to improve the grid to break HTML by going to a proprietary solution like Silverlight?

A great example of how to evolve the web through semantic HTML is the Dojo grid, which was contributed to the Dojo project by WaveMaker engineers Scott Miles and Steve Orvell.

Here is a screenshot of a Dojo Grid:
















With Dojo 1.1, we can use HTML that has additional semantics "layered on" to create a grid like this. Note that it looks a lot like normal HTML beefed up with extra attributes to encode the semantics that allow us to "say what we mean":

<SPAN DOJOTYPE=" dojox.data.CsvStore"
JSID=" csvStore" URL=" names.csv" >
</SPAN>

<TABLE DOJOTYPE=" dojox.grid.Grid"
STORE=" csvStore" QUERY=" { Title: '*' }" CLIENTSORT=" true"
STYLE=" width: 800px; height: 300px;" >
<THEAD>
<TR>
<TH WIDTH=" 300px" FIELD=" lastName" > Last</TH>
<TH FIELD=" firstName" > First</TH>
</TR>
</THEAD>
</TABLE>
The Dojo grid also showcases a core strength of Dojo - it's disciplined architectural approach. The Dojo architecture focuses on extending HTML semantics in an layered way that still give us room for HTML to evolve to meet usage like this half-way in the future (e.g., with the HTML 5 tag). Note that we use a non-semantic tag (a span) to denote something that exposes a fundamentally new capability (data stores), but extend existing HTML semantics for grid configuration.

The result is a very clean layering of Dojo semantics on top of vanilla HTML and css. For example, even with Javascript turned off in the browser, you can still tell what the Dojo grid is supposed to be doing. We can even supply the data via an HTML table in order to get full downward-compatibility.

Replacing HTML with Javascript is enticing but dangerous. Dojo uses Javascript to extend HTML semantically rather than throwing it away. Adding semantics to HTML gives HTML the carrying capacity to support next generation of web design.

Hollowing Out HTML - The Un-Web

While parts of the web evolve, there are also web constraints that don't change, such as the latency of communication and the static application deployment environment (aka browser + plugins). There are huge restrictions in not being able to send down an execution binary along with each web app, but huge deployment efficiencies as well.

One way to overcome the limitations of HTML is to replace HTML with proprietary web technologies like Flex and Silverlight. These technologies pose the risk is that the searchable, collaborative HTML web that we know and love gets hollowed out from the inside. This effectively carves out areas of the web that are not searchable or combinable with anything that has gone before.

Save The Web - One Browser At A Time

It is up to the Ajax and open source communities to "liberate" the HTML web from the Unweb. For example, "liberating" the Dojo grid is an on-going community effort involving large amounts of goodwill, time and cash.

Rapid evolution of the HTML browser can get us to the future, but only if we get a lot more demanding of the web browser manufacturers. What we can't afford is another 6 year drought like what we got when Netscape abandoned the browser wars and Microsoft IE had the world all to itself.

The key to the web's future is real competition between the browser vendors that will force them to evolve the browser quickly. These features include:
  • Auto update capabilities
  • 3-d rendering
  • Support for new semantics in HTML
  • In short, give us native ability within the browser to do what we otherwise have to do in Javascript libraries
What we know is that we have never gotten good browser enhancements and tools from the market leader. So now you know what you need to do to save the web - download and use the underdog web browser and give it all the love you can ;-)

3 comments:

Anonymous said...

"What we know is that we have never gotten good browser enhancements and tools from the market leader. So now you know what you need to do to save the web - download and use the underdog web browser and give it all the love you can ;-)"

Seems the author forgot which browser gave us the XHR object first.

Christopher Keene said...

Yes, during the 6 year drought ie did give us a bone or two. Hey - even a blind pig finds an acorn every now and then! ;-)

Tarun Sukhu said...

This is a very interesting article. We do see the action heating up with respect to the browser space with Mozilla's Firefox and the newly introduced "Flock" web browser. Flock which is built on top of Firefox is the first browser to have integration for enabling social networking features.

The trend of Web Applications gaining over the standard desktop application space, there is need for web browsers to be able to be able to function in an offline mode. Google Gears does provide assistance in this regard and works are an add-on plug-in to the browsers is a step in this direction. We definitely are looking at a future scenario of having where RIA based Web apps will be able to function in a disconnected mode as well and synchronize the local storage once online. The DOM storage related changes taking place in the HTML5 specifications is also a step in this regard.

Tarun