Browser-based databases will further encourage the undesirable Web application monoculture.
Posted on Monday, April 20, 2009 at 1:12 AM.Lately, there has been a trend towards using the Web browser as a general application development platform. This is unfortunate in many ways, namely due to the poor nature of the browser for such a purpose. A system inherently designed for displaying documents and allowing for navigation between them has been perverted into something more. Unfortunately, it's not even a remotely decent platform. All of the efforts so far have basically been very poor reimplementations of what we've already had for years.
In terms of programmability, we're basically limited to using JavaScript. While JavaScript may be usable for minor scripting tasks, it is not the sort of programming language that should be used for developing more complex software. I've written before about some of the problems with JavaScript, as have many others. Needless to say, it's not good to be isolated just to JavaScript for browser-based Web applications, as we currently are. Compared to more traditional software development, we're handicapped significantly by the current situation.
When it comes to actually displaying stuff to the user, we've experienced nothing but problems. We're essentially limited to using CSS, along with JavaScript. Anyone who has had to write even a moderately complex cross-browser stylesheet knows that it's nothing but a huge hassle. And even today, there's still much disagreement about whether CSS is even acceptable for layout. I summarized some of the CSS versus HTML tables arguments the last time that debate flared up. Regardless of one's stance, I think it has to be agreed that the mere act of rendering text, images and other information to the screen is much more of a problem for Web applications than it probably should be. Even then, it doesn't offer the flexibility we can get from traditional software development platforms and techniques.
While it's been noticed that there are significant problems in these core areas, the remedies are less than suitable. A good example of this is the canvas element that has been implemented by several browsers. It essentially provides a drawing surface, much akin to what we've had available on so many other platforms for decades now. But unlike these non-Web-based platforms, the canvas element is primitive. A developer using the canvas element is typically forced into writing a lot of code that would already be provided as part of the more mature platforms.
We've seen an even further step backwards recently with respect to the HTML5 Web Storage specification. So not only will we have a crippled programming environment in terms of JavaScript, and a poor rendering environment in terms of HTML, CSS and the canvas element, but now we may also have a half-baked implementation of a relational database, as well as the interface to access it, available for abuse.
There's been a lot of disagreement lately about this browser-based storage. And I'm not talking about healthy disagreement such as whether it's a bad idea or not. Most of the disagreement is with the nature of the data store itself. That draft specification suggests a very SQL-oriented approach. Others suggest that a JSON-based approach would be better. Some suggest an approach akin to CouchDB, with this already being experimented with.
Based on the current draft of that spec, I think we're looking towards a world of pain. It essentially outlines a very poor reimplementation of what we've had for years in technologies like JDBC, ADO.NET and Perl's DBI module. It's looking much like a case of us getting a small fraction of what we can already do, without any real benefits, improvements or innovation.
It makes little sense to try to build a platform for the future in the Web browser. All we've managed to do so far is reproduce a lousy, stripped-down version of the existing platforms that we've had for decades. But what makes it worse is the monoculture that has developed. We're stuck using JavaScript for programmability. Any form of display must essentially be done using HTML, CSS and the canvas element. Data storage may be done in a form similar to that of the proposed HTML5 Web Storage spec, but even if different it will still likely be very lacking. And given that the platform is provided by the Web browser, it's not like we can really go back and correct all of these deficiencies at the core with ease. We instead have to try to reproduce what we've had for years outside of the browser using JavaScript, which so far has been an absolute failure. We can't make any real forward progress if we're going to be continually trying to bring ourselves up to the level we were at back in the 1990s.








