views:

23

answers:

1

Hi, I would like to ask what's in the .client file and what's in the .server file for GWT? I followed a couple of tutorials asking me to paste this code into .server and .client file but unsure what these files are for? Also it involves a XML file and CSS file. Does anyone know how these files interact with each other? Can anyone explain?

If that's the case, can we also control what goes to cache into the client side and what requests are sent to server to retrieve data?

+1  A: 

Code in the client package will get compiled by the GWT compiler down to JavaScript, which will be run in the browser. The bulk of these files are generally cached by default, but you can configure your server to cache these differently if you want. I suggest asking a new question for that though, since that's its own topic.

Code in the server package will run on your server, as Java, and respond to requests from the client.

To learn more about client/server communication, I suggest the official docs. And in general, the Getting Started guide is very helpful for answering the types of questions you're asking.

Jason Hall