Quantcast
Channel: gwt beginner- how to organise+store code in java web app that uses gwt for frontend and also has backend code - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by Jasper Sprengers for gwt beginner- how to organise+store code in java web app that uses gwt for frontend and also has backend code

$
0
0

I suggest that you organize your code in three packages:- client package for all code that is compiled by the GWT compiler and not used server-side- server package for code that is exclusively used server-side- shared package for code that is used both server-side and client-side (hence compiled).In your gwt.xml file:

<source path="client" /><source path="shared" />

Note that 'shared' code run on the server cannot invoke some functions like GWT.create(). You typically store you data transfer objects here that are used in RPC calls.

If you use the Eclipse plugin and create a template project with sample content, you'll be good to go. If you're using a third party library like smartgwt, you have to add it your build path and include a line in your gwt.xml so the compiler can find it.

<inherits name="" />

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>