users@jersey.java.net

[Jersey] Re: Action-based MVC in JAX-RS.next?

From: Miroslav Fuksa <miroslav.fuksa_at_oracle.com>
Date: Wed, 4 Jun 2014 11:07:42 +0200

Hi Gili,

I have a question. Why do you think that using MVC when you have one view per model is a waste? When generating HTML for example I think it is good to separate html code from your model and extract functionality of HTML generation from your resource methods. This is quite convenient even if you have only one view I would say.

thanks
Mira
  
 
On Jun 3, 2014, at 6:20 PM, cowwoc <cowwoc_at_bbs.darktech.org> wrote:

> On 03/06/2014 8:05 AM, Marek Potociar wrote:
>> 1. Do you use server-side MVC in your projects today? If yes, how?
>
> Very loosely speaking, yes. Some of my resources return a JSON or HTML representation depending on whether the target audience (computer vs user). So yes, technically speaking I have multiple views per model.
>
>> 2. Is it a technology of the past in your opinion?
>
> Technology of the past, no. But I think it has been overhyped for many years. Most people seem to use it even when they only have one view per model (which I think is a waste). I think we are far from a point where *all* resources need multiple views and also far from the point the cost of an MVC framework outweighs its benefits. This is a fairly trivial piece of technology most people should be able to build themselves.
>
>> 3. Do you think it is worth standardizing as part of JAX-RS.next?
>
> No.
>
>> 4. Do you have any other comments/feedback on the subj.?
>
> Aim for modularity. I think only the core APIs should be bundled as part of Java EE. Anything other technology that only *some* part of the community uses should be left as an external plugin.
>
> Gili