Hello
Im looking for the best way to make small data objects that I can return through a webservice.
The objects will be needed for presentation and there is no use for features like:
- Which prefetch/relations possibilites there is for a entity.
- If a field has changed since loaded.
- Information needed to update database again.
Essentially I would like for the objects only to contain entityfield values and prefetched collections, nothing else.
In our scenario the objects returned will be used for websites and flash. We want the data needed to be transfered to be as small as possibly and the objects to be as clean as possibly.
One way to do it would be to make these smaller classes by hand and some convert functions.
But with 40+ tables in our project we would like to find a better way, or maybe doing some templating with methods which convert the normal entity classes to these smaller classes.
We are currently using Selfservicing. But don't mind if solutions is for adapter only.
Has this already been done before?
Any suggestions will be appreciated.