views:

91

answers:

4

I have a web application that I developed with the Google Web Toolkit (GWT), it is a utility application that helps make calculations when planning specific server deployments. I want to be able to offer this application as a download on my website for people that want to use the application but don't always have internet access.

I was previously able to achieve this by packaging all of files that GWT compiles (html and js) into a Nullsoft Installer Script (NSIS) that would just extract them to a temp directory and then tell Windows to open the main html file with whatever browser was the default.

Recently this has given me problems, it seems that some browsers don't mind this at all while others have their own quirks and problems rendering the application useless.

This application only makes 1 server call to fetch a xml file that contains the configuration data for how the calculations should be made. There is a small php component that allows the user to save and load previous configurations but it is not a problem to disable this feature for offline standalone executable deployment.

So my question is this, is there an existing framework that would allow my to package my application along with an embedded webserver so that when the application is ran it actually is running on a local web server? Or is there an existing framework to embed a web application into a redistributable browser, so that when the user tries to open the application it automatically opens the packaged browser, that way I could be able to fine tune the offline experience to always work as desired with the packaged browser.

Thanks for any replies

+2  A: 

I upvoted this as it's something I'd be very interested in finding a solution for. This was literally just on my mind a day ago. From what I figured, deploying a web app that requires some type of stand-alone web server to process the files just isn't possible. You said it's mainly in JavaScript and you wouldn't mind killing the PHP functionality - in this case Adobe AIR might be a simple solution (syntax is very similar to JS, should be a quick conversion if you're familiar with it). Basically though - from my understanding - you'll have to port it.

Mahdi.Montgomery
+1  A: 

If IE is not one of the trouble browsers, you could create a small .NET app that embeds a web browser control and opens it to the desired page.

You might even be able to achieve this using Gecko:

http://code.google.com/p/geckofx/

webbiedave
Thanks for the answer. Based off of your suggestion I was able to find a similar solution that also makes use of XUL runner. I have decided to build a simple dedicated web browser application that utilizes wxWebConnect since I have been using wxWidgets for the past 5 years at work and the ability to release a mac build as well as a windows one is great. I should be able to package this dedicated browser and set it to always open a local version of the web site (just the html and js) which will allow me to focus on just one browser technology for offline compatibility.
snctln
You're welcome. Glad to help.
webbiedave
A: 

I think the simplest way is to use Google Gears or HTML5 storage capabilities and add an offline mode to this application. Therefore, you just need to open the application once in the browser and enable the offline access. Then, it just works simply using the offline capabilities.

http://www.w3.org/TR/offline-webapps/ http://www.devcomments.com/HTML5-Offline-GWT-APP-at246553.htm

simonh
A: 

I'm assuming that because you're using gwt, that your logic is written in Java?

Surely you can package all the components you need into a standard Java runtime of some sort?

AlexW