Follow Us on Twitter

JSF 2.0

by gerbrand on February 8, 2010 · 0 comments

In my report on JFall 2009 I already wrote about JSF 2.0. I wanted to make an extensive posting about new features in JSF 2.0, but then I came across this excellent posting of July last year: What’s New in JSF 2? by Andy Schwartz of Oracle. I won’t rehash this and many other excellent postings on jsf – I’ll just shortly write what’s great about JSF 2.0, in comparison to JSF 1.2.

In short, main new feature of JSF 2.0 is standardization a frameworks that extended JSF 1.2:

  • Ajax – provided in JSF 1.2 by amongst others by Richfaces (ajax4jsf). Standardization allows different ajax-libraries to work together.
  • Other scopes besides application, session and request scope – provided in JSF 1.2 by amongst others Spring Webflow, JBoss Seam and Apache Orchestra. One notable flow is the flash-scope: a scope that is longer than the request scope, but shorter than the session scope. This scope can be used when you want to persist values between requests on the same page, but don’t care if a value is lost when the users navigates away from that page.
  • Bean validation – also provided by JBoss Seam, and various other frameworks, now standardized under JSR 303. You add declarative rules to beans, such as ‘both street and house number should be filled in’, or ‘car-usage is filled in when lease-car is yes’. The jsf-engine will generate both client-side and serverside code for that – so you won’t have to implement the same functionality twice in cumbersome java and javascript code.
  • Facelets – Apache Facelets replaced JSP as rendering engine for JSF 1.2 – in JSF 2.0 facelets has become a standard – and makes JSP legacy (at least when you use JSF). Facelets allows a developer to very easily create (truly) reusable components and templates.
    Creating re-usable components is something that is done rarely (well) in frontend development, and even more rarely web development – similar or even the same functionality is recreated countless times within the same company and even the same project. Facelets can change that!
  • Better support for GET-request – which was already provided by Seam for JSF, and many other webframeworks. At least now you’re not limited to POSTs when using JSF. Especially useful if you want to create bookmarkable or search-engine friendly pages.

More shortly: JSF is a standardization for webframeworks. Many webframeworks and -libraries are or are becoming JSF 2.0 compatible, such as Richfaces, ZK, Icefaces,even Flex (Flash) and of course Oracle’s ADF.
This standardization not only means these frameworks can work together, more important is that a developer who has experience in developing for one framework, can reuse his knowledge when he starts developing with another framework. This can greatly shorten the many months needed to learn yet another web-framework.

JSF 2.0, 3.5 out of 5 based on 4 ratings
Ratings:
VN:F [1.9.22_1171]
Rating: 3.5/5 (4 votes cast)
Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Previous post:

Next post:

About Whitehorses
Company profile
Services
Technology

Whitehorses website

Home page
Whitebooks
Jobs

Follow us
Blog post RSS
Comment RSS
Twitter