1 / 15

JavaServer Faces: The Fundamentals

JavaServer Faces: The Fundamentals. Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD). JavaServer Faces (JSF). is a “server side user interface component framework for Java™ technology-based web applications”

Download Presentation

JavaServer Faces: The Fundamentals

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)

  2. JavaServer Faces (JSF) • is a “server side user interface component framework for Java™ technology-based web applications” • is a specification and reference implementation for a web application development framework • Components • Events • Validators • Back-end-data integration • is designed to be leveraged by tools • NetBeans, RAD (Rational Application Developer), Eclipse, JDeveloper, etc.

  3. Why JSF? • MVC for web applications • Easy to use • Extensible Component and Rendering architecture • Support for client device independence • Standard • Huge vendor and industry support • Built-in UI component model (unlike JSP and Servlet)

  4. Why JSF? (cont’d) • Offers finer-grained separation of behavior and presentation than JSP • Component-specific event handling • UI elements as stateful objects on the server • UI-component and Web-tier concepts without limiting you to a particular scripting technology or markup language • Can work with any presentation technology including JSP

  5. JSF is a UI Framework for Java WebApplications

  6. JSF Architecture

  7. Important Basic Capabilities • Extensible UI component model • Flexible rendering model • Events-based interaction model (as opposed to the old “request/response” model) • Validation framework • Basic page navigation support • Internationalization • Accessibility

  8. How the JSF Specification Fits In (prior to Facelets)

  9. Facelets • Facelets is a powerful but lightweight page declaration language that is used to build JavaServer Faces views using HTML style templates and to build component trees. • Facelets features include the following: • Use of XHTML for creating web pages • Support for Facelets tag libraries in addition to JavaServer Faces and JSTL tag libraries • Support for the Expression Language (EL) • Templating for components and pages

  10. Facelets (cont’d) • Advantages of Facelets for large-scale development projects include the following: • Support for code reuse through templating and composite components • Functional extensibility of components and other server-side objects through customization • Faster compilation time • Compile-time EL validation • High-performance rendering • In short, the use of Facelets reduces the time and effort that needs to be spent on development and deployment. Source: Java EE 6 Tutorial

  11. JSF Developer Roles

  12. Roles Definition • Page Author • Creates the user interface of a web application • Familiar with markup language(s) to be used • Assembler of prebuilt components • Component Writer • Creates reusable components, renderers, and libraries • Components – Render-independent properties • Renderers – Render-dependent properties

  13. Roles Definition • Application Developer • Creates the server-side functionality of a web application not directly related to the user interface • Business logic components implemented in standard J2EE ways (EJBs, JavaBeans, Connectors) • Persistence tier components implemented in standard J2EE ways (EJBs, JDBC, Connectors) • Model data exposed to user interface via JavaBean programming model • Validator, Converter, Event handler

  14. Roles Definition • Tool Provider • Creates tools to assist page authors, component writers, and application developers • GUI-oriented page development tools • IDEs to facilitate creation of components • Application generators (from high level description) • Web application frameworks that utilize JSF components for their user interface • JSF Implementor • Provides runtime environment to execute JSF webapps J2EE SDK 1.4

  15. Criteria for choosing Struts or JavaServer Faces

More Related