java edge.2007.what.is.new.in.jsf.2
TRANSCRIPT
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 2
What’s new in JSF 2.0 ?
Roi Aldaag
Consultant, AlphaCSP
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 3
Objective
Overview of the new requested
features of the upcoming
JSF 2.0
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 4
Agenda
IntroductionJSF Evolution
JSF 1.0 / 1.1JSF 1.2
JSF 2.0JSR 314Community wish listTechnology AdoptionEase of developmentFeaturesPerformance
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 5
Introduction
Something about acronyms
Definition
Motivation
JSF Ecosystem
Architecture
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 6
Something about acronyms…
Not so long ago, if you “Googled“
the word JSF, you probably would
have come across …
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 7
Something about acronyms…
The F-35 Joint Strike Fighter (JSF) …
(AKA Lightning II)
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 8
Something about acronyms…
Today you’d find…
And probably also …AlphaCSPSpecializes in high availability e-business
application design and ASP hosting
services on the UML, EJB, JAVA, J2EE,
CORBA, XML and WML platforms.
www.alphacsp.com
Sponsored Links
JavaServer Faces Technology
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 9
Definition
What is JSF?
Specification
UI framework
Component based
Server side
Java web applications
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 10
Motivation
Servlet/JSP API
No GUI structure
No model
No event handling mech.
No I18N support
AWT / Swing
Not web oriented
Many web frameworks
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 11
“Welcome to the jungle”
Echo
Cocoon Millstone OXF
Struts SOFIA Tapestry
WebWork RIFE Spring MVC
Canyamo Maverick JPublish
JATO Folium Jucas
Verge Niggle
Bishop
Barracuda Action Framework Shocks
JSFTeaServlet wingS
Expresso Bento jStatemachine
jZonic OpenEmcee Turbine
Scope Warfare JWAA
Jaffa Jacquard
Macaw
Smile MyFaces Chiba
JBanana Jeenius JWarp …
Java Web Frameworks (partial list)
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 12
Motivation
How do we choose?
We need a standard !
Vendor adoption
IDE integration
Support
JSF is a standard
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 13
JSF Ecosystem
• Open Source Projects:SourceForge.net: over 100 projects
• ImplementationsOpen Source: Sun JSF RI, Apache MyFacesCommercial: IBM, Oracle
• Third Party ComponentsIceSoft IceFaces, JBoss RichFaces, Oracle ADF, Apache Tomahawk, Galileo Faces
• ExtensionsAjax4JSF, Dyno Faces, JSF Extensions
• IDE SupportIntelliJ, Eclipse, JDeveloper, Excadel Studio
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 14
Architecture
Front Servlet(FacesServlet)
Controller
Event Listeners &
Action Handlers(ValueChangeListener,
ActionListener)
Config(faces-config.xml)
Events(ValueChangeEvent,
ActionEvent)
ModelView
Component
Model(Java Beans)
Delegates(Convertors,
Validators,
Renderers)
Resources(JSP,
XML,
Properties)
Component
Tree(UIComponent)
Business
Objects(Managed Beans)
Request
Response
UIViewRoot
UIForm
UIInput UIInput
UIPanel
• Model
• View
• Controller
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 15
Architecture
Front Servlet(FacesServlet)
Controller
Event Listeners &
Action Handlers(ValueChangeListener,
ActionListener)
Config(faces-config.xml)
Events(ValueChangeEvent,
ActionEvent)
ModelView
Component
Model(Java Beans)
Delegates(Convertors,
Validators,
Renderers)
Resources(JSP,
XML,
Properties)
Component
Tree(UIComponent)
Business
Objects(Managed Beans)
Request
Response
UIViewRoot
UIForm
UIInput UIInput
UIPanel
• Controller
• Front Servlet
• Configuration
• Event Listeners
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 16
Architecture
Front Servlet(FacesServlet)
Controller
Event Listeners &
Action Handlers(ValueChangeListener,
ActionListener)
Config(faces-config.xml)
Events(ValueChangeEvent,
ActionEvent)
ModelView
Component
Model(Java Beans)
Delegates(Convertors,
Validators,
Renderers)
Resources(JSP,
XML,
Properties)
Component
Tree(UIComponent)
Business
Objects(Managed Beans)
Request
Response
UIViewRoot
UIForm
UIInput UIInput
UIPanel
• Model
• Business Objects
• POJO’s
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 17
Architecture
Front Servlet(FacesServlet)
Controller
Event Listeners &
Action Handlers(ValueChangeListener,
ActionListener)
Config(faces-config.xml)
Events(ValueChangeEvent,
ActionEvent)
ModelView
Component
Model(Java Beans)
Delegates(Convertors,
Validators,
Renderers)
Resources(JSP,
XML,
Properties)
Component
Tree(UIComponent)
Business
Objects(Managed Beans)
Request
Response
UIViewRoot
UIForm
UIInput UIInput
UIPanel
• View
• Component Tree
• Component Model
• Delegates
• Resources
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 18
Architecture
Lifecycle
Restore view
Apply request values
Process validations
Update model values
Invoke application
Render response
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 19
Architecture
Example
JSP with JSF tags
Component Tree
Markup
UIViewRoot
UIForm
UIInput UIInput
UIPanel
...
<f:fiew>
<h:form>
<h:panelGrid columns = "2">
<h:inputText/>
<h:inputSecret/>
</panelGrid>
</h:form>
</f:view>
..
HTML
JSP
WML
XML
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 20
JSF Evolution
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 21
JSF Evolution
History
JSF 1.0 / 1.1
JSF 2
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 22
History
2004 2006 2008 ??
JSF 1.0, 1.1
JSR 127
Servlet 2.3, JSP 1.2
JSF 1.2
JSR 252
Servlet 2.5, JSP 2.1
JSF 2.0
JSR 314
JSR Review Ballot:May 2001Final Release 2:May 2004
JSR Review Ballot:August 2004Final Release 2:May 2006
JSR Review Ballot:May 2007Final Release 2:JEE6 – 4Q 2008
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 23
JSF 1.1 (JSR 127)
Shortcomings
JSF – JSP Mismatch
<h:commandLink action="foo">
Read between the lines
</h:commandLink>
Read between the lines
<a href=“#” onClick=“…”></a>
<h:commandLink action="foo">
<h:outputText
value="Read between the lines”/>
</h:commandLink>
<a href=“#” onClick=“…”>
Read between the lines
</a>
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 24
JSF 1.1 (JSR 127)
Shortcomings
JSF – JSP Mismatch
Different Lifecycle
Writing to the same stream
Limited EL
Not compatible with JSP EL
Forbidden nesting components (<c:forEach>)
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 25
JSF 1.2 (JSR 252)
Improvements New Content Interweaving Model
JSP ViewHandler, JSP Base Tag class
Unified EL in JSTL (javax.el)
Deferred evaluation
Support get / set value
Support method invocation
Pluggable API for resolving expressions
JSTL integration (<c:forEach>)
Back Button / Multi Frame Apps
Message association
JSP EL JSF EL
Unified EL
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 26
JSF 1.2 (JSR 252)
Shortcomings Development
Customizing components is complicatedExceptions are not descriptiveNo support for annotations
DeploymentUnnecessary deployment stepNot JEE compliant (packaging, DI)
ComponentsMissing / Limited components
SecurityNo security model (managed beans, resources)
Ajax
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 27
Custom Components
Let’s say we want a collapsible panel …
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 28
Custom Components: JSF 1.2
UICollapse.java CollapseTag.java
collapse.tld
faces-config.xml
UIComponentBase.java UIComponentTag.java extend
write
modify
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 29
Custom Components: JSF 1.2
UICollapse.java
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 30
Custom Components: JSF 1.2
CollapseTag.java
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 31
Custom Components: JSF 1.2
collapse.tld
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 32
Custom Components: JSF 1.2
faces-config.xml
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 33
Custom Components: JSF 1.2
Too much wiring !!!
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 34
Custom Components: Facelets
collapse.xhtml
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 35
Exceptions: JSF 1.2
No centralized exception handling
Servlet filter
Poor documentation
“Silent error”
Validation error
No Exception
No log output
Need to use <h:messages/>
Unified EL wraps exception
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 36
Exceptions: JSF 1.2
exception.jsf
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<f:view>
<h:form>
<h:inputText value="#{myBean.name}"/>
</h:form>
</f:view>
public class MyBean {
public String getName() {
if(true) throw new RuntimeException("my exception");
return "line not reached";
}
. . .
}
MyBean.class
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 37
Exceptions: JSF 1.2
Instead ofA stack trace dump
javax.servlet.ServletException: javax/servlet/jsp/tagext/JspIdConsumer
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 38
Exceptions: Facelets
We should be gettingVerbose description (location, tree, phase, variables)
javax.el.ELException: /exception.xhtml @7,40 value="#{myBean.name}": java.lang.RuntimeException
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 39
Ajax: JSF 1.2
• Good:
– Ajax “ready”
– JSF component maintain state
– Well defined req processing
– Hides JS from page author
• Bad:
– No built-in support
– No standard
– Full view rendering
– Incompatible comp. libraries
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 40
Templating: JSF 1.2
• No standard support
– <f:subview../>
– <c:import…/>
– <jsp:include …/>Header
Footer
Nav Content
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 41
Community Reservations
“… It is OK to learn things,
but learning should be like
series of "AHA!" moments
and "WOW! they do that too!"
exclamations.
Learning JSF is series
of WTF moments -
and it should not be! …”
“JSF Articles – Wish List for JSF 2.0 and more AJAX+JSF”,
The Server Side, April 05, 2007
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 42
Community Reservations
“… I download 1 framework and it should be complete.
Don't tell me I need to download 5 other packages from various websites to make it actually useful??? …”
“… JSF should not be like a mine-field. It should be fun to use. It should be impossible for a silent error to occur, and
this is exactly what happens when you have a validation error but no corresponding h:message(s) tag. …”
News / Comments -“JSF sucks...and has no hope”
The Server Side, 2007
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 43
Community Wish List
Facelets integration
Client Side Validation
Scoping
Easier Development of components
Simplify configuration
Centralized Exception handling
Navigation Rules API
Hard failure
…
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 44
The Irony
JSF defined a standard
UI development has advanced
JSF got “old”
Many great ideas
Many JSF extensions (to fill void)
New technologies
Irony: Back to starting point
Need for a new standard
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 45
JSF 2.0
JSR 314
Ease of development
Technology Adoption
Features
Performance
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 46
JSR 314
Purpose
Max. development productivity (IDE)
Min. maintenance complexity
Integrate with other web tech.
More responsive UI (Ajax)
Requirements
Ease of development
New Features & Fixes
Performance & Scalability
Technology Adoption
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 47
JSR 314
Specification LeadEd Burns Sun Microsystems, Inc.Roger Kitain Sun Microsystems, Inc.
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 48
JSR 314
Milestones (anticipated):
JavaEE6Proposed Final Draft
Apr 08Mar 08Public Review Ballot
Mar 08Feb 08Public Review
Oct 07Oct 07Early Draft Review
Aug 07May 07EG Formation
May 07Apr 07JSR Review Ballot
Apr 07Apr 07File JSR with JCP
16 Mar 079 Mar 071st EG Public Draft Review
9 Mar 077 Mar 07Author 1st EG Public Draft
9 Mar 0715 Feb 072nd Draft Reviewed
9 Feb 077 Feb 07Author 1st Draft
Stage Start Finish
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 49
JSR 314
Introducing the Experts
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 50
Let the experts play
Expert Group Kick-off Meeting
Buy a Feature
Will the community needs be met?
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 51
Let the experts play (cont.)
Feature List (partial):
50New listeners for lifecycle eventsListeners
80Better error reportingErrors
80Expand lifecycle to be aware of Ajax, client lifecycle
Ajax
100Simplify creation of customize components
EZComp
100Eliminate Deployment StepZero Dep
165Templating, Component AggregationFacelets
Name Feature Cost
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 52
Let the experts play (cont.)
Feature List (cont.):
60Skinning / ThemeingSkins
80Default to stateless componentsFix State
25Declarative rendering (no out.println)Rendering
25Components, managed beans, navigation rules
Annotations
80Bookmarking, support got “GET”Mostly Get
50No faces-confix.xml, no web.xmlConfig.
Name Feature Cost
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 53
Let the experts play (cont.)
The Results:
3
3
4
4
4
4
5
Number of units purchased
80Errors
100EZComp
15Validation++
80State Saving
25Annotations
165Facelets
80Ajax
Name Cost
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 54
JSF 2.0
JSR 314
Ease of development
Technology Adoption
Features
Performance
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 55
Ease Of Development
Annotations
Templating
Component Aggregation
Verbose Exceptions
JSF Artifacts in WAR
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 56
Ease Of Development
Annotations
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 57
Ease Of Development
Annotations: JSF 1.2
• Tedious XML
– faces-config.xml
– Web.xml
• JEE 5 Annotations
– @EJB
– @PersistenceContext
– …
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 58
Ease Of Development
Annotations: JSF 2.0
• Artifacts
– Managed beans
– Scope
– Navigation Rules
– Dependency Injection
– Converters
– Validators
• Zero Configuration
• Skip deployment
@Property(el=true, saveState=true)
@Bean
@PhaseListener
@Converter
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 59
Ease Of Development
Templating
• Faceletes
– Develop UI live
• JSF Templating
– Pages, components
• Struts Tiles
– Layouts
– Screen definition
– Inheritance
Header
Footer
Nav Content
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 60
JSF 2.0
JSR 314
Ease of development
Technology Adoption
Features
Performance
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 61
Technology Adoption
Ajax
Passing values between pages
Skinning / Themeing
Web Beans JSR 299
Client lifecycle / validation
Server Side Scripting
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 62
Technology Adoption
Ajax: Page wide
• Page wide support (region, zone)
• Add support to existing components
• Sub view processing
• Partial tree rendering
• Normal lifecycle
• Partial page refresh
• Example: Ajax4Jsf, Dynamic Faces
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 63
Technology Adoption
Ajax: Component wide
• Ajaxified components
– Minimal Ajax awareness required
• Example:– RichFaces, IceFaces, ADF (Trinidad)
RCFaces, Galileo Faces, Woodstock
• Client validations
• Client component interaction
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 64
Technology Adoption
Ajax example:
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 65
<f:view>
<h:outputText value="Ajax List Demo"/>
<h:form>
<h:panelGrid columns="2">
<h:panelGrid>
<h:outputText value="Country:"/>
<a4j:region>
<h:selectOneListbox id="countryId">
<f:selectItems value="#{myBean.countries}" />
<a4j:support event="onchange" reRender="cityId"
action="#{myBean.changeCountry}" ajaxSingle="true"/>
</h:selectOneListbox>
</a4j:region>
</h:panelGrid>
<h:panelGrid>
<h:outputText value="City:"/>
<h:selectOneListbox id="cityId">
<f:selectItems value="#{myBean.cities}" />
</h:selectOneListbox>
</h:panelGrid>
</h:panelGrid>
<h:commandButton value="Submit" action="none" />
</h:form>
</f:view>
<a4j:region>
<h:selectOneListbox id="countryId">
<f:selectItems value="#{myBean.countries}" />
<a4j:support event="onchange" reRender="cityId"
action="#{myBean.changeCountry}" ajaxSingle="true"/>
</h:selectOneListbox>
</a4j:region>
Technology Adoption
Ajax4Jsf example:
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 66
Technology Adoption
UIOutput UISelectOne
UIPanel
UIForm
UIOutput UISelectOne
UIPanel
UIPanel
AjaxViewRoot
UIOutput
UICommand
Partial Tree DecodePartial Page Submit
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 67
Technology Adoption
UIOutput UISelectOne
UIPanel
UIForm
UIOutput UISelectOne
UIPanel
UIPanel
AjaxViewRoot
UIOutput
UICommand
Partial Tree RenderPartial Page Refresh
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 68
Technology Adoption
Passing values between pages: JSF 1.2
Supported scopes
Page, Session, Application
State
Client: Cookie, URL encoding, hidden field
Server: HttpSession, ServletContext
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 69
Technology Adoption
Passing values between pages
Dialog / Conversation / Process scope
Example:
JBoss Seam
Apache Shale
Spring WebFlow
Oracle ADF
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 70
Technology Adoption
Skinning /
Themeing
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 71
Technology Adoption
Skinning / Themeing
• Changing component style
– Dynamically
– Instantly
• Technologies
– Oracle ADF Faces
– Apache Trinidad
– JBoss Rich Faces
– Icesoft IceFaces
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 72
Technology Adoption
Skinning / Themeing
• Example:
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 73
JSF 2.0
JSR 314
Ease of development
Technology Adoption
New Features
Performance
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 74
New Features
Separate build / render tree
Bookmarking
Additional standard components
AJAX aware lifecycle
Partial tree traversal
Page actions
Access to persistence store
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 75
New Features
Separate build / render tree
Initial Request
Render Response Phase
Create Component Tree
Render Tree
Postback Request
Restore View Phase
Create Component Tree
Render Response Phase
Render Tree
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 76
New Features
Bookmarking
JSF 1.2
No support in <h:form/>
Command component don’t generate GET
Use implicit “param”
Enhanced Support for Http GET
New lifecycle for non-faces request (init req)
Submitted values come from HTTP paramsnot (input components)
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 77
New Features
Additional standard componentsCurrent set is to weak
Components from different vendors cannot coexist
Date Picker File Upload Tree
Tabbed Panel
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 78
JSF 2.0
JSR 314
Ease of development
Technology Adoption
Features
Performance
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 79
Performance
Save / restore page deltas
ADF
Client side component validations
Inter client component interaction
Example: Dual combo box
Caching for rendering
Improve PhaseListener Interceptor
Filter requests
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 80
Prolog
The question should be:
Not - will the community needs be met ?
But, will the community needs be met -
on time … ?
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 81
Q&A
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 82
Definition
What is JSF ?
A server side user interface component framework for Java technology based web applications.
Sun J2EE 1.4 Tutorial
A component-based, Web-tier UI framework
Mastering JavaServer Faces, Wiley 2004
A component architectureA standard set of UI widgetsAn application infrastructure
JavaServer Faces in Action, Manning 2005
A specification with implementations offered by multiple vendorsA set of user interface (UI) componentsAPI for extending the standard components or developing new
JavaServerFaces,O’Reilly2004
A set of prefabricated UI (user interface) componentsAn event-driven programming modelA component model that enables third-party developers to supply additional components
Core JavaServer Faces, Sun 2007
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 83
Resources
JSR Drafthttps://javaserverfaces-spec-public.dev.java.net/
proposals/JSF-2_0-draft.html
JCP – JSR 314http://jcp.org/en/jsr/detail?id=314
Ed Burns Bloghttp://weblogs.java.net/blog/edburns
“The Requirements Scratchpad”http://wiki.java.net/bin/view/Projects/Jsf2RequirementsScratchpad
Community Forums & Blogs
Copyright AlphaCSP Israel 2007 - The JavaEdge SeminarCopyright AlphaCSP Israel 2007 - The JavaEdge Seminar 84
Wish List
Pre-JCP-filed draft for JavaServer Faces 2.0 JSR / Ed Burns
http://weblogs.java.net/blog/edburns
JSF 2.0 requirements scratchpadhttp://wiki.java.net
JSF 2.0 is Here!http://www.oreillynet.com/onjava
JSF 2.0 Wish List Part 1 / Kito Man
http://www.jsfcentral.com
EE6 wishlist part II: JSF / Gavin King
http://in.relation.to
JSF 2.0 Begins
…