1 message in com.googlegroups.google-gearsRe: [google-gears] Business Logic on ...
FromSent OnAttachments
Aaron Boodman19 Mar 2008 16:18 
Subject:Re: [google-gears] Business Logic on the Local Side...
From:Aaron Boodman (a.@google.com)
Date:03/19/2008 04:18:09 PM
List:com.googlegroups.google-gears

Gears is not a framework for running Java web applications on the client machine. I've heard of some frameworks that do this, but Gears isn't one of them.

What Gears does do is allow regular old Ajax applications to start up and run without an internet connection. It also provides a JavaScript-accessible database to store data in while the Ajax application is offline. With these two primitives you can build complex applications that run offline in just HTML and JavaScript. When the application has a network connection, it can synchronize with the server, which can of course be written in any language you want.

There are some samples of this style of application for you to check out:

http://code.google.com/p/google-gears/wiki/GearsTutorialsAndSampleCode

Hope this helps,

- a

On Wed, Mar 19, 2008 at 4:03 PM, David E. <dve1@gmail.com> wrote:

How can we implement Google Gears to process business logic locally?

For example, I have a Tomcat Application that uses a servlet to parse an XML file (using JDom) when that file is requested via a URL and then serves it up as an HTML form to the client.

The client enters data into the form and when the form is submitted the servlet parses all the input fields from the HTML form and fills in the appropriate XML tags of the original XML file and then saves it on the server.

I need Google Gears to provide this same functionality on the local side when the server is not available and then sync up when it becomes available.

I can package the XML parsing and input field saving functionality into a jar file and maybe use that to sync up with Gears? It would download the jar file and when the server was not available use the classes via Java method calls in javascript? Then it would save the XML files locally and sync up with the server XML files when the server becomes availalbe? How would this architecture work? How can we ensure classpaths of all the require jar files would be correct?

Are there any examples available?

Thanks in advance for your responses,

-David