I have multimodule maven project. Root Module: parent
contain: server
, shared
, client
submodules.
I wonder where in that structure should I put Proxy classes
? Now I have them in client
module, but I would like to put them into shared
module.
Please give me your thought about that. Is this make any sens. I am asking, cause I saw diferent versions.
Here is my proxy class:
package pl.derp.web.proxy;
import java.util.List;
import pl.derp.server.entity.User;
import com.google.web.bindery.requestfactory.shared.ProxyFor;
import com.google.web.bindery.requestfactory.shared.ValueProxy;
@ProxyFor(value = User.class)
public interface UserProxy extends EntityProxy {
public String getName();
public void setName( String name );
}
The Proxy interfaces need to be available to the client (browser) and server. So they need to be somewhere that both can see the source and classes.
Although your server side source will not reference them directly it is used by the server side part of the build and runtime.
The client source code uses them heavily for your domain code and in the generated plumbing.
We have a web client module that is split in to server/shared/client packages. Having a different module should be OK but I think your shared module will need to export the source.