users@jersey.java.net

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

From: Pedro Nuno Santos <pedro-nuno-santos_at_telecom.pt>
Date: Tue, 3 Jun 2014 14:23:16 +0100

I'm no expert on the matter, but I'll give my 2¢

1. Do you use server-side MVC in your projects today? If yes, how?
Yes, we have web applications that are a hybrid of single page apps (js based) and your typical server-side templated pages. The way we are currently generating non-static html pages is through jersey's server-side MVC (jsp templates). Those pages do have some JS that allows some interactions to occur (via a backend API) but we do not load the entire web application in the first request.
As a side note I also find it very useful to use a single "framework" (i.e. jersey) to handle all server side interactions, be them API calls or web page requests. It facilitates server interactions to be more consistent in terms of behaviour and also promotes consistency in the way requests are handled by the system.

2. Is it a technology of the past in your opinion?
I believe that the hype is strong with SPAs... in part probably because of the rise of mobile (whose architectural patterns are "leaking" to the web) and the popularity of some frameworks like Angular or even the language itself (Javascript).
As always the future will never be "black" or "white" but several shades of grey... What I mean is there will always be a place for MVC at least I don't see SPA completely replacing "traditional" web pages (and I'm not alone: http://roca-style.org https://blog.twitter.com/2012/improving-performance-on-twittercom).
So as long as the integration of MVC is optional, and I'm not forced to depend on it when all I want is to create an API, then I don't see why it shouldn't be available in JAX-RS, after all, when we say "REST API" we can very well be referring to a "traditional" web site, serving html pages generated dynamically at server-side... it's all about how you design it.

3. Do you think it is worth standardizing as part of JAX-RS.next?
Yes

4. Do you have any other comments/feedback on the subj.?
Nothing comes to mind right now

Cheers,
Pedro

From: Marek Potociar [mailto:marek.potociar_at_oracle.com]
Sent: 03 June 2014 13:06
To: users_at_jersey.java.net
Subject: [Jersey] Action-based MVC in JAX-RS.next?

Hello Jersey Users,

As some of you may know already, in a recently conducted Java EE 8 survey, there was significant interest in adding an action-based MVC framework to the platform in EE 8. After some analysis, we are considering to add this as part of our JAX-RS.next work. In fact, as some of you may recall, this was on our list for JAX-RS 2.0 but we've never got a chance to discuss this topic in detail in our JAX-RS Expert Group.

We plan to base our standardization on the existing Jersey MVC templating API and SPI<https://jersey.java.net/documentation/latest/mvc.html> and add integration (in a Java EE app server environment) with JSF Facelets and it's supported scopes (session, conversation, flow, flash). Please, note that JSF integration support would be constrained to environments where Facelets support is available, i.e. stanadalone JAX-RS would not be mandated to provide this support and thus it would not add Facelet dependencies to standalone JAX-RS deployments - we took the same approach when adding the BeanValidation or Servlet integration support in the past.

Now the question has been raised<https://java.net/projects/jax-rs-spec/lists/jsr339-experts/archive/2014-05/message/12> whether server-side MVC is a technology of the past and whether it is worth standardizing as such. So I'd like to solicit your feedback here. Please, let us know what you think:

1. Do you use server-side MVC in your projects today? If yes, how?
2. Is it a technology of the past in your opinion?
3. Do you think it is worth standardizing as part of JAX-RS.next?
4. Do you have any other comments/feedback on the subj.?

Thank you,
Marek