Title: JavaServer Faces, Components, and The Next Big Thing*
1JavaServer Faces, Components,and The Next Big
Thing
- Jacob Hookom
- McKesson Medical-Surgical
- JavaServer Faces Web Tier Alignment EGs
2Presentation Goals
- MVC Fundamentals 101
- Advantages of Component Design
- Going Under the Hood
- Room For Improvement
- The Next Big Thing
- Questions and Answers
3MVC 101 The Landscape
- The Client-Server Disconnect
- Representational State Transfer (REST)
- Extreme Fragmentation in Java
- 50 Frameworks Available
- Struts
- WebWork
- JavaServer Faces
- Tapestry
4MVC 101 Past Present
5What Does Model 2 Give Us?
- Handles More Complex Requirements than Model 1
- Single Event Architecture (The Request)
- Wraps/Validates Transmitted State
- Controller uses Transmitted State to Control Flow
- Considered the Best Solution for Years
6MVC Framework Responsibilities (Server)
- Interpret the Request or Event
- Validate the Event Data Coming In
- Apply that Data to the Model
- Invoke Behavior on the Model
- Render Model Data back in the Response
- Repeat as Desired
7Rich Applications in Traditional MVC
- Example
- Display Editable Table
- Manage Validation
- Tree Menu
- Routing Events
- Managing State
- Coordinating Re-Use
- Desperate Solutions
8Introducing The Component
- Has State and Behavior
- Self Sufficient
- Participates in the Full MVC Lifecycle
- Are not just for Rendering
- Event Driven
- Encapsulates Programmer Concerns
- Easy to Use
9Component Examples
- Form Controls (Buttons and Fields)
- A Pagable Sortable Table
- Financial Chart Generation
- Pop Up Calendar for Date Entry
- Google Maps
- Custom Layout or Panel
- Collapsible Tree Menu
- Whatever Marketing Comes up With
10Going Under the Hood
- Hidden Details of JavaServer Faces
11Simple Example (Abbreviated)
- ltfviewgt
- lthpanelGridgt
- ltmtaskPane /gt
- ltmstatusBar /gt
- lt/hpanelGridgt
- ltmmenu /gt
- lthdataTablegt
- lthinputText /gt
- lthcommandButton /gt
- lt/hdataTablegt
- lt/fviewgt
12Component Trees Compositions
13Component Trees Compositions
14Component Trees Compositions
15Component Trees Compositions
16Component Trees Compositions
17Component Trees Compositions
18Component Trees Compositions
19Component Trees Compositions
20Component Trees Compositions
21Component Trees Compositions
22Component Trees Compositions
23Component Tree State Management
- All Components Post-Back to the Same View (Model
1-ish) - Components must first be Encoded
- Both the View and the State are Captured during
Encoding - Previous State is Used to Process Post-Back
24Representational vs. Actual State
lthdataTable valueemployees varemp/gt
lthcolumngt lthinputText valueemp.salary/
gt lt/hcolumngt lthcolumngt lthcommandButton
actionemp.delete/gt lt/hcolumngt lt/hdataTab
legt
25Problems with Current Solution
- Stale State in Layered Architectures
- Encode before Decode Issues
- Breaking Web Semantics
- Is this Even True MVC?
- AJAX Partial Tree Processing
- True Compositions
- How do We Fix These Issues?
26A Few Ideas to Ponder (Importance of Identity)
- Declarative vs. Imperative UIs
- State Preservation vs. Reconstruction
- Extending Resource Identifiers for Partial Tree
Processing - Other Types of Hypermedia can be delivered
27The Future Landscape
- Web Tier Alignment Group (W.A.G)
- The 5 Requirements of MVC are Constant
- Component-based Development is here to Stay
- Big Business Yahoo, Google, ESPN
- Opportunity to Deliver new Ideas around
Components on the Web
28Questions And Answers
- JavaServer Faces
- Java EE 5
- JSP EL
- EJB 3 / JBoss Seam
- How to Get Involved