SlideShare uma empresa Scribd logo
1 de 49
Baixar para ler offline
JSF 2.0
                              Robert Reiz
Tuesday, February 23, 2010
Trainer


                  Robert Reiz Dipl. Inf. (FH-Mannheim)

                  Buch Mail-Travel-Agents auf Linux-Systemen

                  Java-Projekte seit 2002

                  JSF-Erfahrung seit 2006

                  Gründung der PLOIN GmbH Jan. 2008

                  Trainer bei der GFU seit Dez. 2008




Tuesday, February 23, 2010
Trainer


                  Comitter

                       ploinFaces

                       ploinMailFactory

                  Blog

                     http://www.robert-reiz.de




Tuesday, February 23, 2010
Eine Presentation ist keine Dokumentation!
       Eine Presentation soll lediglich den Speaker bei seinem
                       Vortrag unterstützen!




Tuesday, February 23, 2010
Wer kennt JSF ?




Tuesday, February 23, 2010
Was ist JSF ?




Tuesday, February 23, 2010
Standards




                             JSF 1.0 - JSR 127 - May 2004
                             JSF 1.2 - JSR 252 - May 2006
                             JSF 2.0 - JSR 314 - Julie 2009




Tuesday, February 23, 2010
Lifecycle



            Request
                                            Apply Request     Process
                             Restore View
                                               Values        Validations




             Response
                               Render          Invoke       Update Modell
                              Response       Applications      Values




Tuesday, February 23, 2010
JSF 1.2
                             xmlns:h="http://java.sun.com/jsf/html"
                             xmlns:f="http://java.sun.com/jsf/core"




                             JSF 2.0
                             xmlns:ui="http://java.sun.com/jsf/facelets"
                             xmlns:composite="http://java.sun.com/jsf/composite"

                             jsf.js




Tuesday, February 23, 2010
<h:selectOneListbox id="edit_workUnit_selectedProject"
                                        value="${managedBean[projectItem]}"
                                        style="width:200px; height:200px;"
                                        required="true">
                  	 <f:selectItems value="#{managedBean.projectList}"/>
                  </h:selectOneListbox>

                  <h:commandButton value="Speichern"
                                   actionListener="#{managedBean.doLoginListener}"
                                   action="#{loginBean.doLogin}" />




Tuesday, February 23, 2010
Tuesday, February 23, 2010
Implementierungen


                    JSF-RI
                  (mojarra)
                             MyFaces-Core


Tuesday, February 23, 2010
Flora und Fauna



         RichFaces                                    IceFaces
                     ADF               Netadvantage         Facelets
                                                        Tomahawk
                                     Trinidad
                         Orchestra                     PrimeFaces

                                        Tobago
                         Woodstock                          ploinFaces


Tuesday, February 23, 2010
Matrix




               http://www.jsfmatrix.net/



Tuesday, February 23, 2010
Nachteile von JSF 1.X



Tuesday, February 23, 2010
JSF 1.X


                   Nicht Bookmarkfähig -> PostBackPattern
                   Lange XML-Konfiguration
                   Kein Templating mit JSP
                   Kein Resourcen-Handing
                   Kein AJAX
                   Wenig Convention -> Viel Configuration



Tuesday, February 23, 2010
JSF 2.0




Tuesday, February 23, 2010
JSF 2.0 - Big changes


                             XML-Freie Konfig. mit Annotationen
                             Facelets ist der neue Standard
                               Facelets-Comp. mit Interfaces/Impl.
                             Standartisiertes AJAX
                             Bookable links/buttons




Tuesday, February 23, 2010
JSF 2.0 - Small changes


                             Neue Scopes
                             System-events
                             Direkte Navigation
                             ProjectStage
                             Neue Methoden in der FacesContext
                             ....




Tuesday, February 23, 2010
Status Quo JSF 2.0

                   JSF-RI            ploinFaces

                 (mojarra)
                                         MyFaces-Core

                         RichFaces
                                                  IceFaces

                              PrimeFaces

Tuesday, February 23, 2010
Annotations



Tuesday, February 23, 2010
@ManagedBean
                       @RequestScoped
                       public class LogInBean {

                       	     private static final long serialVersionUID = 199L;
                       	     private String loginName = "admin";
                       	     @ManagedProperty(name = "pass", value="admin")
                       	     private String password;

                             private String doNavigate(){
                               return "/page/welcome";
                             }

                       }




Tuesday, February 23, 2010
Facelets



Tuesday, February 23, 2010
Facelets



                             Nicht 1:1 übernommen
                             Templating
                             15% schneller als JSP
                             Einfache Komponentenentwicklung
                             Schnittstelle für composite-components




Tuesday, February 23, 2010
Facelets - Template

                              layout.xhtml




              login.xhtml    welcome.xhtml   myData.xhtml

Tuesday, February 23, 2010
Facelets - Template
                 <html xmlns="http://www.w3.org/1999/xhtml"
                 	   xmlns:h="http://java.sun.com/jsf/html"
                 	   xmlns:f="http://java.sun.com/jsf/core"
                 	   xmlns:ui="http://java.sun.com/jsf/facelets">
                 <h:head>
                 	   <link rel="stylesheet" type="text/css" href="../css/layout.css" />
                 </h:head>
                 <h:body>
                 	
                 	   <div id="header" align="center">
                 	   	   <ui:insert name="header">
                 	   	   	   HEADER - ${title}
                 	   	   </ui:insert>
                 	   </div>

                 	     <div id="content">
                 	     	   <ui:insert name="content">
                 	     	   	   Content
                 	     	   </ui:insert>
                 	     </div>

                 	     <div id="footer" align="center">
                 	     	   <ui:insert name="footer" >
                 	     	   	   FOOTER
                 	     	   </ui:insert>
                 	     </div>

                 </h:body>
                 </html>




Tuesday, February 23, 2010
Facelets - Template



                  <ui:composition template="/page/layout.xhtml">
                  	 <ui:param name="title" value="LOGIN SITE" />
                  	 <ui:define name="content">
                  	 	   ... Hier Inhalt
                  	 </ui:define>	
                  </ui:composition>




Tuesday, February 23, 2010
Facelets - Compon.


                             <html xmlns="http://www.w3.org/1999/xhtml"
                               xmlns:composite="http://java.sun.com/jsf/composite">
                             <head><title>MyComponent</title></head>
                             <body>

                             	   <composite:interface>
                             	     <composite:attribute name="title"/>
                             	   </composite:interface>
                             	
                             	   <composite:implementation>
                             	     <div style="border: 1px soldi red">
                             	       <h1>#{cc.attrs.title}</h1>
                                     ... XHTML oder JSF-Komponenten
                             	     </div>
                             	   </composite:implementation>

                             </body>
                             </html>




Tuesday, February 23, 2010
Facelets - Compon.



                    <html xmlns:gfu="http://java.sun.com/jsf/composite/gfu">




                   <gfu:myComponent title="Panel-Header" />




Tuesday, February 23, 2010
Clean Code




Tuesday, February 23, 2010
AJAX



Tuesday, February 23, 2010
AJAX



            <f:ajax event="keyup"
                    execute="@form"
                    render="form:result" />




Tuesday, February 23, 2010
AJAX




          <h:form id="form">
          	 <h:inputText value="#{welcomeBean.text}" >
          	 	 <f:ajax event="keyup" execute="@form" render="form:result" />
          	 </h:inputText>
          	 <h:outputText id="result" value="#{welcomeBean.text}" />
          </h:form>




Tuesday, February 23, 2010
AJAX


                             jsf.ajax.addOnError(callback)

                             jsf.ajax.addOnEvent(callback)

                             jsf.ajax.request(source, event, options)

                             jsf.ajax.response(request, context)




Tuesday, February 23, 2010
Resources



Tuesday, February 23, 2010
Resources



             <h:outputStylesheet name="css/style.css" />
             	
             <h:outputScript name="jsf.js" libary="javax.faces" target="head" />
             	
             <h:graphicImage value="#{resource['lib:gfu.gif']}" />




Tuesday, February 23, 2010
/resources/compLib/1.1/script/compScript.js

                /META-INF/resources/compLib/script/compScript.js




                [localePrefix/][libraryName/][libraryVersion/]resourceName[/resourceVersion]




Tuesday, February 23, 2010
Bookable Pages



Tuesday, February 23, 2010
Bookable



                <h:link outcome="/page/welcome" value="testLink" includeViewParams="true" >
                	 <f:param name="userId" value="5" />
                </h:link>




                       <a href="/demoJsf2/page/welcome.jsf?userId=5">testLink</a>




Tuesday, February 23, 2010
Bookable



                <h:button outcome="/page/welcome" value="testLink" includeViewParams="true" >
                	 <f:param name="userId" value="5" />
                </h:button>




               <input type="button" 
                      value="testLink" 
                      onclick="window.location.href='/demoJsf2/page/welcome.jsf?userId=5'; return false;"/>




Tuesday, February 23, 2010
Scopes



Tuesday, February 23, 2010
Scopes


                             Application
                             Session
                             Request
                             View
                             Flash
                             Custom
                             None



Tuesday, February 23, 2010
Flows/Conversation



Tuesday, February 23, 2010
Flows - ploinFaces


                             <flow id="loginFlow">
                               <views>
                                 <view>/login.xhtml</view>
                                 <view>/page/help/agbLogin.xhtml</view>
                                 <view>/page/help/haftungLogin.xhtml</view>
                               </views>
                               <attributes>
                                 <attribute>logInOutBean</attribute>
                               </attributes>
                             </flow>




Tuesday, February 23, 2010
Flows - ploinFaces



                             <flow id="useradministrationFlow">
                               <views>
                                 <view>/page/useradmin.*</view>
                               </views>
                               <attributes>
                                 <attribute>useradminBean</attribute>
                                 <attribute>secureBean</attribute>
                               </attributes>
                             </flow>




Tuesday, February 23, 2010
Flows - ploinFaces

           <authoritySource>#{sessionBean.loginUserRole}</authoritySource>

           <accessDeniedPage>/page/accessDenied.xhtml</accessDeniedPage>

           <flow id="useradministrationFlow">
             <views>
               <view>/page/useradmin.*</view>
             </views>
             <attributes>
               <attribute>useradminBean</attribute>
               <attribute>secureBean</attribute>
             </attributes>
             <includeAuthorities>
               <authority>Administrator</authority>
               <authority>GIS</authority>
             </includeAuthorities>
           </flow>



Tuesday, February 23, 2010
Clean Code




Tuesday, February 23, 2010
DEMO



Tuesday, February 23, 2010
???


Tuesday, February 23, 2010

Mais conteúdo relacionado

Semelhante a Java Server Faces 2.0 - Der Standard für moderne und komponentenbasierte Webanwendungen

Node.js and websockets intro
Node.js and websockets introNode.js and websockets intro
Node.js and websockets introkompozer
 
Browser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google ChromeBrowser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google ChromeKenneth Auchenberg
 
Campus Party 2010
Campus Party 2010Campus Party 2010
Campus Party 2010Fabio Akita
 
Web UI performance tuning
Web UI performance tuningWeb UI performance tuning
Web UI performance tuningAndy Pemberton
 
Jquery Introduction
Jquery IntroductionJquery Introduction
Jquery Introductioncabbiepete
 
Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices ThoughtWorks
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10Erik Sowa
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Adrian Olaru
 
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPIPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPGuilherme Blanco
 
The Tech Side of Project Argo
The Tech Side of Project ArgoThe Tech Side of Project Argo
The Tech Side of Project ArgoWesley Lindamood
 
Advanced Data Widgets and Server Integration
Advanced Data Widgets and Server IntegrationAdvanced Data Widgets and Server Integration
Advanced Data Widgets and Server IntegrationSencha
 
HTML 5: The Future of the Web
HTML 5: The Future of the WebHTML 5: The Future of the Web
HTML 5: The Future of the WebTim Wright
 
Advanced Performance Tuning in Ext GWT
Advanced Performance Tuning in Ext GWTAdvanced Performance Tuning in Ext GWT
Advanced Performance Tuning in Ext GWTSencha
 
What makes JBoss AS7 tick?
What makes JBoss AS7 tick?What makes JBoss AS7 tick?
What makes JBoss AS7 tick?marius_bogoevici
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UIRebecca Murphey
 
University of Abertay Dundee - evening
University of Abertay Dundee - eveningUniversity of Abertay Dundee - evening
University of Abertay Dundee - eveningRachel Andrew
 
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009Alexandre Morgaut
 
Not Only Drupal
Not Only DrupalNot Only Drupal
Not Only Drupalmcantelon
 

Semelhante a Java Server Faces 2.0 - Der Standard für moderne und komponentenbasierte Webanwendungen (20)

Node.js and websockets intro
Node.js and websockets introNode.js and websockets intro
Node.js and websockets intro
 
Upgrading to Rails 3
Upgrading to Rails 3Upgrading to Rails 3
Upgrading to Rails 3
 
Základy GWT
Základy GWTZáklady GWT
Základy GWT
 
Browser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google ChromeBrowser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google Chrome
 
Campus Party 2010
Campus Party 2010Campus Party 2010
Campus Party 2010
 
Web UI performance tuning
Web UI performance tuningWeb UI performance tuning
Web UI performance tuning
 
Jquery Introduction
Jquery IntroductionJquery Introduction
Jquery Introduction
 
Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPIPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
 
The Tech Side of Project Argo
The Tech Side of Project ArgoThe Tech Side of Project Argo
The Tech Side of Project Argo
 
Advanced Data Widgets and Server Integration
Advanced Data Widgets and Server IntegrationAdvanced Data Widgets and Server Integration
Advanced Data Widgets and Server Integration
 
HTML 5: The Future of the Web
HTML 5: The Future of the WebHTML 5: The Future of the Web
HTML 5: The Future of the Web
 
Advanced Performance Tuning in Ext GWT
Advanced Performance Tuning in Ext GWTAdvanced Performance Tuning in Ext GWT
Advanced Performance Tuning in Ext GWT
 
What makes JBoss AS7 tick?
What makes JBoss AS7 tick?What makes JBoss AS7 tick?
What makes JBoss AS7 tick?
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UI
 
University of Abertay Dundee - evening
University of Abertay Dundee - eveningUniversity of Abertay Dundee - evening
University of Abertay Dundee - evening
 
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
 
Not Only Drupal
Not Only DrupalNot Only Drupal
Not Only Drupal
 

Mais de GFU Cyrus AG

Social Media im Unternehmen
Social Media im UnternehmenSocial Media im Unternehmen
Social Media im UnternehmenGFU Cyrus AG
 
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...GFU Cyrus AG
 
Clean Code Developer
Clean Code DeveloperClean Code Developer
Clean Code DeveloperGFU Cyrus AG
 
Cross-Apps-Entwicklung für iPhone, Android und Co.
Cross-Apps-Entwicklung für iPhone, Android und Co.Cross-Apps-Entwicklung für iPhone, Android und Co.
Cross-Apps-Entwicklung für iPhone, Android und Co.GFU Cyrus AG
 
Softwarequalitätssicherung mit Continuous Integration Tools
Softwarequalitätssicherung mit Continuous Integration ToolsSoftwarequalitätssicherung mit Continuous Integration Tools
Softwarequalitätssicherung mit Continuous Integration ToolsGFU Cyrus AG
 
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...GFU Cyrus AG
 
Requirements Engineering in agilen Projekten - Flexibilität ist gefordert
Requirements Engineering in agilen Projekten - Flexibilität ist gefordertRequirements Engineering in agilen Projekten - Flexibilität ist gefordert
Requirements Engineering in agilen Projekten - Flexibilität ist gefordertGFU Cyrus AG
 
SharePoint 2010 - Was ist neu, was wird besser!
SharePoint 2010 - Was ist neu, was wird besser!SharePoint 2010 - Was ist neu, was wird besser!
SharePoint 2010 - Was ist neu, was wird besser!GFU Cyrus AG
 
Java Persistence 2.0
Java Persistence 2.0Java Persistence 2.0
Java Persistence 2.0GFU Cyrus AG
 
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...GFU Cyrus AG
 
Liferay Portal - ein Webportal für viele Unternehmensanforderungen
Liferay Portal - ein Webportal für viele UnternehmensanforderungenLiferay Portal - ein Webportal für viele Unternehmensanforderungen
Liferay Portal - ein Webportal für viele UnternehmensanforderungenGFU Cyrus AG
 
PostgreSQL im Produktivbetrieb
PostgreSQL im ProduktivbetriebPostgreSQL im Produktivbetrieb
PostgreSQL im ProduktivbetriebGFU Cyrus AG
 
Wieviel Web2.0 braucht Ihr Unternehmen?
Wieviel Web2.0 braucht Ihr Unternehmen?Wieviel Web2.0 braucht Ihr Unternehmen?
Wieviel Web2.0 braucht Ihr Unternehmen?GFU Cyrus AG
 
Neue Features der Java EE 6
Neue Features der Java EE 6Neue Features der Java EE 6
Neue Features der Java EE 6GFU Cyrus AG
 
Das Java-Spring-Framework in der Praxis
Das Java-Spring-Framework in der PraxisDas Java-Spring-Framework in der Praxis
Das Java-Spring-Framework in der PraxisGFU Cyrus AG
 
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer SeminarverwaltungAgile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer SeminarverwaltungGFU Cyrus AG
 
Wissensmanagement bei Volkswagen
Wissensmanagement bei VolkswagenWissensmanagement bei Volkswagen
Wissensmanagement bei VolkswagenGFU Cyrus AG
 
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...GFU Cyrus AG
 
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalkGrenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalkGFU Cyrus AG
 
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...GFU Cyrus AG
 

Mais de GFU Cyrus AG (20)

Social Media im Unternehmen
Social Media im UnternehmenSocial Media im Unternehmen
Social Media im Unternehmen
 
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
 
Clean Code Developer
Clean Code DeveloperClean Code Developer
Clean Code Developer
 
Cross-Apps-Entwicklung für iPhone, Android und Co.
Cross-Apps-Entwicklung für iPhone, Android und Co.Cross-Apps-Entwicklung für iPhone, Android und Co.
Cross-Apps-Entwicklung für iPhone, Android und Co.
 
Softwarequalitätssicherung mit Continuous Integration Tools
Softwarequalitätssicherung mit Continuous Integration ToolsSoftwarequalitätssicherung mit Continuous Integration Tools
Softwarequalitätssicherung mit Continuous Integration Tools
 
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
 
Requirements Engineering in agilen Projekten - Flexibilität ist gefordert
Requirements Engineering in agilen Projekten - Flexibilität ist gefordertRequirements Engineering in agilen Projekten - Flexibilität ist gefordert
Requirements Engineering in agilen Projekten - Flexibilität ist gefordert
 
SharePoint 2010 - Was ist neu, was wird besser!
SharePoint 2010 - Was ist neu, was wird besser!SharePoint 2010 - Was ist neu, was wird besser!
SharePoint 2010 - Was ist neu, was wird besser!
 
Java Persistence 2.0
Java Persistence 2.0Java Persistence 2.0
Java Persistence 2.0
 
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
 
Liferay Portal - ein Webportal für viele Unternehmensanforderungen
Liferay Portal - ein Webportal für viele UnternehmensanforderungenLiferay Portal - ein Webportal für viele Unternehmensanforderungen
Liferay Portal - ein Webportal für viele Unternehmensanforderungen
 
PostgreSQL im Produktivbetrieb
PostgreSQL im ProduktivbetriebPostgreSQL im Produktivbetrieb
PostgreSQL im Produktivbetrieb
 
Wieviel Web2.0 braucht Ihr Unternehmen?
Wieviel Web2.0 braucht Ihr Unternehmen?Wieviel Web2.0 braucht Ihr Unternehmen?
Wieviel Web2.0 braucht Ihr Unternehmen?
 
Neue Features der Java EE 6
Neue Features der Java EE 6Neue Features der Java EE 6
Neue Features der Java EE 6
 
Das Java-Spring-Framework in der Praxis
Das Java-Spring-Framework in der PraxisDas Java-Spring-Framework in der Praxis
Das Java-Spring-Framework in der Praxis
 
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer SeminarverwaltungAgile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
 
Wissensmanagement bei Volkswagen
Wissensmanagement bei VolkswagenWissensmanagement bei Volkswagen
Wissensmanagement bei Volkswagen
 
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
 
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalkGrenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
 
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

Java Server Faces 2.0 - Der Standard für moderne und komponentenbasierte Webanwendungen

  • 1. JSF 2.0 Robert Reiz Tuesday, February 23, 2010
  • 2. Trainer Robert Reiz Dipl. Inf. (FH-Mannheim) Buch Mail-Travel-Agents auf Linux-Systemen Java-Projekte seit 2002 JSF-Erfahrung seit 2006 Gründung der PLOIN GmbH Jan. 2008 Trainer bei der GFU seit Dez. 2008 Tuesday, February 23, 2010
  • 3. Trainer Comitter ploinFaces ploinMailFactory Blog http://www.robert-reiz.de Tuesday, February 23, 2010
  • 4. Eine Presentation ist keine Dokumentation! Eine Presentation soll lediglich den Speaker bei seinem Vortrag unterstützen! Tuesday, February 23, 2010
  • 5. Wer kennt JSF ? Tuesday, February 23, 2010
  • 6. Was ist JSF ? Tuesday, February 23, 2010
  • 7. Standards JSF 1.0 - JSR 127 - May 2004 JSF 1.2 - JSR 252 - May 2006 JSF 2.0 - JSR 314 - Julie 2009 Tuesday, February 23, 2010
  • 8. Lifecycle Request Apply Request Process Restore View Values Validations Response Render Invoke Update Modell Response Applications Values Tuesday, February 23, 2010
  • 9. JSF 1.2 xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" JSF 2.0 xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:composite="http://java.sun.com/jsf/composite" jsf.js Tuesday, February 23, 2010
  • 10. <h:selectOneListbox id="edit_workUnit_selectedProject" value="${managedBean[projectItem]}" style="width:200px; height:200px;" required="true"> <f:selectItems value="#{managedBean.projectList}"/> </h:selectOneListbox> <h:commandButton value="Speichern" actionListener="#{managedBean.doLoginListener}" action="#{loginBean.doLogin}" /> Tuesday, February 23, 2010
  • 12. Implementierungen JSF-RI (mojarra) MyFaces-Core Tuesday, February 23, 2010
  • 13. Flora und Fauna RichFaces IceFaces ADF Netadvantage Facelets Tomahawk Trinidad Orchestra PrimeFaces Tobago Woodstock ploinFaces Tuesday, February 23, 2010
  • 14. Matrix http://www.jsfmatrix.net/ Tuesday, February 23, 2010
  • 15. Nachteile von JSF 1.X Tuesday, February 23, 2010
  • 16. JSF 1.X Nicht Bookmarkfähig -> PostBackPattern Lange XML-Konfiguration Kein Templating mit JSP Kein Resourcen-Handing Kein AJAX Wenig Convention -> Viel Configuration Tuesday, February 23, 2010
  • 18. JSF 2.0 - Big changes XML-Freie Konfig. mit Annotationen Facelets ist der neue Standard Facelets-Comp. mit Interfaces/Impl. Standartisiertes AJAX Bookable links/buttons Tuesday, February 23, 2010
  • 19. JSF 2.0 - Small changes Neue Scopes System-events Direkte Navigation ProjectStage Neue Methoden in der FacesContext .... Tuesday, February 23, 2010
  • 20. Status Quo JSF 2.0 JSF-RI ploinFaces (mojarra) MyFaces-Core RichFaces IceFaces PrimeFaces Tuesday, February 23, 2010
  • 22. @ManagedBean @RequestScoped public class LogInBean { private static final long serialVersionUID = 199L; private String loginName = "admin"; @ManagedProperty(name = "pass", value="admin") private String password; private String doNavigate(){ return "/page/welcome"; } } Tuesday, February 23, 2010
  • 24. Facelets Nicht 1:1 übernommen Templating 15% schneller als JSP Einfache Komponentenentwicklung Schnittstelle für composite-components Tuesday, February 23, 2010
  • 25. Facelets - Template layout.xhtml login.xhtml welcome.xhtml myData.xhtml Tuesday, February 23, 2010
  • 26. Facelets - Template <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <link rel="stylesheet" type="text/css" href="../css/layout.css" /> </h:head> <h:body> <div id="header" align="center"> <ui:insert name="header"> HEADER - ${title} </ui:insert> </div> <div id="content"> <ui:insert name="content"> Content </ui:insert> </div> <div id="footer" align="center"> <ui:insert name="footer" > FOOTER </ui:insert> </div> </h:body> </html> Tuesday, February 23, 2010
  • 27. Facelets - Template <ui:composition template="/page/layout.xhtml"> <ui:param name="title" value="LOGIN SITE" /> <ui:define name="content"> ... Hier Inhalt </ui:define> </ui:composition> Tuesday, February 23, 2010
  • 28. Facelets - Compon. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://java.sun.com/jsf/composite"> <head><title>MyComponent</title></head> <body> <composite:interface> <composite:attribute name="title"/> </composite:interface> <composite:implementation> <div style="border: 1px soldi red"> <h1>#{cc.attrs.title}</h1> ... XHTML oder JSF-Komponenten </div> </composite:implementation> </body> </html> Tuesday, February 23, 2010
  • 29. Facelets - Compon. <html xmlns:gfu="http://java.sun.com/jsf/composite/gfu"> <gfu:myComponent title="Panel-Header" /> Tuesday, February 23, 2010
  • 32. AJAX <f:ajax event="keyup" execute="@form" render="form:result" /> Tuesday, February 23, 2010
  • 33. AJAX <h:form id="form"> <h:inputText value="#{welcomeBean.text}" > <f:ajax event="keyup" execute="@form" render="form:result" /> </h:inputText> <h:outputText id="result" value="#{welcomeBean.text}" /> </h:form> Tuesday, February 23, 2010
  • 34. AJAX jsf.ajax.addOnError(callback) jsf.ajax.addOnEvent(callback) jsf.ajax.request(source, event, options) jsf.ajax.response(request, context) Tuesday, February 23, 2010
  • 36. Resources <h:outputStylesheet name="css/style.css" /> <h:outputScript name="jsf.js" libary="javax.faces" target="head" /> <h:graphicImage value="#{resource['lib:gfu.gif']}" /> Tuesday, February 23, 2010
  • 37. /resources/compLib/1.1/script/compScript.js /META-INF/resources/compLib/script/compScript.js [localePrefix/][libraryName/][libraryVersion/]resourceName[/resourceVersion] Tuesday, February 23, 2010
  • 39. Bookable <h:link outcome="/page/welcome" value="testLink" includeViewParams="true" > <f:param name="userId" value="5" /> </h:link> <a href="/demoJsf2/page/welcome.jsf?userId=5">testLink</a> Tuesday, February 23, 2010
  • 40. Bookable <h:button outcome="/page/welcome" value="testLink" includeViewParams="true" > <f:param name="userId" value="5" /> </h:button> <input type="button"  value="testLink"  onclick="window.location.href='/demoJsf2/page/welcome.jsf?userId=5'; return false;"/> Tuesday, February 23, 2010
  • 42. Scopes Application Session Request View Flash Custom None Tuesday, February 23, 2010
  • 44. Flows - ploinFaces <flow id="loginFlow"> <views> <view>/login.xhtml</view> <view>/page/help/agbLogin.xhtml</view> <view>/page/help/haftungLogin.xhtml</view> </views> <attributes> <attribute>logInOutBean</attribute> </attributes> </flow> Tuesday, February 23, 2010
  • 45. Flows - ploinFaces <flow id="useradministrationFlow"> <views> <view>/page/useradmin.*</view> </views> <attributes> <attribute>useradminBean</attribute> <attribute>secureBean</attribute> </attributes> </flow> Tuesday, February 23, 2010
  • 46. Flows - ploinFaces <authoritySource>#{sessionBean.loginUserRole}</authoritySource> <accessDeniedPage>/page/accessDenied.xhtml</accessDeniedPage> <flow id="useradministrationFlow"> <views> <view>/page/useradmin.*</view> </views> <attributes> <attribute>useradminBean</attribute> <attribute>secureBean</attribute> </attributes> <includeAuthorities> <authority>Administrator</authority> <authority>GIS</authority> </includeAuthorities> </flow> Tuesday, February 23, 2010