webtier@glassfish.java.net

Re: RESTful JSF?

From: Edward Burns <edward.burns_at_oracle.com>
Date: Thu, 13 Dec 2012 11:40:57 -0800

>>>>> forums_at_java.net said:

MD> Struts2 is having built-in support for REST and so Spring MVC. Ruby
MD> on Rails on the other hand is having a strong built in support for
MD> REST. But JSF 2.2 specification does not contain any such support,
MD> and it seems this is not an agenda in future JSF specifications. Why
MD> JSF team is simply ignoring REST?

TV> JSF team may think there is an other spec for REST in JavaEE stack: JAX-RS
TV> JAX-RS is a very cool framework to expose resources via URL.

TV> If you are looking for bookmarkable urls in your JSF application, have a
TV> look at pretty-faces (by ocpsoft).

R> One of the features added in JSF 2.0 specification and implementation was
R> bookmarkable urls. Lots of blogs on this such as this one:
R> http://java.dzone.com/articles/bookmarkability-jsf-2

Hello MissDuke,

The frameworks you list, Struts2, and SpringMVC, and Rails are all
action based frameworks. In action based frameworks, any management of
User Interface component state is not managed by the framework and is
left as an application level concern. Such frameworks are inherently
better suited to RESTification. Now, that does not absolve component
based frameworks, such as JSF, from recognizing benefits from
RESTfulness, but it does present an additional challenge that action
frameworks simply do not have.

Road-map wise, for JSF, I think the community would be better served by
trying to reduce the amount of statefulness in general as a first step.
Once we achieve that, I think it's worthwhile to look at proper
RESTfulness.

I hope this helps answer your concerns.

Ed

-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| homepage:               | http://ridingthecrest.com/