JSF 2.0 New Features

來源:互聯網
上載者:User
JSF 2.0 proposal has been posted on March 2007 and planned for the release in last quarter of 2008. It will be shipped with JEE 6.0 release. Looking into the
features lits of the JSF 2.0, it is added lots of interesting features in the list and also they are aiming to attract more new developers to use JSF technology.

JSF 2.0 Features

Some of the interesting features includes Bookmarking for URLs, expanding the existing lifecycle mechanism, more support
for the AJAX requests, use annotations instead of faces-config.xml, introducing JSFTemplating concepts
and much more. It seems
the list size is big it will be great to see when the final version is released. Basically it is categorized into four parts:
Ease of development, New Features, Performance and Adoption. We will look into the each category with brief explanation. This tips based on the JSR 314 and the features list is taken from the original JSR document.

Ease of development
  • Component aggregation. Allow development of custom component with
    little or no Java coding. [A] Perhaps consider a standard set of
    aggregations.
  • Allow for "zero configuration" web applications. No
    faces-config.xml, no web.xml. If necessary, annotations will be used to
    supplement the configuration data.
  • Vastly improve the developer experience with regard to error
    messages that happen during iterative development, and even during
    deployment of the application. For example the EG will consider options
    including, allowing the developer to tell the runtime what stage of
    development the web application is in, and take action accordingly:
    Development, Test, Deployment. Line precise error reporting. Pluggable
    Exception Handling.
  • Provide default exception handling mechanisms. For example, all runtime errors get forwarded to an error page.
  • Eliminate the need to author a JSP tag handler when writing JSF components.
  • Leverage annotations to declare JSF artifacts (components, managed beans, navigation rules, etc) to the runtime.
  • Declarative Renderers, otherwise known as Renderers without resorting to out.println().
  • Real world, production view description technology, including
    templating: include something influenced by Facelets, JSFTemplating or
    Tiles in the specification.
  • Make it very easy to create CRUD based applications.
New Features
  • Expand the request processing lifecycle to be aware of Ajax. This
    may include describing a small developer-contract footprint JavaScript
    library as part of the JavaServer Faces specification.
  • Separate the "build the tree" and "render the tree" processes into two separate lifecycle phases.
  • Allow for partial tree traversel during lifecycle execution via Ajax.
  • Allow for bookmarkable JSF pages. More broadly, if HTTP GET can be used, it should be used.
  • Decent client side, inter-component and form-level validation (leveraging JSR-303 validation if possible).
  • First class support for bundling and delivering static resources
    associated with a component: images, stylesheets, scripts, etc. Should
    be able to specify default locations for resources.
  • Strategic additions to the Standard HTML RenderKit: Date Picker, Tree, Tab View, File Upload components.
  • Provide a mechanism to minimize the "Lost Update" and "Duplicate
    Button Press" problems. These mechanisms must be pluggable or
    customizable from the user.
  • Page actions: The ability to say, "when this page loads, invoke this action (via Ajax if necessary)."
  • Provide a mechanism to easily access persistent store.
Performance
  • Saving and restoring page deltas rather than saving and restoring the full view state each time.
  • Re-do UIComponent state saving with a view towards making stateless components the default.
  • Allow for moving as much of the event processing and inter-page
    component interaction into the client as possible. This may imply
    specifying client side controller framework.
  • Streamline the rendering process via caching if possible.
  • Improve the interceptor mechanism delivered via the PhaseListener
    feature so that the developer can control exactly what kinds of
    requests are allowed to be processed by each PhaseListener instance.
Adoption
  • Enable components to have a client based lifecycle in addition to,
    or instead of the server based request/response lifecycle. Such a
    client based lifecycle would enable use-cases such as drag-and-drop,
    master-detail and sub-dialogs on a single page interface web
    application.
  • Improve the UIComponent specification to allow an increase in the
    interoperability of UIComponent libraries from arbitrary vendors.
  • Enable applications to use features that are defined in the
    JavaServer Faces specification but are intended for use in the Java EE
    platform as a whole. For example, the managed bean facility is useful
    even in an application that only uses Servlets from Java EE but
    provides the rest of the web application features from software outside
    of the platform.
  • Allow JSF application resources to be accessed via REST.
  • Enable components that publish events via RSS/Atom.
  • Add support for REST (JSR 311)
  • Broad and pervasive support for scripting at all levels of the
    specification. It will be possible to use a scripting language to write
    all executable artifacts in a JSF application.
  • Specify command line interface for authoring JSF applications.
  • Support for passing values from page to page. This will be a
    standardization of the many different Dialog/Conversation/Scope/Flash
    ideas currently in use.
  • "Skinning", or "Themeing" of components.
  • An important target user for JavaServer Faces technology is the
    developer who relies on an Internet Service Provider (ISPv) to host
    their application, as well as hosting their development environment. It
    must be easy to iteratively develop a JavaServer Faces application that
    is hosted entirely on an ISP.

轉自:http://www.javabeat.net/tips/116-new-features-in-jsf-20.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.