Hi Sven, Is there any "best-practise" on how to model resources, which consist of > other resources as well? I read the book of Richardson&Ruby recently and > wondered how I could map their idea of "fully connected resources" to a > hibernate-domain-model.
It depends what you mean by resource composition. If you mean separating a Presentation layer from a Backend layer, you can achieve this with Restlet Applications and local dispatching or requests. Hibernate has it's annotations, so you can model the relations between > objects. But when it comes to REST, you don't need a full objectgraph. > How to solve this problem? By just getting an identifier of the entities > the object contains and qrapping a String around that? First, you need to clearly separate your Restlet resource classes from your Hibernate domain classes as they don't have the same granularity. Either you have several resource classes exposing a different subgraphs of objects or you use composite resources that make local requests to other finer grained resources. Please detail your use case with a concrete example. Best regards, Jerome

