I believe thats a very common problem not only for Android apps. What you 
basically do is you use DTO (Data Transfer Objects) for passing the data 
between client and server and use different objects on the server for 
persisting the data. On one hand a good design decision because why would your 
API to the android client need to change if you change something in the 
persistence ? It decouples things. Yes you have to write a helper to convert 
between DTOs and your JPA enabled objects but its all worth it.

that my 2 cent
christian campo

Am 12.04.2011 um 19:50 schrieb Simon Watson:

> Hi, I'm very new to Hessian and, having got the basic examples working plus 
> reviewed the docs, I have a question - is it possible to pass Java objects 
> via Hessian that implement a common interface, but have different 
> client/server implementations?
>
> I'd like to use it for communication between an Android app and a Spring web 
> application. The Java interfaces for objects passed back and forth are 
> shared, but the server-side implementation of them contains additional JPA 
> stuff which I'd rather not have on the Android client side. Is there any way 
> of (de)serializing objects with a neutral name (rather than fully qualified 
> class name), and define a mapping between this and the different 
> implementations on each side?
>
> Thanks,
>
> Simon.
>
> <ATT00001..c>


-------------------------------------------------------------
compeople AG
Untermainanlage 8
60329 Frankfurt/Main
fon: +49 (0) 69 / 27 22 18 0
fax: +49 (0) 69 / 27 22 18 22
web: http://www.compeople.de/

Vorstand: Jürgen Wiesmaier
Aufsichtsratsvorsitzender: Christian Glanz

Sitz der Gesellschaft: Frankfurt/Main
Handelsregister Frankfurt HRB 56759
Ust-Ident.-Nr: DE207665352
-------------------------------------------------------------



_______________________________________________
hessian-interest mailing list
hessian-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to