Hi John,

[...]

> I think it's helpful to think in terms of fundamental, "base"
> resources and composite, "view" resources.  An analogy is the
> difference between "tables" and "views" in a relational database such
> as Oracle.

I agree, this is a useful analogy.
 
> As you noted, in your example, it could be modelled where the same URL
> is used but the two facets are distinguished by whether the caller
> asks for the base (e.g., application/xml) or a human version (e.g.,
> xhtml).
> 
> For other cases, I think it makes more sense to have the facets more
> or less completely disjoint.  The human useful, composite views may
> make a lot more sense to the user if they have their own naming
> hierarchy, etc. and just use the various, lower-level resources as
> services, if you will, that are managed separately.

I agree and would add that those lower-level resources (or core resources)
could be modelled and exposed as either:
 - persistent POJOs (db4o, EJB3, etc.)
 - RESTful resources (via a separate Restlet application for example)

In the second case, you could even think about a two-layer approach, where
on Web Component would remotely access to an internal Core/Business
Component. This way, your Core Component could be shared between several
'view' applications/components.

Best regards,
Jerome  

Reply via email to