users@jax-rs-spec.java.net

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

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Mon, 30 Jun 2014 20:54:32 +0200

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?

Regards,
Arjan