I started a project with Google app engine, when I use eclipse to start, it automatically generate 4 package for me. My app package name is com.appspot.xxxx
and it auto generate these three for me开发者_如何学运维:
com.appspot.xxxx.client
com.appspot.xxxx.server
com.appspot.xxxx.shared
What does these three package convention means? Thank you.
First of all, to be clear, these packages are being created because you've chosen to create a Web Application that includes GWT code.
GWT compiles the code in your client
and shared
packages (by convention) into JavaScript which will run on your user's browser.
The GWT client-side code will communicate to your server, whose code will go in the server
package. The server-side code can (again, by convention) use code in the shared
package, so logic like validation can be used in both client and server code.
This is not an artifact of the app being an App Engine app, but rather of it being a GWT app.
When you register the application, it will be hosted at http://xxxx.appspot.com
. You choose the value for xxxx, e.g. your application's name.
精彩评论