users@jersey.java.net

Re: [Jersey] Putting the RESTful "connectedness" around my existing Domain objects

From: Jason Southern <jason_at_4southern.com>
Date: Fri, 10 Jul 2009 16:55:31 -0400

Craig,

Good points. I hadn't considered using MessageBodyWriter and
MessageBodyReader as the boundary between view and business models.
Something I'll certainly give some more thought to.

As for including JAX-RS annotations for URI generation, its has its
limits. I don't expect the framework could define an set of
annotations that would work for all application use cases
unambiguously. But, I think it still can be considered. Especially if
one only used them on view models and not business models. You are
absolutely correct that applying them to business models could result
in having to carry the annotations into every distributable. This is
something worth avoiding. I guess the question you are raising is a
framework designer, where does one draw the line between ease of use
and ease of misuse. Struts gives us some lessons to consider.

Thanks for the insights,
Jason