Client-Side services in the Web Browser - Local AJAX
By forsini on May 07, 2006
Recently, several blog articles have been posted by David Berlind from ZDNET - it has sparked a lot of comments from several people and touched on a lot of differents subjects and technologies...
The embedded Java DB demo which showcases local and secure storage in the web brower is not just enriching the browser but principally enabling web applications to operate offline / disconnected.
What it comes down to and as stated by some comment posts in Simon Phipps's blog entry AJAX: New Life For The Applet?, the showed example demonstrates how a new service (local storage) can be added to the web browser and which applications can benefit from such capability (I can name a few popular web 2.0 applications that I use everyday and wish they could run offline).
A particular and popular web application protocol that can benefit from it is AJAX - why you may ask? 1) It has a defined and published paradigm/methodology, 2) It has been adopted and especially 3) it integrates extremely well with today's web applications and is a main component of web 2.0.
A local AJAX controller can handle requests and serve responses in XML format the same way AJAX currently does...We're talking about offline data management capability at the AJAX level (Local AJAX). Now how does this work from a 14,000 feet view? well, there is no magic and it is fairly straightforward to understand - a (local) client service(s) controller can satisfy AJAX type requests and return data from a local and embedded database system (Java DB) for instance. In the demo I wrote, the data being returned would purely be database rows in XML format, the requests can be canned SQL queries or pure SQL submitted via AJAX, locally.
The local AJAX controller and storage services are implemented as a thin and invisible applet, which itself is packaged as a Java extension (by choice). The advantage of this, is that I can install the Java Plug-in on every known web browsers out there and then the required client services will be installed on-demand automatically via the Java plug-in (or Java webstart). As Simon puts it, this could lead to the revive of the applet on the client side, but this time with no GUI involved, just a transparent and lightweight client service interface.
There is absolutely no changes with the DHTML and AJAX request handling syntax(es) - hence the learning curve is slim and additional code changes will be homogeneous with the rest of your new or existing webapps.