Client-Side services in the Web Browser - Local AJAX

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.

What matters at the end is that we're adding extra capabilities to web applications via added services to the web browser. The browser gets richer, web applications get smarter and at the end, the user's web experience has improved without making the web browser a much fatter application like some people might think...This is still DHTML, Javascript and HTTP - The JVM is running embedded as part of the web browser and so does Java DB which is itself a Java extension in that context...You'd be programming the same way except you're being given extra capabilities for your webapp. This is as simple as that.

Sure, Java DB, based on Apache Derby was picked as the database running embedded within the browser. It is lightweight, secure, fast and meets all ACID properties. It is not a new database system; in fact its first release was in 1997 at Cloudscape where I had the privilege to work there. The fact it is written in Java is a plus indeed, because it can really be installed as a Java Extension and as part of the JRE/Java Plug-in which is itself a 1-click firefox extension install to Firefox. Of course, Java DB written in Java also allows a direct interaction from Javascript using LiveConnect technology which is itself available from the Java Plug-in; but better yet, having a uniform JVM across web browsers allows web applications to be run uniformly, no matter what the environment is.

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.

ZDNET Blogs:
http://blogs.zdnet.com/BTL/?p=2298
http://blogs.zdnet.com/BTL/?p=2960
http://blogs.zdnet.com/BTL/?p=2971

Comments:

Post a Comment:
Comments are closed for this entry.
About

forsini

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks