users@jax-rs-spec.java.net

[jax-rs-spec users] Re: [jsr339-experts] MVC

From: Joshua Wilson <javajoshw_at_gmail.com>
Date: Mon, 30 Jun 2014 15:11:03 -0400

On Mon, Jun 30, 2014 at 2:54 PM, arjan tijms <arjan.tijms_at_gmail.com> wrote:

> On Monday, June 30, 2014, Joshua Wilson <javajoshw_at_gmail.com> wrote:
>
>> Arjan,
>>
>> To answer you question about why use action based MVC please consider
>> this quote from a post on stackoverflow.
>>
>
> I know the quote well. It's from my OmniFaces team mate and ZEEF co-worker
> Bauke ;)
>
> In fact, I have discussed this very part with him and he mentioned that
> Spring MVC was given as an example but pretty much everything that can
> return a JSON or XML response would be enough. Even a simple Servlet would
> work, see e.g. this one:
> http://stackoverflow.com/questions/4112686/how-to-use-servlets-and-ajax/4113258#4113258
>
> The advantage of Spring MVC and JAX-RS above plain Servlet is among others
> that parameters are neatly parsed, but for that advantage JAX-RS as it is
> now is quite enough.
>
> There are also definite disadvantages with this approach. With JSF you can
> not post back something that was not initially rendered. This provides
> automatic protection against things like enabling a disabled component via
> javascript, or adding extra values or elements in the hope that these would
> be accepted (like RoR's mass assignment vulnerability).
>
> I appreciate the example though, and I guess it's one of the first being
> given.
>
> Would you say that "the ability to have finer-grained control over HTML"
> is THE driving factor for adding a second web framework to Java EE?
>

No, I think the driving factor is the existence of Spring MVC. I think
that the community sees JSF as difficult due to it's early issues and they
do not equate it to Spring MVC. Therefor they desire a "Spring MVC" like
API/SPI in Java.

I would think that the biggest questions now are:

1) Do we create a new action based MVC spec?
2) Do we change JSF?
3) Do we let Spring MVC continue as the dominate player in the action based
MVC arena?

My preference is for number 1. Though I think Bill Burke has an
interesting idea that might be worth considering about just creating an SPI
for all other MVC frameworks to adhere to. (I need to think more on that
one.)

Personally I do not think 2 is an option. And it appears the community
does not want 3.

Joshua


>
> Regards,
> Arjan
>