SlideShare a Scribd company logo
1 of 23
Download to read offline
••
                                            ••
                                                 ••
                                                      ••




                                                                                           What is JSF?
                                                           ••
                                                                ••
                                                                     ••
                                                                          •••
                                                                                ••••
                                                                                       •••••••••


  What is JSF?



                             Roosendaal - 22/09/2005

                             Gie Indesteege - ABIS Training & Consulting

                             gindesteege@abis.be




ABIS Training & Consulting                                                        1
JavaServer Faces (JSF)




                                 What is JSF?
• Web frameworks
• JSF terminology
• JSF life cycle
• Web development with JSF
• Q&A




What is JSF?                 2
Web frameworks




                                                                 What is JSF?
Strong requirements needed for e-business applications:
    scalability, availability, security, flexibility, ...

No chances taken -> use reliable, well supported framework
• separation of concerns
• layering
• container/component
• extensible
• active community/active development
• standards based




What is JSF?                                                 3
Model View Controller framework




                                                                                  What is JSF?
                          Request
                                       Servlet
               Browser

                                           Controller

                                                                Logic

                                                   JavaBean             EIS
                    Response

                                     JSP                Model


                                    View


• Controller servlet regulates navigation
• JavaBean provides/accesses business logic
• JavaServer Page (JSP) creates presentation/view

What is JSF?                                                                  4
JSF goes beyond MVC (model 2)




                                                                                           What is JSF?
                                                        invoke
                                   FacesServlet                  action method




                           t
                          es
                     qu
                    re
                                                  faces-



                                     select
                                                config.xml
          Browser                                                                EIS
                                                                   JavaBean
                    res
                         po
                           ns
                               e
                                              JSP




• mainly view framework
• obtain configuration from external source (i.e. XML file)
• use Request Handlers as Commands to delegate control

What is JSF?                                                                           5
JSF architecture




                            What is JSF?
(JSF 1.0)




API’s
• JSF (javax.faces.*)
• JSTL
• Apache Commons

What is JSF?            6
JSF framework




                                                                         What is JSF?
Important characteristics:
• stateful UI component model
    - separation of presentation (rendering),
        mark-up generation (HTML, WML, XML, ...)
    - and business logic -> integration with model objects (JavaBeans)
• processing of client-side events (at server side)
• extensible type conversion system
• form handling and validation




What is JSF?                                                         7
Advantages of JSF




                                                                           What is JSF?
• official Java standard JSF 1.0 - JSR 127
        JSR 252: JavaServer Faces 1.2 - Proposed Final Draft (22/8/2005)
• easier to create multi-channel architectures
    - not restricted to JSP (HTML)
• event handling (server side)
• Swing-like GUI creation possible
• Internationalisation


http://java.sun.com/j2ee/javaserverfaces/




What is JSF?                                                           8
JavaServer Faces (JSF)




                                 What is JSF?
• Web frameworks
• JSF terminology
• JSF life cycle
• Web development with JSF
• Q&A




What is JSF?                 9
JSF terminology




                                                                   What is JSF?
Faces servlet
    - controller servlet, part of the JSF framework

Faces configuration (faces-config.xml)
    - configuration of web application under control of JSF
    - (page) navigation rules
    - managed beans (bean under control of JSF framework)

Faces JavaServer Pages
    - special tag libraries (core, html, ...)
    - faces expression language




What is JSF?                                                  10
JSF terminology (cont.)




                                                                       What is JSF?
Faces (UI) components
    - standard set of graphical widgets and controls (stateful)
    - based on JavaBeans
    - associated with renderer
    - organised in tree structure (per JSP)




What is JSF?                                                      11
JavaServer Faces (JSF)




                                  What is JSF?
• Web frameworks
• JSF terminology
• JSF life cycle
• Web development with JSF
• Q&A




What is JSF?                 12
JSF life cycle




                                                  What is JSF?
There are 6 phases in the JSF life cycle:
• Reconstitute request tree (restore view)
• Apply request values
• Process validations
• Update model values
• Invoke application
• Render response




What is JSF?                                 13
JSF life cycle (part 1)




                                               What is JSF?
No application data passed

                         JSF Framework

                            Restore
               Request       view


                                no data


                            Render
          Response         response




What is JSF?                              14
JSF life cycle (part 2)




                                                                         What is JSF?
Use of (HTML) form data

                          JSF Framework

                             Restore       ...
                Request       view


                                 no data


                                                       Update
                             Render        ...         model
               Response     response
                                                       values




UI components organised in hierarchical tree per JSP

bind input fields to business data in backing bean (managed bean)


What is JSF?                                                        15
JSF life cycle (part 3)




                                                                        What is JSF?
Navigation between pages (static vs. dynamic)
                          JSF Framework

                             Restore            ...
                Request       view


                                 no data


                                                          Update
                             Render           Invoke
                                                          model
               Response     response        application
                                                          values




rules in configuration file (faces-config.xml)
<navigation-rule>
  <from-view-id>/index.jsp</from-view-id>
  <navigation-case>
   <from-outcome>success</from-outcome>
   <to-view-id>/welcome.jsp</to-view-id>
  </navigation-case>


What is JSF?                                                       16
JSF life cycle (part 4)




                                                                                                  What is JSF?
Validation

                          JSF Framework

                                           Apply
                              Restore                              Process
                                          request
                Request        view                               validations
                                           values
                           no data                                     validation
                                                                         error

                                                                                    Update
                              Render                  Invoke
                                                                                    model
               Response      response               application
                                                                                    values




• syntax -> faces validators working on data in UI components
• business -> logic accessing model values in managed beans

Error messages via FacesMessage objects and special tags in JSP

What is JSF?                                                                                 17
JSF life cycle (final)




                                                                                                           What is JSF?
Event handling
                                 JSF Framework

                                                    Apply request values     Process validations
                                     Restore
                                                                                        PVE
                Request               view
                                                      PVE          AE
                                                                             immediate input
                                          no data      immediate command             convervion/
                                                                                   validation error

                                                      Invoke application
                                     Render                                          Update model
                                                              AE
               Response             response                                            values




                 PVE                                            AE
                          C   V VCL(n) VCL(a)                              AL(n)     AL(a)        A


• action events - when a command is pressed (button or link)
• process validation events- when value of an input field has changed
• input events - immediate commands - immediate input
• (pre- and post) phase events

What is JSF?                                                                                          18
JavaServer Faces (JSF)




                                  What is JSF?
• Web frameworks
• JSF terminology
• JSF life cycle
• Web development with JSF
• Q&A




What is JSF?                 19
Web development with JSF




                                                                        What is JSF?
JSF application consists of:
• JSP pages
• UI components represented as stateful objects on the server
• a custom tag library for rendering UI components
• a custom tag library for representing event handlers and validators
• JavaBeans (or model objects) containing application-specific func-
  tionality and data
• event listeners
• server-side helper classes
• validators, event handlers, and navigation handlers
• application configuration resource file faces-config.xml




What is JSF?                                                       20
Web development with JSF




                                                           What is JSF?
Native

Supported by IDE
• IBM WebSphere Studio and Rational Developer
• Sun Java Studio Creator
• Borland JBuilder
• Oracle JDeveloper
• ...

or

Integration of JSF with EGL (see next presentation)




What is JSF?                                          21
JavaServer Faces (JSF)




                                  What is JSF?
• Web frameworks
• JSF terminology
• JSF life cycle
• Web development with JSF
• Q&A




What is JSF?                 22
JavaServer Faces (JSF)




                                              What is JSF?
                             Thank you




Gie Indesteege

ABIS Training & Consulting




What is JSF?                             23

More Related Content

What's hot

Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaArun Gupta
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGMarakana Inc.
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Arun Gupta
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Arun Gupta
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudArun Gupta
 
JBoss presentation 2003 11 for matrix
JBoss presentation 2003 11 for matrixJBoss presentation 2003 11 for matrix
JBoss presentation 2003 11 for matrixrunsignup
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Shreedhar Ganapathy
 
Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3Arun Gupta
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Arun Gupta
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overviewsbobde
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureArun Gupta
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Skills Matter
 
JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003runsignup
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Rohit Kelapure
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011Arun Gupta
 
Whats Cool in Java E 6
Whats Cool in Java E 6Whats Cool in Java E 6
Whats Cool in Java E 6Arun Gupta
 
AK 5 JSF 21 july 2008
AK 5 JSF   21 july 2008AK 5 JSF   21 july 2008
AK 5 JSF 21 july 2008gauravashq
 
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Arun Gupta
 
Jsf2 overview
Jsf2 overviewJsf2 overview
Jsf2 overviewsohan1234
 

What's hot (20)

Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
 
JBoss presentation 2003 11 for matrix
JBoss presentation 2003 11 for matrixJBoss presentation 2003 11 for matrix
JBoss presentation 2003 11 for matrix
 
Java EE 6 Component Model Explained
Java EE 6 Component Model Explained Java EE 6 Component Model Explained
Java EE 6 Component Model Explained
 
Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3Java EE 6 & GlassFish 3
Java EE 6 & GlassFish 3
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ Silicon Val...
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for future
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
 
JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003
 
Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010Contextual Dependency Injection for Apachecon 2010
Contextual Dependency Injection for Apachecon 2010
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
 
Whats Cool in Java E 6
Whats Cool in Java E 6Whats Cool in Java E 6
Whats Cool in Java E 6
 
AK 4 JSF
AK 4 JSFAK 4 JSF
AK 4 JSF
 
AK 5 JSF 21 july 2008
AK 5 JSF   21 july 2008AK 5 JSF   21 july 2008
AK 5 JSF 21 july 2008
 
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
 
Jsf2 overview
Jsf2 overviewJsf2 overview
Jsf2 overview
 

Viewers also liked

Quantriduandautu
QuantriduandautuQuantriduandautu
Quantriduandautupopipress
 
Marka slaskie maleogrodki-prezentacja
Marka slaskie maleogrodki-prezentacjaMarka slaskie maleogrodki-prezentacja
Marka slaskie maleogrodki-prezentacjaSmallGradens
 
Silabus smp kelas 7 allson 3 mei 2013
Silabus  smp kelas 7 allson 3 mei 2013Silabus  smp kelas 7 allson 3 mei 2013
Silabus smp kelas 7 allson 3 mei 2013wildan al - farizy
 
Marka slaskie maleogrodki-prezentacjab
Marka slaskie maleogrodki-prezentacjabMarka slaskie maleogrodki-prezentacjab
Marka slaskie maleogrodki-prezentacjabSmallGradens
 
NCP minister arrested in housing scam should quit: Munde | Business Standard
NCP minister arrested in housing scam should quit: Munde | Business Standard  NCP minister arrested in housing scam should quit: Munde | Business Standard
NCP minister arrested in housing scam should quit: Munde | Business Standard abelretro
 
Relacje p 17-2012-05-25
Relacje p 17-2012-05-25Relacje p 17-2012-05-25
Relacje p 17-2012-05-25SmallGradens
 
Mahsc 15th anniversary power point presentation
Mahsc 15th anniversary power point presentationMahsc 15th anniversary power point presentation
Mahsc 15th anniversary power point presentationbubblez04
 
Relacja z działań Przedszkola nr 17 w Tychach
Relacja z działań Przedszkola nr 17 w TychachRelacja z działań Przedszkola nr 17 w Tychach
Relacja z działań Przedszkola nr 17 w TychachSmallGradens
 
Materi hr strategis lan-bab 1 konsep msdm strategik
Materi hr strategis lan-bab 1 konsep msdm strategikMateri hr strategis lan-bab 1 konsep msdm strategik
Materi hr strategis lan-bab 1 konsep msdm strategikwildan al - farizy
 
Materi hr strategis lan-bab 3 perencanaan sdm strategic
Materi hr strategis lan-bab 3 perencanaan sdm strategicMateri hr strategis lan-bab 3 perencanaan sdm strategic
Materi hr strategis lan-bab 3 perencanaan sdm strategicwildan al - farizy
 

Viewers also liked (14)

Tefl
Tefl Tefl
Tefl
 
Quantriduandautu
QuantriduandautuQuantriduandautu
Quantriduandautu
 
Marka slaskie maleogrodki-prezentacja
Marka slaskie maleogrodki-prezentacjaMarka slaskie maleogrodki-prezentacja
Marka slaskie maleogrodki-prezentacja
 
Silabus smp kelas 7 allson 3 mei 2013
Silabus  smp kelas 7 allson 3 mei 2013Silabus  smp kelas 7 allson 3 mei 2013
Silabus smp kelas 7 allson 3 mei 2013
 
Marka slaskie maleogrodki-prezentacjab
Marka slaskie maleogrodki-prezentacjabMarka slaskie maleogrodki-prezentacjab
Marka slaskie maleogrodki-prezentacjab
 
NCP minister arrested in housing scam should quit: Munde | Business Standard
NCP minister arrested in housing scam should quit: Munde | Business Standard  NCP minister arrested in housing scam should quit: Munde | Business Standard
NCP minister arrested in housing scam should quit: Munde | Business Standard
 
Relacje p 17-2012-05-25
Relacje p 17-2012-05-25Relacje p 17-2012-05-25
Relacje p 17-2012-05-25
 
Bondronat
BondronatBondronat
Bondronat
 
Mahsc 15th anniversary power point presentation
Mahsc 15th anniversary power point presentationMahsc 15th anniversary power point presentation
Mahsc 15th anniversary power point presentation
 
Hplc kompre
Hplc kompreHplc kompre
Hplc kompre
 
Mon portfolio de creation
Mon portfolio de creation Mon portfolio de creation
Mon portfolio de creation
 
Relacja z działań Przedszkola nr 17 w Tychach
Relacja z działań Przedszkola nr 17 w TychachRelacja z działań Przedszkola nr 17 w Tychach
Relacja z działań Przedszkola nr 17 w Tychach
 
Materi hr strategis lan-bab 1 konsep msdm strategik
Materi hr strategis lan-bab 1 konsep msdm strategikMateri hr strategis lan-bab 1 konsep msdm strategik
Materi hr strategis lan-bab 1 konsep msdm strategik
 
Materi hr strategis lan-bab 3 perencanaan sdm strategic
Materi hr strategis lan-bab 3 perencanaan sdm strategicMateri hr strategis lan-bab 3 perencanaan sdm strategic
Materi hr strategis lan-bab 3 perencanaan sdm strategic
 

Similar to JSF-Starter

2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-finalRohit Kelapure
 
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF PresentationGaurav Dighe
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Arun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGArun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionArun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerArun Gupta
 
Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2roialdaag
 
JSF and Seam
JSF and SeamJSF and Seam
JSF and Seamyuvalb
 
Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Fahad Golra
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJosh Juneau
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewEugene Bogaart
 
Summer training java
Summer training javaSummer training java
Summer training javaArshit Rai
 

Similar to JSF-Starter (20)

2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
 
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF Presentation
 
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
Java EE 6 & GlassFish 3: Light-weight, Extensible, and Powerful @ JAX London ...
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2Java Edge.2007.What.Is.New.In.Jsf.2
Java Edge.2007.What.Is.New.In.Jsf.2
 
Glass Fishv3 March2010
Glass Fishv3 March2010Glass Fishv3 March2010
Glass Fishv3 March2010
 
Java EE6 Overview
Java EE6 OverviewJava EE6 Overview
Java EE6 Overview
 
JSF and Seam
JSF and SeamJSF and Seam
JSF and Seam
 
Jsfsunum
JsfsunumJsfsunum
Jsfsunum
 
J2EE Online Training
J2EE Online TrainingJ2EE Online Training
J2EE Online Training
 
Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)
 
JBoss AS7 Reloaded
JBoss AS7 ReloadedJBoss AS7 Reloaded
JBoss AS7 Reloaded
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVC
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Java E
Java EJava E
Java E
 
Jsf Framework
Jsf FrameworkJsf Framework
Jsf Framework
 
Jsf 2.0 Overview
Jsf 2.0 OverviewJsf 2.0 Overview
Jsf 2.0 Overview
 
Summer training java
Summer training javaSummer training java
Summer training java
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

JSF-Starter

  • 1. •• •• •• •• What is JSF? •• •• •• ••• •••• ••••••••• What is JSF? Roosendaal - 22/09/2005 Gie Indesteege - ABIS Training & Consulting gindesteege@abis.be ABIS Training & Consulting 1
  • 2. JavaServer Faces (JSF) What is JSF? • Web frameworks • JSF terminology • JSF life cycle • Web development with JSF • Q&A What is JSF? 2
  • 3. Web frameworks What is JSF? Strong requirements needed for e-business applications: scalability, availability, security, flexibility, ... No chances taken -> use reliable, well supported framework • separation of concerns • layering • container/component • extensible • active community/active development • standards based What is JSF? 3
  • 4. Model View Controller framework What is JSF? Request Servlet Browser Controller Logic JavaBean EIS Response JSP Model View • Controller servlet regulates navigation • JavaBean provides/accesses business logic • JavaServer Page (JSP) creates presentation/view What is JSF? 4
  • 5. JSF goes beyond MVC (model 2) What is JSF? invoke FacesServlet action method t es qu re faces- select config.xml Browser EIS JavaBean res po ns e JSP • mainly view framework • obtain configuration from external source (i.e. XML file) • use Request Handlers as Commands to delegate control What is JSF? 5
  • 6. JSF architecture What is JSF? (JSF 1.0) API’s • JSF (javax.faces.*) • JSTL • Apache Commons What is JSF? 6
  • 7. JSF framework What is JSF? Important characteristics: • stateful UI component model - separation of presentation (rendering), mark-up generation (HTML, WML, XML, ...) - and business logic -> integration with model objects (JavaBeans) • processing of client-side events (at server side) • extensible type conversion system • form handling and validation What is JSF? 7
  • 8. Advantages of JSF What is JSF? • official Java standard JSF 1.0 - JSR 127 JSR 252: JavaServer Faces 1.2 - Proposed Final Draft (22/8/2005) • easier to create multi-channel architectures - not restricted to JSP (HTML) • event handling (server side) • Swing-like GUI creation possible • Internationalisation http://java.sun.com/j2ee/javaserverfaces/ What is JSF? 8
  • 9. JavaServer Faces (JSF) What is JSF? • Web frameworks • JSF terminology • JSF life cycle • Web development with JSF • Q&A What is JSF? 9
  • 10. JSF terminology What is JSF? Faces servlet - controller servlet, part of the JSF framework Faces configuration (faces-config.xml) - configuration of web application under control of JSF - (page) navigation rules - managed beans (bean under control of JSF framework) Faces JavaServer Pages - special tag libraries (core, html, ...) - faces expression language What is JSF? 10
  • 11. JSF terminology (cont.) What is JSF? Faces (UI) components - standard set of graphical widgets and controls (stateful) - based on JavaBeans - associated with renderer - organised in tree structure (per JSP) What is JSF? 11
  • 12. JavaServer Faces (JSF) What is JSF? • Web frameworks • JSF terminology • JSF life cycle • Web development with JSF • Q&A What is JSF? 12
  • 13. JSF life cycle What is JSF? There are 6 phases in the JSF life cycle: • Reconstitute request tree (restore view) • Apply request values • Process validations • Update model values • Invoke application • Render response What is JSF? 13
  • 14. JSF life cycle (part 1) What is JSF? No application data passed JSF Framework Restore Request view no data Render Response response What is JSF? 14
  • 15. JSF life cycle (part 2) What is JSF? Use of (HTML) form data JSF Framework Restore ... Request view no data Update Render ... model Response response values UI components organised in hierarchical tree per JSP bind input fields to business data in backing bean (managed bean) What is JSF? 15
  • 16. JSF life cycle (part 3) What is JSF? Navigation between pages (static vs. dynamic) JSF Framework Restore ... Request view no data Update Render Invoke model Response response application values rules in configuration file (faces-config.xml) <navigation-rule> <from-view-id>/index.jsp</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>/welcome.jsp</to-view-id> </navigation-case> What is JSF? 16
  • 17. JSF life cycle (part 4) What is JSF? Validation JSF Framework Apply Restore Process request Request view validations values no data validation error Update Render Invoke model Response response application values • syntax -> faces validators working on data in UI components • business -> logic accessing model values in managed beans Error messages via FacesMessage objects and special tags in JSP What is JSF? 17
  • 18. JSF life cycle (final) What is JSF? Event handling JSF Framework Apply request values Process validations Restore PVE Request view PVE AE immediate input no data immediate command convervion/ validation error Invoke application Render Update model AE Response response values PVE AE C V VCL(n) VCL(a) AL(n) AL(a) A • action events - when a command is pressed (button or link) • process validation events- when value of an input field has changed • input events - immediate commands - immediate input • (pre- and post) phase events What is JSF? 18
  • 19. JavaServer Faces (JSF) What is JSF? • Web frameworks • JSF terminology • JSF life cycle • Web development with JSF • Q&A What is JSF? 19
  • 20. Web development with JSF What is JSF? JSF application consists of: • JSP pages • UI components represented as stateful objects on the server • a custom tag library for rendering UI components • a custom tag library for representing event handlers and validators • JavaBeans (or model objects) containing application-specific func- tionality and data • event listeners • server-side helper classes • validators, event handlers, and navigation handlers • application configuration resource file faces-config.xml What is JSF? 20
  • 21. Web development with JSF What is JSF? Native Supported by IDE • IBM WebSphere Studio and Rational Developer • Sun Java Studio Creator • Borland JBuilder • Oracle JDeveloper • ... or Integration of JSF with EGL (see next presentation) What is JSF? 21
  • 22. JavaServer Faces (JSF) What is JSF? • Web frameworks • JSF terminology • JSF life cycle • Web development with JSF • Q&A What is JSF? 22
  • 23. JavaServer Faces (JSF) What is JSF? Thank you Gie Indesteege ABIS Training & Consulting What is JSF? 23