Latest Links: JSF vs. REST
I've been very happy with the choice of Struts 2 for Roller, but I still follow JSF because it's the Java standard. A couple of articles by Ryan Lubke about what's coming in JSF 2.0 got me thinking about JSF again.
- Ryan Lubke's Blog: JSF 2.0 New Feature Preview Series, pt. 2.1: Resources
"Previous versions of JSF had no facility for serving resources" - Ryan Lubke's Blog: JSF 2.0 New Feature Preview, pt. 1: ProjectStage
"the JSF 2.0 EG has given a nod to Ruby on Rails' RAILS_ENV functionality"
One of my problems with JSF is REST. REST fans say JSF is inherently RESTless because every JSF request is a POST. JSF advocates say JSF can do GET and bookmarkable URLs if necessary and that's good enough.
- Bill de hora on JSF and REST
"JSF is clearly not focused on or suitable for working in the REST style to the extent REST principles seem to be actively excluded from the design." - Gavin King on JSF and REST
"On these community sites that claim you can't build restful application with JSF. I mean it is total nonsense. It is not even remotely true." - Gavin's JSF bookmarkable URL example
In the comments thread of an anti-JSF story at The Server Side.
Fortunately, the plans for JSF 2.0 indicate that REST improvements are coming:
- Java.Net TWik: JSF 2.0 Requirements Scratchpad
Mentions REST API (JSR-311) and navigation without using POST - JSR-314: JavaServer Faces 2.0
"Allow JSF application resources to be accessed via REST" and "Add support for REST (JSR 311)"
Unfortunately, it sounds like all they're planning to do is make it easier to create bookmarkable URLs and add some support for the JSF-311 REST API. Why can't the goal be to make JSF applications RESTful by default? Why can't JSF ensure that POST is only used when required by the application (not the framework) and JSF URLs are simple, clean and always bookmarkable.
Posted by Lincoln on November 18, 2008 at 01:46 AM EST #
Posted by Casper on May 12, 2009 at 11:21 AM EDT #