We are about to create a mobile version of our web page. In that page we have used RPC services in a service way, not totally entity oriented. So we are going to have two clients (web and mobile) calling one server.
Now we want to reuse all that server code supporting several client versions and avoiding all the “dto version hell” that the RPC calls have.
I have seen that we need to create a wrapper, another layer in the server, for exposing methods to the mobile versions (GWT+phonegap and in the future: IOS, Android…). Later this layer would reuse all the server code (model, repositories… etc), in the server the access to BigTable is done through Objectify.
Which technology would you use for this new layer?
For mobile apps I like to use AutoBeans + RequestBuilder on the Client and AutoBeans and Restful API which (also) produces JSON on the server side.
With AutoBeans you define the structure of your data with Java interfaces. (Which gives you something to program against) and AutoBeans handles the conversion from Object to JSON and from JSON to Object for you on the server and on the client as well.
In combination you can build a very fast and good architectured RPC. AutoBeans is used by RequestFactory as a default mechanism for serialization.
If you ever decide to support other platforms you can still use the JSON and parse it there. If you decide to support a native android application the AutoBean mechanism should just run fine on the android vm.
A good example for AutoBeans can be found here: http://code.google.com/p/google-web-toolkit/wiki/AutoBean