webtier@glassfish.java.net

Re: RESTful JSF?

From: Edward Burns <edward.burns_at_oracle.com>
Date: Fri, 14 Dec 2012 06:56:16 -0800

RK> Yes - you are correct - bookmarkable urls is not REST - it is a step
RK> in that direction. However, to really incorporate REST with JSF, you
RK> would probably need some sort of adapter that understands POST, GET,
RK> PUT, DELETE in a REST way. You probably would want direct access to
RK> the managed bean layer/EL..etc... You should also look at JSR 311.

TV> I agree,

TV> http://domain/blog/entry/9 that returns HTML => JSF 2 + pretty-faces

TV> http://domain/blog/entry/9 that returns JSON or XML (and support for
TV> POST, GET, PUT, DELETE) => JAX-RS (jsr 311)

I'd like to remind folks that JAX-RS 2.0 considered including an MVC
framework as part of their goals, but had to drop it as a matter of
priorities. There are lots of ways forward on this but perhaps a better
idea is to see what parts of JSF could be extracted out and used from
such an MVC framework. For example, the templating part of JSF
(Facelets) could potentially be extracted from JSF and made usable from
such a framework.

Ed

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