We use this with our air project, which uses gwt-in-the-air. It's a
great project I recommend checking it out.

Basically we have a service manager that you can register online
services and offline services. Both use Async options.
When we are working offline, we just switch which services we return
from the service manager for the service class.

E.g.

ServiceManager.registerOnline(GWT.create(...));
ServiceManager.registerOffline(new OfflineMyService());

IMyServiceAsync sync = ServiceManager.get(IMyService.class);

It's extremely effective in my experience.

On Jan 21, 10:33 am, Greg <gregbram...@gmail.com> wrote:
> Hi all,
>
> Has anyone tried to integrate Gears with a GWT application that uses
> Ajax to access the backend?
>
> Specifically, I am thinking of having a Gears class that implements
> the DatabaseAsync interface so that my client code can call the same
> methods and I will swap out the Gears class and the regular GWT
> database class depending on whether or not the user is online or
> offline.
>
> Has anyone done this? I can't find any code samples online. Does it
> seem feasable? Is there any better way to do it?
>
> Thanks,
> Greg
-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to