Posted by johnreynolds
on August 3, 2006 at 9:03 AM PDT
I might be the only person on the planet who wants all of his applications to be browser-based... but then again maybe there are a lot of other odd people out there with the same desire.
There is a huge paradigm gap between writing a desktop application with something like Swing , and writing a browser-based application with something like Java Server Faces . Frameworks like NextApp's Echo2 go a long way towards narrowing the gap, but there are still underlying disconnects that just won't go away...
Just from the practical standpoint of learning how to program, this is a big deal.
I know that some folks wish that browser-based applications would disappear... but I think that adopting that credo would be a mistake. The "old school" desktop applications aren't truly suited to a mobile lifestyle where an individual may connect to the Web from a variety of devices. In a single day I might use my home computer, PDA, mobile phone, work computer, and public kiosk to access my applications and data.
That said, I must admit that most of the current crop of browser-based applications don't quite cut the mustard : If you can't connect to the Web, then you can't use your applications.
We need a blend... We need applications that can be accessed from any device connected to the Web, but with persistent components that reside on the devices that we actually own.
I'll use Google's Calendar to illustrate what I have in mind: I love having a calendar that I can access from any web connection (actually, it doesn't work from my PDA yet, but hopefully they are working on that). I also love the ability to share my calendar with others (particularly with my wife).
What I don't love is losing access to my appointments when I am not online.
I want a persistent component of my calendar on all of the devices that I own. I want my devices to "synchronize with the mother ship" when connected to the Web, updating themselves from a central data store, and passing along any appointments that I might have recorded while offline.
Fortunately, Google has thoughtfully provided a Web Service Interface to their Calendar, so it is quite possible to create a client application to satisfy my wants and needs... I can have a desktop application in addition to my browser-based application if I so choose.
The down side to dual applications is that there's something clunky about this approach...
Accessing a desktop application when not online, and a browser-based application when I am online seems rather like a kludge.
Call me crazy, but what I'd like would be to always start from my browser, type in or select a URL, and have the appropriate version of the application run... If I am online, give me access to the full blown web application. If I am offline, give me access to the persistent components on my local machine. Adam Bosworth has written extensively on the subject of disconnected web applications... but his solutions always seem to end up relying on making changes to the browsers themselves, and I just don't think that's likely given the vested interests of browser manufacturers.
Roshan Shrestha's article "Take Your Tomcat On The Road " gave me an idea for supporting disconnected web applications that does not require the support of browser manufacturers: Create a locally hosted web application to do your bidding.
In my Calendar example, write a locally hosted web application that interacts with the Google Calendar web service. To access this application, simply enter the proper URL in the browser. If the device is offline, the local web application displays the "disconnected client" interface... If the device is online, the local web application redirects the user to the "online client" interface provided by Google.
I might be the only person on the planet who finds this approach attractive... but then again maybe there are a lot of other odd people out there who want something similar.
The biggest obstacle that I see to this approach is the installation of the "disconnected client" on the local machine. Roshan has demonstrated that it's a breeze to bundle a fully functional web application in a neat little package... but how to get that package onto a user's devices?
Would it be possible to use Java Web Start to install something like Roshan's "Tomcat On The Road " package on a user's machine? I'm really not sure... but hopefully somebody out there can help me find out.
(Cross-posted at Thoughtful Programmer