Hello Danilo, I work on a similar kind of project and we decided to split the source code into three eclipse projects : client, common, server. "Common" mainly contains the Java beans and is not based on Restlet. "Client" is the GWT project and depends on "Common". "Server" depends on "Common" also.
A build script (ant+jenkins) allows us to generate a "common.jar" archive that can be shared and used, for example, by the Web application (packaged as a war file, since the customer uses Weblogic). As a side note, the build script generates also the static GWT files, distinct jars for the server code (one for the dao, one for the server code except the dao). As the server is based on annotated interfaces, we could imagine to export these annotated interfaces in a separate jar in order to help client projects based on Restlet to wrap the interfaces and automatically cope with serialization/deserialization. One can also add Maven repository in order to store the distinct releases of the generated archives. Regarding the third party client, you're right. Either your code reuse annotated interfaces, or not. In the first case, keep attention to the version of the beans on both sides (server and client) otherwise the automatic serialization may fail. In the second case, I think I will use one of the textual formats you mention. I hope this will help you. Best regards, Thierry Boileau Hi all, > > Sorry for the long text but I have to provide the such information in > order to solve my doubt. > > I have the following scenario: > > - Server-side: > - Java SE > - Jetty > - Restlet framework > - "My system API" > > > - Client-side (mandatory): > - GWT consuming "My system API" > > > - Client-side (planned): > - 3rd part applications consuming "My system API" > > I'm concerned about the project organization and the team development over > it. I don't know if I am in the correct way to solve that. I've tried > creating an project to keep the java POJOs/Beans and adding its reference > to the Java and GWT project. But I got some reference errors in GWT (I > still trying to solve it right now ... LOL) > > So, what is the best way to share the java POJO/Beans code to the both > projects (Java project and GWT)? I would like to share this source between > both projects and keep track of updates. > > I mentioned the "client-side (planned) / 3rd part applications" because I > read the wiki ( > http://wiki.restlet.org/docs_2.0/13-restlet/21-restlet/318-restlet/303-restlet.html). > In this case, how to keep my server loose coupled? For example, using JSON > / XML / ? instead of java serialization. > > Best regards, > > -- > Danilo Rosetto Muñoz > munozdan...@gmail.com > http://br.linkedin.com/in/danilomunoz > > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2975832