Vincent, > Sorry if I wasn't clear. Let me try again. > > You display 2 resources on one page: > > 1) your profile. By default, the Profile section display your > name, but it include a More link that let's you display your > name, your email, the number of posts you've made, etc. > > 2) the forum > When you click on a forum thread, the Forum resource must pull the > Profile resource out of the DB in order to redisplay the page. > > When you click on the More link (in the Profile section), the > Profile resource must pull out the Forum info out of the DB to > be able to retrieve the page. > > So, you're introducing a dependency between these two resources. > > If you later decide to display the weather report on that > page, both the > Profile and Forum resources will have to be made aware of the > WeatherReport > resource in order to display the page. And so on. > > If you say that the Profile and WeatherReport resources are > part of the > representation of the Forum resource, you must also admit that the > Forum is part of the Profile's (or WeatherReport's) representation. > > I think this creates an unmanageable graph.
I wouldn't say that a resource is part of a representation, rather that a representation can be a composite representation, agregating several representations into a larger one. In a typical object-oriented model, you will frequently have such cross-references in your domain model, there is nothing wrong about that. Nothing forces your to model everything as resources, you could rely on a set of EJB Entities or on POJOs persisted in db4o for examples. They would handle this cross-references naturally. Even if you model everything as resources, you can also model hyperlinks between all resources. Sorry, I don't see what is unmanageable here... Best regards, Jerome