Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importance of Shared Package in GWT

Tags:

java

gwt

I realize that GWt doesn't compile the classes not in the Client package. But what is the importance of the shared package? What are the classes that I need to put in this package?

like image 711
unj2 Avatar asked Jul 28 '10 18:07

unj2


People also ask

What is GWT XML file?

The contents of the . gwt. xml file specify the precise list of Java classes and other resources that are included in the GWT module. For all the details on how to create a GWT Module, consult the Modules Fundamentals page.

Are all files referenced by your GWT module such as HTML CSS or images?

These are all files referenced by your GWT module, such as Host HTML page, CSS or images. The location of these resources can be configured using <public path = "path" /> element in module configuration file. By default, it is the public subdirectory underneath where the Module XML File is stored.

What is GWT client?

GWT contains a number of HTTP client classes that simplify making custom HTTP requests to your server and optionally processing a JSON- or XML-formatted response. GWT contains a set of HTTP client classes that allow your application to make generic HTTP requests.


1 Answers

What are the classes that I need to put in this package?

Any logic or data types that are used by both the client and the server. This will save you from duplicating code across both sides, and potentially keep the logic and data types consistent.

like image 106
bakkal Avatar answered Oct 12 '22 22:10

bakkal