After reconsidering Craig's advice on applying the MVC pattern within
JAX-RS, I think a view layer language would just add too many layers
and counteract what JAX-RS offers today. Its overkill and flies in the
face of the Jersey's elegance.
My conclusion from the conversation with myself on this thread is....
A resource representation is best expressed as Class in and of itself.
A resource representation is a "view layer model". A resource
representation is likely a bean, and in many cases is a composite of
multiple beans. Construct resource representations from entity EJBs.
Then use what the Jersey team intelligently chose to reuse, JAXB for
binding objects to hierarchical formats such as JSON and XML. That way
you can separate persistence from representation and avoid a lot of
headaches.
That being said, I'm still advocating adding annotations to
dynamically produce URIs from resource representation models NOT
"domain" models.
Jason Southern