Hi Paul,
On Thu, 12 Apr 2007 12:58:29 +0200
Paul Sandoz <Paul.Sandoz_at_Sun.COM> wrote:
> Jerome Louvel wrote:
> >> @HttpMethod
> >> @ProduceMime("text/plain")
> >> String getSomething() {...}
> >>
> >> whereas you seem to see methods like
> >>
> >> @HttpMethod
> >> SomethingRepresentation getSomething() {...}
> >>
> >> public class SomethingRepresentation {
> >> ...
> >> public String getValue() {...}
> >> }
> >
> > Actually, I think that both designs are useful and likely. I
> > probably didn't make this view clear enough in the past. So, we
> > should have strong support for both of them.
> >
>
> I don't see the value in having two solutions if one solution is
> sufficient. The former (Representation<T>) is simpler than the latter
> (modifying/wrapping/annotating T).
>
> I do not see the latter is being common or desirable from a design
> perspective. So i think we need to have some really compelling
> use-cases for the latter, which cannot be supported by the former, to
> justify the increased complexity and duplication it introduces.
>
I totally agree with this. I'd favor for "do one thing and do it right".
/Heiko