views:

848

answers:

4

We develop Java Web-aps (Websphere, DB2) which display graphical and databased information. We would also like to offer the same application offline (distribution via CD/DVD) with online data-update. We have tried a number of alternatives in the past, but nothing has been really stable. What are the new best practices to take a Web ap plus data (in a small database) offline?

+1  A: 

I don't know how well it works with the CD/DVD distribution front, but the first thing that comes to mind is Gears. On the .NET side of the fence there's Silverlight 2. Then there's the Mozilla Prism project, although I don't know how far advanced that is.

These are all designed for not just offline access, but mixed offline/online, talking to a server when it's available and working locally when necessary.

Jon Skeet
A: 

You could create an image of your server as a VMware instance and distribute it with a copy of VMware player (licensing allowing of course). Personally I'd build it on top of a Linux distribution like CentOS5.

Brian C. Lane
+1  A: 

I'd suggest using Apache Derby as the database (also available as Sun's Java DB, and possibly still IBM Cloudscape (does that still have DB2 compatibility in place?)).

I'm sure there's plenty of Web servers/Servlet containers about. Apache Tomcat is the obvious one. An alternative approach would be to use an embedded native browser within a single Java process. That approach should be relatively hassle free for users and tech support, and you can just use WebStart to install and update.

If you're using EJBs and other nonsense, then there are similar freebies about. I understand Sun Glassfish is nice and fast starting.

Tom Hawtin - tackline
A: 

You can bundle a JRE along with JETTY server and use a different database e.g HSQLDB (that you can bundle inside the webapp itself).

If you are using an ORM tool to connect to database, you might not have to make many code changes for this.

A lot of Application server distribute their admin consoles like this.For e.g Weblogic admin console runs offline (it uses internal ldap server for its database)

Also as far as Google gears is concerned, they are also pretty much doing the same thing. They have a server that is bundled along with SQLDB and they allow to synchronize the data between online offline app. You can sync the data too (use webservices in the online app) and talk over https from the offline app to sync the data, if you need the sync feature.

Also you can check this link http://developers.sun.com/learning/javaoneonline/2007/pdf/TS-69700.pdf

Rajat