jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: MVC

From: Markus KARG <markus_at_headcrashing.eu>
Date: Sun, 29 Jun 2014 18:39:51 +0200

I gave the topic another thought from the aspect of Java EE as a platform
(ignoring REST), and like to add that I see the technical merits of
combining the two technologies JAX-RS and JSF into one. In coarse,
redefining JSF to become an implementation of the JAX-RS 'Feature' interface
providing Filters, Entity Providers and Exceptions Mappers, and dropping all
its internal plumbing in favour of JAX-RS, is actually appealing. This won't
change anything w.r.t. existing JAX-RS, but it would spare JSF
implementations some duplicate code, obviously, as the JAX-RS-Servlet and
the JSF-Servlet mostly do the similar things internally (path matching,
parsing, rendering, exception handling, CDI, ...). The "simple" difference
between JAX-RS and JSF is that the first is for machine users, the latter
for human users. So an existing JAX-RS application could become human-usable
simply by adding JSF.jar (or enabling a "Use JSF" config property) and
providing some nice facelets in theory.

So my proposal would be, go with separated PDFs provided by a joint EG,
keeping JAX-RS clean of MVC, but allow frameworks like JSF to use the
technical core of JAX-RS if that is beneficial for them.

As this topic mostly is driven by the frameworks needs, less by
RESTafarians, I'd like to propose to invite at least Ed Burns to become a
JAX-RS 2.1 Expert Group member so he can take care that we understood the
JSF needs and he sees what he can drop once accepting JAX-RS as new
foundation.

Regards
Markus

-----Original Message-----
From: Markus KARG [mailto:markus_at_headcrashing.eu]
Sent: Freitag, 30. Mai 2014 23:02
To: 'jsr339-experts_at_jax-rs-spec.java.net'
Subject: RE: [jsr339-experts] Re: MVC

Frankly spoken, I am not clear about the intention of adding MVC support
particularly to JAX-RS. What do users expect to get in the end, keeping in
mind that JAX-RS's very own target is to provide a framework for RESTful
applications -- which by definition are stateless, while MVC is stateful,
just like JSF is. Could it be the case that MVC, just as with SSE (see my
other posting), is a candidate for a separate API built ONTOP of JAX-RS (an
OPTIONAL extension to JAX-RS in a technical sense)? I think so, so if Bill
Shannon likes to get that, and the JAX-RS EG group denies this to be
RESTful, it might be an indicator that my proposal of splitting JAX-RS into
"Java API for http" and "Things built ontop of that, like REST, SSE, and
MVC" is valid and should be implemented. If JSF wants to get an MVC layer
implemented by JAX-RS technology, the way to go then would be that "we"
(JAX-RS) provide "Java API for http" (= the technology defined by JAX-RS
currently), while the JSF guys *use* that to build their MVC stuff ontop.
But frankly spoken, I do not see why "we" (JAX-RS) should provide MVC, is
that is not REST.

Regards
-Markus


-----Original Message-----
From: Bill Burke [mailto:bburke_at_redhat.com]
Sent: Freitag, 30. Mai 2014 21:12
To: jsr339-experts_at_jax-rs-spec.java.net
Subject: [jsr339-experts] Re: MVC



On 5/23/2014 4:36 AM, Sergey Beryozkin wrote:
> Hi
> On 22/05/14 22:05, Santiago Pericas-Geertsen wrote:
>> Dear Experts,
>>
>> As you may have seen in the Java EE 8 survey, there was significant
>> interest in adding an MVC framework to the platform in EE 8. After
>> some analysis, we are convinced that the best place for this work is
>> in JAX-RS.next. In fact, as many of you may recall, this was on our
>> list for JAX-RS 2.0 but we've never got a chance to discuss it in any
>> detail.
>>
>> I'm aware of some discussion in the JSF alias in relation to MVC in
>> general, and its support as part of JAX-RS in particular. I plan to
>> send an e-mail to the JSF alias as a way to establish a liaison
>> between the two groups. I believe their expertise would be of great
>> value for us and will help us design a framework that addresses the
>> requirements of the EE community.
>>
> Look forward to JAX-RS supporting MVC and SSE. As far as the future
> JAX-RS MVC is concerned, I hope it will not only target EE users
> though :-). i.e, it would work even if no JSF is available, but of
> course the input from JSF experts will be of great interest.
> Using Jersey MVC as a template would be a nice start IMHO, we have a
> less involved support for it, but I think it is close enough to the
> way Jersey does it in some cases.
>

I am 100% against MVC in JAX-RS. Are we really going to introduce a legacy
and now defunct pattern to JAX-RS? The trend and future is Angular JS or
GWT apps with simple RESTful back ends.

This is wrong guys. You will regret adding and it will end up on the long
list of Java EE features that nobody uses and bloat we'll have to support.

SSE and now MVC, I'm really disappointed in the direction of JAX-RS.

--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com