views:

216

answers:

3

I'm fairly familiar with GWT - having completed the Eclipse-based tutorial. But the tutorial runs in client-server mode.

My question is: is it possible to create a GWT application that completely runs client-side, where javascript/html is generated but there is no reliance on backend java classes?

I understand that the full breadth of GWT capability may not be present (including the use of Java runtime functionality), but I remain interested in such a solution.

cheers, Ian

+4  A: 

GWT application are basically client side application.

For the hosted mode since their is some debugging involve it use java.

When you do a normal (release) compilation GWT would generate the javascript of your application and you don't need the java at server side anymore.

See the documentation there, in web mode the javascript are produced and you don't need the java server side anymore.

RageZ
A: 

It's definitely possible to write a GWT app that is downloaded to the client and run, without any further communication with the server. All you'd need to do is make the app not include any calls to a server-side API. Any data necessary to the app could be downloaded and stored on the client using Gears.

That being said, the browser would still need to connect to the server to download the app (and any data), but once that's done, you could disconnect the network and continue to function as normal.

Jason Hall
Hi there,isn't it possible to export the product from the environment and browse that content directly (without connecting to a server?)cheers,Ian
ianmayo
+1  A: 

I am sorry in advance if I took this question too far or in a wrong direction.

RageZ is right that GWT applications are all client-side. Server-side integration is supported in GWT using GWT-RPC, etc. and you will have to provide at least minimum server support outside of GWT to run it.

Are you trying to implement functionality that commonly runs on a server using client-side GWT only?

If the answer is no then you have no server-side functionality (persistence, services, tasks, etc.) and your GWT should and will be pure client side application.

If the answer is yes then you have a sophisticated exercise that may or may not be possible with a sub-set of Java GWT supports. But architecturally it is very questionable approach since server-side functions are centralized for a reason: shared resources such as persistence, collaboration, scalability, availability, maintenance, other QoS, etc.

grigory
Hi there Grigory. In answer to your question, no I'm not intending running any server-side functionality in the GWT app. As a Java/Eclipse programmer I'm just considering a more familiar development method for the creation of a plain html/javascript application - with my target code running on a plain (non-JEE) web server.cheersIan
ianmayo