The Rain and The Shade

January 5, 2012

Html In browser Database do we really need it?

Filed under: Html5 — ovaisakhter @ 9:31 pm

Last night I was watching Mel Gibson’s Payback on the TV. One interesting thing in the movie is that every one keeps on saying that Mel needs his 130000 bucks back and the poor man keeps on telling them its 70000 and in the end he gets the 130000 bucks.

I have been working on web technologies for last 12 years and in all this time I have never heard anyone saying “if only we can have a database in the browser”. We had discussed a lot of time the limitations posed by the limited client side storage available in the browsers, and I have heard things a number of things like “if only we could store a little more information on the client side”.

A number of technologies were created to over come the limitations of the traditional web technologies frameworks  like Flash and Silverlight are two good examples, but no one of these technologies tried to provide any features to provide a database on the client side.

We have gone leaps and bounds in terms of programming languages and tools that interact with databases. There are frameworks which will make your lives much easier. In .Net world we have technologies like Entity Framework which can simplify the data access code a great deal. Using type safe languages like C, Java, C# you can write highly maintainable and robust business logic code . Having database coded on the browser will make us a step in a back direction. JavaScript doesn’t strikes me as one of the most maintenance friendly language. Eventually we will see a lot of data access, business logic code written in a language not known for its maintainability which may result in a maintenance nightmare. I recently had an experience while making a prototype with two tables proved to be a nightmare. Every slight change caused me to change the code at a number of places and introduced bugs in the code more frequently then a code written in a more type safe language. Of course I would have used something like Entity framework if I was coding it for server which could have been 50 times efficient in coding and maintainability.

Usually the JavaScript developers are not the guys making a lot business oriented code, application written with these newly acquired power could suffer some week coding standards.   

The browser database is temporary in nature and is gone as soon as you wipe clean your browser history. This essentially means that the data has to be saved to a server based data source this means there will be a lot of code that will be written twice. 

New breed of client applications mean new breed of server side applications. Business applications that are built for connected access will not be compatible with the new breed of disconnected scenarios. The new applications made for these scenarios will have to take care of the problems which come with the territory of distributed databases hence increasing their complexity.              

After all this discussion one question comes to my mind is “Why now?”. Internet connectivity has been improving every day. There will be less and less business scenarios which will require disconnected access. For these rare scenarios there are already enough solutions. So feels rather absurd that connectivity is increasing every day and we are coming up with solutions to make disconnected business applications.

So as poor mister porter said we only need 70000 bucks which means we could have been satisfied with the offline storage and may not needed a full blown database in the browser.   


Create a free website or blog at