Reputation: 343
I am new to client-server application development (only experience with Java desktop).
My query is this: I have followed an excellent GWT tutorial on YouTube and understand basic OO
principles being applied to client and server services and implementations. However, what if a class isn't a service - say a data class like Person
storing basic information that will be used by the service classes. Where should I store these separate classes?
To give you an insight in to my current structure (using Client
package hierarchy).
I have: com.me.example.client
- then client.GUI
& client.service
packages contained here.
Upvotes: 1
Views: 174
Reputation: 2156
You can choose between
When choosing for a seperate shared package you must add the following line to your gwt.xml
<source path='shared'/>
Extra info : these classes are needed at the client side, and thus need to be compiled to javascript by the gwt compiler. When putting them in client this is already the case (because client is already configured in .gwt.xml). When putting them in shared, you must tell so to the gwt compiler.
Upvotes: 1