5

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?

unj2
  • 52,135
  • 87
  • 247
  • 375
  • 1
    GWT will compile whatever packages you tell it to (in your .gwt.xml file), including any shared packages. – Jason Hall Jul 28 '10 at 18:29

1 Answers1

8

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.

bakkal
  • 54,350
  • 12
  • 131
  • 107
  • Do not place anything within the shared package that you don't intend on being client-side friendly; i.e. translatable.. – wulfgarpro May 07 '11 at 02:09