Ryan,
[...]
> Jerome, I'm sure you've probably repeated yourself a thousand times on
> this, but what do you propose for cases where you can't annotate the
> representation POJOs? Even in cases where you *can* annotate the
> representation POJOs, though, I think I would prefer to keep separate
> the concepts of *what* is being represented from *how* it's being
> represented, like it is with the MVC pattern. I don't want to see
> dependencies on the rest apis in my POJOs.
In the REST style, the *what* is the Resource and the *how* is the
Representation. For representations, there are two aspects: the supporting
POJO (that should have dependency on the JSR API) and the way this POJO is
serialized (which can vary from XML, JSON, plain text, HTML, etc).
Sometimes the representation POJO will know how to serialize itself (a
toXML() method for example), sometimes it won't and an external
serialization mechanism will be needed.
[...]
Best regards,
Jerome