I would create 2-3 projects: 

- a client project that only contains the GWT code that will be compiled to 
JS.
- a server project that contains your backend code (could also contain 
GWT-RPC service implementations etc.)
(- a shared project that contains code used by client and server, e.g. 
utils, dtos, whatever)

The main reason for doing so is a clear separation of dependencies. You can 
not accidentally import classes from the server project while working on 
the client project and vice versa. Also GWT currently bundles a lot of 
(sometimes older) libraries in gwt-dev.jar and sometimes they interference 
with server libraries. In one of my projects for example I use 
JasperReports on server side which requires JdtCompiler which is also 
bundled in gwt-dev.jar. Because of this we always have to care about the 
correct order of classpath entries because otherwise GWT compile fails with 
an AbstractMethodError.

Its also a good idea to keep the classpath small for GWT projects because 
the GWT compiler acts a bit faster then (does not have to scan all the 
server library classes).

Well and last but not least I found it easier to write build scripts for 
separate projects. Currently building a gradle script for handling this 
typical one project scenario with client/shared/server under the same src 
root. It looks like a 3-in-1 build script which would read a lot nicer if I 
would have 3 projects and three build scripts.


-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to