Reputation: 351
i create a sample project with GWT. in my project there are some classes and packages. my question is that what class or package finally convert to java script? server? client? or both? and what is server roll in project?
Upvotes: 1
Views: 383
Reputation: 21654
What java source code gets compiled into javascript is specified in your module definition gwt.xml file.
<module>
<inherits name="com.google.gwt.user.User" />
<source path="async"/>
<source path="dto" includes="Employee.java, Address.java"/>
<source path="shared" excludes="Calendar.java"/>
</module>
In the above module definition gwt.xml file, only the following are compiled into javascript
They do not have to involve "client", "server" or "shared", which are simply suggested names of folders to be used.
Whatever else folders not specified in the module gwt.xml file will be only used as server-side.
All the sources/resouces/classes specified inside the gwt.xml file will also be available fo server-side use.
Upvotes: 5
Reputation: 954
code inside the "client" part is translated into Javascript. code inside the "server" part is pure java and runs on the server side.
Upvotes: 0