Introducción a java server faces
Deepak Goyal Vikas Varma Sun Microsystems
Objective
Understand the basic concepts of Java Server™ Faces[JSF] Technology.
2
Agenda
What is and why JSF? Architecture Overview UI Component Model Development Steps
JavaServer™ Faces (JSF) Framework Is…
A server side user interface component framework for Java™ technology-basedweb applications
4
What is JSF?
●
A specification and reference implementation for a web application development framework
– – – – –
Components Events Validators & converters NavigationBack-end-data integration
5
Why JSF? (page 1)
● ● ● ●
● ● ●
MVC for web applications Clean separation of roles Easy to use Extendable Component and Rendering architecture Support forclient device independence Standard Huge vendor and industry support
6
Why JSF? (page 2)
●
JSP and Servlet
–
No built-in UI component model No built-in UI component model No built-in eventmodel for UI components No built-in state management for UI components No built-in support of multiple renderers Not a standard (despite its popularity)
●
Struts (I am not saying you should notuse Struts)
– – – – –
●
Struts and JSF can be used together
7
How the JSF Specification Fits In
JSF App JSF App JSF Tags JSP (1.2) JSF API
Servlets (2.3)
8
Agenda
Whatis and why JSF? Architecture Overview UI Component Model Development Steps
JSF Architecture [MVC]
Server
JSF Page
Desktop Browser
HTML HTML RenderKit
Front ctrl
JSF Page WMLRenderKit
App Backend
Phone
WML
10
Request processing Lifecycle
FacesServlet
2.Passes controls to Lifecycle 1.Creates FacesContext
Lifecycle
FacesContext
3. Process FacesContext invarious phase
Request Processing Lifecycle Phases
Faces Request
Reconstitute Component Tree Apply Request Values Process Validations
Faces Response
Render Response
Invoke Application...
Regístrate para leer el documento completo.