SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
Jay Balunas | JBoss, By Red Hat


RichFaces 4.0 Component
       Deep Dive
Who am I

•   RichFaces Project Lead
•   JBoss Core Developer
•   JSF 2.2 Expert Group
•   Red Hat W3C Member
Presentation Links Page



http://bit.ly/rfdeepdive
The Plan...
•   Base Info
•   RichFaces Client Queue
•   Client Side Validation
•   RichFaces Push
•   JSF & Project Updates
JavaServer Faces (JSF)
   JSF 1.2
                       Made RichFaces, Seam,
     EE5              Facelets, etc...
     Extensible       Possible!

   JSF 2.0
     EE6
     Standardized Adv. Features

     Still Extensible
What Features..
Annotation based       Integrated Ajax
configuration
                       Bean validation
Facelets
                       Event system
Composite components
                       Exception handling
JSP deprecated
                       Implicit navigation
Bookmark GET support
                       Behaviors framework
Built in resource
handling               Project stages
RichFaces 4.0 Lighting Review
• Advanced framework built on top of JSF
  o Extends JSF core
  o Full set of UI components
  o Resource Handling
  o Component development kit
  o Skinning

• Two tag libraries
   o a4j: Page level ajax support & utility
     components
   o rich: Self contained visual components
The Plan...
•   Base Info
•   RichFaces Client Queue
•   Client Side Validation
•   RichFaces Push
•   JSF & Project Updates
JSF 2.0 Request Queue

•   New with JSF 2.0
•   Preserves server/client state
•   Very few options
•   No client side api
•   Can lead to traffic jams...
<a4j:queue ... >
• Logical queue on top of JSF 2
• Tuning features
    • requestDelay
    • ignoreDupResponses
    • requestGrouping
• Queue scoping
• Client side events & API
Request Delay
<h:form id="form">
  <!-- Queue applied to whole form -->
  <a4j:queue requestDelay="500"/>

  <h:inputText id="username" value="#{userBean.name}" />
      <a4j:ajax event="keyup" .../>
  </h:inputText>
  <h:inputText id="message" value="#{userBean.msg}" />
      <a4j:ajax event="keyup" .../>
  </h:inputText>
  ...
</h:form>
Queue Effects



http://bit.ly/kKxKGF
Global Queue

<context-param>
  <param-name>org.richfaces.queue.enabled</param-name>
  <param-value>true</param-value>
</context-param>


     View Scoped                         Form Scoped

<f:view>                          <h:form id="form">
<!-- Applied to whole view -->      <!-- Applied to whole form -->
<a4j:queue                          <a4j:queue
       requestDelay="500"/>               requestDelay="1000"/>
   ...                              ...
Named Queues
<!-- Checking availability is costly, so send less often -->
<a4j:queue name="available_queue" requestDelay="2000"/>
...
<h:inputText id="username"
              value="#{registrationBean.username}" />
    <a4j:ajax event="keyup" action="checkUsername" >
      <a4j:attachQueue name="available_queue"/>
    </a4j:ajax>
</h:inputText>
AttachQueue Tips
• Override settings directly
• Skip the named queue


         http://bit.ly/ilJu6e
Client-Side Events & API
• Events
    • complete()
    • requestqueue()
    • requestdequeued()
• API
    • queue.getSize()
    • queue.isEmpty()
    • queue.set/getQueueOptions()
The Plan...
•   Base Info
•   RichFaces Client Queue
•   Client Side Validation
•   RichFaces Push
•   JSF & Project Updates
What is Bean Validation
• Bean Validation JSR-303
  o   Part of Java EE6
• Generic, tier independent constraints
• Custom, and composition constraints
  possible
• Constraint groups, and object graph
  validation
• Message localization
• Define constraints once, apply everywhere*
Bean Validation Sample
public class User {

    @NotEmpty @Size(max=100)
    private String name;

    @NotEmpty
    @Pattern(regexp = "[a-zA-Z0-9]+@[a-zA-Z0-9].....")
    private String email;

    @ValidProject
    private String project;
}
RichFaces 4.0 & BV

• Introduces client-side validation
 o JSFvalidators
 o Bean validation constraints
• JavaScript implementations
 o Validators
 o Converters
• rich:message(s) enhanced
BV Constraints & JSF Validators
JSF Validation Example:
- Demo: http://bit.ly/mJ9qK4
- XHTML: http://bit.ly/k7YhG6
- Java: http://bit.ly/lLw4PZ

Bean Validation Example:
- Demo: http://bit.ly/hsCJ16
- XHMTL:  http://bit.ly/l7MkLA
- Java: http://bit.ly/iQJvGP
Additional Features

• Behavior events
• Ajax fallback
• Custom constraints*
 Login:
 <h:inputText id="login" value="#{user.login}">
   <rich:validator event="keyup"/>
 </h:inputText>
 <rich:message for="login"/>
GraphValidation

• Validate all fields of a model object
 o Notjust current view values
 o Adds method validations


• In the validation phase
 o Not   hijacking the lifecycle
<h:inputSecret id="pwd1" value="#{regBean.pwd1}"/>
...
<h:inputsecret id="pwd2" value="#{regBean.pwd2}"/>

@Size(min = 5,   max = 15, message = "Wrong size for password")
private String   pwd1="";
@Size(min = 5,   max = 15, message = "Wrong size for confirmation")
private String   pwd2="";
Graph Validation Example:
- Demo: http://bit.ly/lv6ccS
- XHTML: http://bit.ly/jZltn8
- Java: http://bit.ly/l6W1U2
The Plan...
•   Base Info
•   RichFaces Client Queue
•   Client Side Validation
•   RichFaces Push
•   JSF & Project Updates
What Is Server-Side Push


Server-events can push updates/data
         to the the browser
<a4j:push ...>

• Integrates with Atmosphere
 o Comet/WebSockets
 o Graceful   degradation

• Java Messaging Service (JMS)
 o Reliability,   flexibility, etc....
<a4j:push ...> Basic Usage
Customizable subtopic               Topic configured in JMS


<a4j:push address="subtopic@twPush"
          onerror="alert(event.rf.data)"
          ondataavailable="processData(event.rf.data)"/>

                        Supports EL as well


          address="#{twBean.curSearch}@twPush"
Getting the Message Out
• TopicsContext
  – In application
  – Handles JMS details

• Direct JMS
  – Standard JMS messages
  – From anywhere
Getting the Message Out

 TopicsContext Publishing
 - TweetStream: http://bit.ly/itrrbS



 Standard JMS Message
 - TweetStream: http://bit.ly/kQcriB
Client Processing Options
• Partial Page Rendering
  – No data payload needed
  – Use JSF to process rendering


• Direct DOM Updates
  – Data payload
    • String, or JSON
  – JavaScript Required
Client Processing Options

Partial Page Rendering Example
- Demo: http://bit.ly/tweetstream2
- XHTML: http://bit.ly/ijIUNS
 
Direct DOM Updates Example
- IRC-Chat XHTML: http://bit.ly/m2AYnY
- IRC-Chat Java: http://bit.ly/lSe055
<a4j:push ...> Setup

• JMS server setup
  o JNDI   name: /topic/<topic>
• web.xml setup
  o JMS    factory & topic namespaces
• Topics Initializer
  o Binds   topic to richfaces
<a4j:push ...> Setup

Automatic JMS configuration with hornetq & JBoss AS
    - JMS: http://bit.ly/lNjGgg
    - Role: http://bit.ly/mgskTi

web.xml: http://bit.ly/jreH3k

TopicsInitializer: http://bit.ly/jDOwzm
The Plan...
•   Base Info
•   RichFaces Client Queue
•   Client Side Validation
•   RichFaces Push
•   JSF & Project Updates
JavaServer Faces Futures
• JSF 2.0/2.1
    • Released & implemented
• JSF 2.2
    • In JCP now - due end of year
    • Priorities: portals, ease of use, minor
    features, bugs
• JSF 3.0
    • Part of EE 7
    •No JSR yet
RichFaces 3.3.X
• JSF 1.2
   o EE5

• Community
  o 3.3.4 SNAPSHOT
  o No release plans at this time

• Enterprise fully supported via
  o Enterprise Application Platform 4/5 (EAP)
  o Enterprise Portal Platform 4/5 (EPP)
  o Web Framework Kit 1.X (WFK)
RichFaces 4.X
• 4.0.0.Final Released in March!!
  o JSF 2.0/2.1

• Community
  o 4.1.0 in development now

• Enterprise supported via
  o Enterprise Application Platform 6 (EAP)
  o Enterprise Portal Platform 6 (EPP)
  o Web Framework Kit 2 (WFK)
RichFaces 4.1
• Time-boxed 6 month release plan
  o Fall 2011
                                  Plus of coarse:
                                  bug fixes &
• In the works:                   stabilization
   o Git migration
   o Mobile & HTML5 updates
   o New components
   o Seam-forge integration    rich:editor
                              rich:notify
   o Sandbox & CDK process    rich:picklist
                              rich:orderedlist
   o and more...              etc....
Rich Components!
http://richfaces.org/showcase
Getting Started
• Project Page: http://richfaces.org
• 4.0.0.Final Downloads
  o   http://bit.ly/RF_Downloads
• Getting Started Guide
  o   http://bit.ly/RH_Getting_Started
• User Forums & Wiki
  o   http://bit.ly/RF_User_Space
• RichFaces Bug Tracker
  o   http://bit.ly/RF_Jira
Getting Involved
• Developer Forums & Wiki
  o   http://bit.ly/RF_Dev_Space
• Development Guide
  o   http://bit.ly/RF_Dev_Setup
• GitHub Source
  o   https://github.com/organizations/richfaces
• Build Options
  o   http://bit.ly/RF_Build_Options
• CI Server
  o   http://bit.ly/RF_Hudson_CI
More Way To Connect
• Project Twitter Account
  o http://twitter.com/richfaces


• Project Calendar
  o http://bit.ly/RF_Calendar

• IRC
   o #richfaces @ irc.freenode.net

• Team Meetings (open to all)
   o http://bit.ly/RF_Team_Mtgs
Wrap up and Q&A
My Contact Info:
•   http://in.relation.to/Bloggers/Jay
•   http://twitter.com/tech4j
•   http://github.com/balunasj
•   jbalunas@jboss.org
RichFaces 4 Component Deep Dive - JAX/JSFSummit

Weitere ähnliche Inhalte

Was ist angesagt?

Breaking SAP portal (HackerHalted)
Breaking SAP portal (HackerHalted)Breaking SAP portal (HackerHalted)
Breaking SAP portal (HackerHalted)ERPScan
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersRob Windsor
 
REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)Jef Claes
 
Single page apps_with_cf_and_angular[1]
Single page apps_with_cf_and_angular[1]Single page apps_with_cf_and_angular[1]
Single page apps_with_cf_and_angular[1]ColdFusionConference
 
SharePoint 2013 Javascript Object Model
SharePoint 2013 Javascript Object ModelSharePoint 2013 Javascript Object Model
SharePoint 2013 Javascript Object ModelInnoTech
 
HTML5 Offline Web Application
HTML5 Offline Web ApplicationHTML5 Offline Web Application
HTML5 Offline Web ApplicationAllan Huang
 
RESTful http_patterns_antipatterns
RESTful http_patterns_antipatternsRESTful http_patterns_antipatterns
RESTful http_patterns_antipatternsJan Algermissen
 
Rapi::Blog talk - TPC 2017
Rapi::Blog talk - TPC 2017Rapi::Blog talk - TPC 2017
Rapi::Blog talk - TPC 2017Henry Van Styn
 
Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013gdgyaounde
 
Webinar: IBM Connections Adminblast
Webinar: IBM Connections AdminblastWebinar: IBM Connections Adminblast
Webinar: IBM Connections AdminblastNico Meisenzahl
 
Web flowpresentation
Web flowpresentationWeb flowpresentation
Web flowpresentationRoman Brovko
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...Maarten Balliauw
 
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011Max Katz
 
HTML5 features & JavaScript APIs
HTML5 features & JavaScript APIsHTML5 features & JavaScript APIs
HTML5 features & JavaScript APIsFisnik Doko
 

Was ist angesagt? (20)

RESTful API - Best Practices
RESTful API - Best PracticesRESTful API - Best Practices
RESTful API - Best Practices
 
Web api
Web apiWeb api
Web api
 
How we rest
How we restHow we rest
How we rest
 
Breaking SAP portal (HackerHalted)
Breaking SAP portal (HackerHalted)Breaking SAP portal (HackerHalted)
Breaking SAP portal (HackerHalted)
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint Developers
 
REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)
 
Single page apps_with_cf_and_angular[1]
Single page apps_with_cf_and_angular[1]Single page apps_with_cf_and_angular[1]
Single page apps_with_cf_and_angular[1]
 
SharePoint 2013 Javascript Object Model
SharePoint 2013 Javascript Object ModelSharePoint 2013 Javascript Object Model
SharePoint 2013 Javascript Object Model
 
HTML5 Offline Web Application
HTML5 Offline Web ApplicationHTML5 Offline Web Application
HTML5 Offline Web Application
 
RESTful http_patterns_antipatterns
RESTful http_patterns_antipatternsRESTful http_patterns_antipatterns
RESTful http_patterns_antipatterns
 
Web API Basics
Web API BasicsWeb API Basics
Web API Basics
 
Rapi::Blog talk - TPC 2017
Rapi::Blog talk - TPC 2017Rapi::Blog talk - TPC 2017
Rapi::Blog talk - TPC 2017
 
Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013Intro to polymer-Devfest Yaoundé 2013
Intro to polymer-Devfest Yaoundé 2013
 
JSF 2.0 Preview
JSF 2.0 PreviewJSF 2.0 Preview
JSF 2.0 Preview
 
Webinar: IBM Connections Adminblast
Webinar: IBM Connections AdminblastWebinar: IBM Connections Adminblast
Webinar: IBM Connections Adminblast
 
Web flowpresentation
Web flowpresentationWeb flowpresentation
Web flowpresentation
 
Show Some Spine!
Show Some Spine!Show Some Spine!
Show Some Spine!
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
 
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
Ajax Applications with JSF2 and New RichFaces 4 at JAX 2011
 
HTML5 features & JavaScript APIs
HTML5 features & JavaScript APIsHTML5 features & JavaScript APIs
HTML5 features & JavaScript APIs
 

Andere mochten auch

A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4
A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4
A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4balunasj
 
Rich faces in_the_cloud_mini_booth
Rich faces in_the_cloud_mini_boothRich faces in_the_cloud_mini_booth
Rich faces in_the_cloud_mini_boothbalunasj
 
The Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java DeveloperThe Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java Developerbalunasj
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with javaJeongHun Byeon
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Andere mochten auch (6)

A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4
A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4
A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4
 
Rich faces in_the_cloud_mini_booth
Rich faces in_the_cloud_mini_boothRich faces in_the_cloud_mini_booth
Rich faces in_the_cloud_mini_booth
 
The Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java DeveloperThe Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java Developer
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with java
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Ähnlich wie RichFaces 4 Component Deep Dive - JAX/JSFSummit

Going Above JSF 2.0 with RichFaces and Seam
Going Above JSF 2.0 with RichFaces and SeamGoing Above JSF 2.0 with RichFaces and Seam
Going Above JSF 2.0 with RichFaces and SeamLincoln III
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsMax Katz
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component libraryMax Katz
 
Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)Michael Kurz
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache UsergridDavid M. Johnson
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescueMarko Heijnen
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileAmazon Web Services Japan
 
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4Max Katz
 
Web Technologies in Java EE 7
Web Technologies in Java EE 7Web Technologies in Java EE 7
Web Technologies in Java EE 7Lukáš Fryč
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 ConferenceRoger Kitain
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Arun Gupta
 
RichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced FeaturesRichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced FeaturesMax Katz
 
JSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfacesJSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfacesStrannik_2013
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationStuart (Pid) Williams
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with RailsYi-Ting Cheng
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFMax Katz
 
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
 
Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Michael Kurz
 
Code First with Serverless Azure Functions
Code First with Serverless Azure FunctionsCode First with Serverless Azure Functions
Code First with Serverless Azure FunctionsJeremy Likness
 

Ähnlich wie RichFaces 4 Component Deep Dive - JAX/JSFSummit (20)

Going Above JSF 2.0 with RichFaces and Seam
Going Above JSF 2.0 with RichFaces and SeamGoing Above JSF 2.0 with RichFaces and Seam
Going Above JSF 2.0 with RichFaces and Seam
 
RichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF ApplicationsRichFaces 4: Rich Ajax Components For Your JSF Applications
RichFaces 4: Rich Ajax Components For Your JSF Applications
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component library
 
JSF2
JSF2JSF2
JSF2
 
Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)Go Fullstack: JSF for Public Sites (CONFESS 2013)
Go Fullstack: JSF for Public Sites (CONFESS 2013)
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
RichFaces 4 webinar #2: RichFaces 3 toRichFaces 4
 
Web Technologies in Java EE 7
Web Technologies in Java EE 7Web Technologies in Java EE 7
Web Technologies in Java EE 7
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 Conference
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
 
RichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced FeaturesRichFaces 4 Webinar - New and Advanced Features
RichFaces 4 Webinar - New and Advanced Features
 
JSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfacesJSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfaces
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with Rails
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSF
 
Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)
 
Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)
 
Code First with Serverless Azure Functions
Code First with Serverless Azure FunctionsCode First with Serverless Azure Functions
Code First with Serverless Azure Functions
 

Kürzlich hochgeladen

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Kürzlich hochgeladen (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

RichFaces 4 Component Deep Dive - JAX/JSFSummit

  • 1. Jay Balunas | JBoss, By Red Hat RichFaces 4.0 Component Deep Dive
  • 2. Who am I • RichFaces Project Lead • JBoss Core Developer • JSF 2.2 Expert Group • Red Hat W3C Member
  • 4. The Plan... • Base Info • RichFaces Client Queue • Client Side Validation • RichFaces Push • JSF & Project Updates
  • 5. JavaServer Faces (JSF)  JSF 1.2 Made RichFaces, Seam,  EE5 Facelets, etc...  Extensible Possible!  JSF 2.0  EE6  Standardized Adv. Features  Still Extensible
  • 6. What Features.. Annotation based Integrated Ajax configuration Bean validation Facelets Event system Composite components Exception handling JSP deprecated Implicit navigation Bookmark GET support Behaviors framework Built in resource handling Project stages
  • 7. RichFaces 4.0 Lighting Review • Advanced framework built on top of JSF o Extends JSF core o Full set of UI components o Resource Handling o Component development kit o Skinning • Two tag libraries o a4j: Page level ajax support & utility components o rich: Self contained visual components
  • 8. The Plan... • Base Info • RichFaces Client Queue • Client Side Validation • RichFaces Push • JSF & Project Updates
  • 9. JSF 2.0 Request Queue • New with JSF 2.0 • Preserves server/client state • Very few options • No client side api • Can lead to traffic jams...
  • 10. <a4j:queue ... > • Logical queue on top of JSF 2 • Tuning features • requestDelay • ignoreDupResponses • requestGrouping • Queue scoping • Client side events & API
  • 11. Request Delay <h:form id="form"> <!-- Queue applied to whole form --> <a4j:queue requestDelay="500"/> <h:inputText id="username" value="#{userBean.name}" /> <a4j:ajax event="keyup" .../> </h:inputText> <h:inputText id="message" value="#{userBean.msg}" /> <a4j:ajax event="keyup" .../> </h:inputText> ... </h:form>
  • 13. Global Queue <context-param> <param-name>org.richfaces.queue.enabled</param-name> <param-value>true</param-value> </context-param> View Scoped Form Scoped <f:view> <h:form id="form"> <!-- Applied to whole view --> <!-- Applied to whole form --> <a4j:queue <a4j:queue requestDelay="500"/> requestDelay="1000"/> ... ...
  • 14. Named Queues <!-- Checking availability is costly, so send less often --> <a4j:queue name="available_queue" requestDelay="2000"/> ... <h:inputText id="username" value="#{registrationBean.username}" /> <a4j:ajax event="keyup" action="checkUsername" > <a4j:attachQueue name="available_queue"/> </a4j:ajax> </h:inputText>
  • 15. AttachQueue Tips • Override settings directly • Skip the named queue http://bit.ly/ilJu6e
  • 16. Client-Side Events & API • Events • complete() • requestqueue() • requestdequeued() • API • queue.getSize() • queue.isEmpty() • queue.set/getQueueOptions()
  • 17. The Plan... • Base Info • RichFaces Client Queue • Client Side Validation • RichFaces Push • JSF & Project Updates
  • 18. What is Bean Validation • Bean Validation JSR-303 o Part of Java EE6 • Generic, tier independent constraints • Custom, and composition constraints possible • Constraint groups, and object graph validation • Message localization • Define constraints once, apply everywhere*
  • 19. Bean Validation Sample public class User { @NotEmpty @Size(max=100) private String name; @NotEmpty @Pattern(regexp = "[a-zA-Z0-9]+@[a-zA-Z0-9].....") private String email; @ValidProject private String project; }
  • 20. RichFaces 4.0 & BV • Introduces client-side validation o JSFvalidators o Bean validation constraints • JavaScript implementations o Validators o Converters • rich:message(s) enhanced
  • 21. BV Constraints & JSF Validators JSF Validation Example: - Demo: http://bit.ly/mJ9qK4 - XHTML: http://bit.ly/k7YhG6 - Java: http://bit.ly/lLw4PZ Bean Validation Example: - Demo: http://bit.ly/hsCJ16 - XHMTL:  http://bit.ly/l7MkLA - Java: http://bit.ly/iQJvGP
  • 22. Additional Features • Behavior events • Ajax fallback • Custom constraints* Login: <h:inputText id="login" value="#{user.login}"> <rich:validator event="keyup"/> </h:inputText> <rich:message for="login"/>
  • 23. GraphValidation • Validate all fields of a model object o Notjust current view values o Adds method validations • In the validation phase o Not hijacking the lifecycle
  • 24. <h:inputSecret id="pwd1" value="#{regBean.pwd1}"/> ... <h:inputsecret id="pwd2" value="#{regBean.pwd2}"/> @Size(min = 5, max = 15, message = "Wrong size for password") private String pwd1=""; @Size(min = 5, max = 15, message = "Wrong size for confirmation") private String pwd2="";
  • 25. Graph Validation Example: - Demo: http://bit.ly/lv6ccS - XHTML: http://bit.ly/jZltn8 - Java: http://bit.ly/l6W1U2
  • 26. The Plan... • Base Info • RichFaces Client Queue • Client Side Validation • RichFaces Push • JSF & Project Updates
  • 27. What Is Server-Side Push Server-events can push updates/data to the the browser
  • 28. <a4j:push ...> • Integrates with Atmosphere o Comet/WebSockets o Graceful degradation • Java Messaging Service (JMS) o Reliability, flexibility, etc....
  • 29. <a4j:push ...> Basic Usage Customizable subtopic Topic configured in JMS <a4j:push address="subtopic@twPush" onerror="alert(event.rf.data)" ondataavailable="processData(event.rf.data)"/> Supports EL as well address="#{twBean.curSearch}@twPush"
  • 30. Getting the Message Out • TopicsContext – In application – Handles JMS details • Direct JMS – Standard JMS messages – From anywhere
  • 31. Getting the Message Out TopicsContext Publishing - TweetStream: http://bit.ly/itrrbS Standard JMS Message - TweetStream: http://bit.ly/kQcriB
  • 32. Client Processing Options • Partial Page Rendering – No data payload needed – Use JSF to process rendering • Direct DOM Updates – Data payload • String, or JSON – JavaScript Required
  • 33. Client Processing Options Partial Page Rendering Example - Demo: http://bit.ly/tweetstream2 - XHTML: http://bit.ly/ijIUNS   Direct DOM Updates Example - IRC-Chat XHTML: http://bit.ly/m2AYnY - IRC-Chat Java: http://bit.ly/lSe055
  • 34. <a4j:push ...> Setup • JMS server setup o JNDI name: /topic/<topic> • web.xml setup o JMS factory & topic namespaces • Topics Initializer o Binds topic to richfaces
  • 35. <a4j:push ...> Setup Automatic JMS configuration with hornetq & JBoss AS     - JMS: http://bit.ly/lNjGgg     - Role: http://bit.ly/mgskTi web.xml: http://bit.ly/jreH3k TopicsInitializer: http://bit.ly/jDOwzm
  • 36. The Plan... • Base Info • RichFaces Client Queue • Client Side Validation • RichFaces Push • JSF & Project Updates
  • 37. JavaServer Faces Futures • JSF 2.0/2.1 • Released & implemented • JSF 2.2 • In JCP now - due end of year • Priorities: portals, ease of use, minor features, bugs • JSF 3.0 • Part of EE 7 •No JSR yet
  • 38. RichFaces 3.3.X • JSF 1.2 o EE5 • Community o 3.3.4 SNAPSHOT o No release plans at this time • Enterprise fully supported via o Enterprise Application Platform 4/5 (EAP) o Enterprise Portal Platform 4/5 (EPP) o Web Framework Kit 1.X (WFK)
  • 39. RichFaces 4.X • 4.0.0.Final Released in March!! o JSF 2.0/2.1 • Community o 4.1.0 in development now • Enterprise supported via o Enterprise Application Platform 6 (EAP) o Enterprise Portal Platform 6 (EPP) o Web Framework Kit 2 (WFK)
  • 40. RichFaces 4.1 • Time-boxed 6 month release plan o Fall 2011 Plus of coarse: bug fixes & • In the works: stabilization o Git migration o Mobile & HTML5 updates o New components o Seam-forge integration rich:editor rich:notify o Sandbox & CDK process rich:picklist rich:orderedlist o and more... etc....
  • 43. Getting Started • Project Page: http://richfaces.org • 4.0.0.Final Downloads o http://bit.ly/RF_Downloads • Getting Started Guide o http://bit.ly/RH_Getting_Started • User Forums & Wiki o http://bit.ly/RF_User_Space • RichFaces Bug Tracker o http://bit.ly/RF_Jira
  • 44. Getting Involved • Developer Forums & Wiki o http://bit.ly/RF_Dev_Space • Development Guide o http://bit.ly/RF_Dev_Setup • GitHub Source o https://github.com/organizations/richfaces • Build Options o http://bit.ly/RF_Build_Options • CI Server o http://bit.ly/RF_Hudson_CI
  • 45. More Way To Connect • Project Twitter Account o http://twitter.com/richfaces • Project Calendar o http://bit.ly/RF_Calendar • IRC o #richfaces @ irc.freenode.net • Team Meetings (open to all) o http://bit.ly/RF_Team_Mtgs
  • 46. Wrap up and Q&A My Contact Info: • http://in.relation.to/Bloggers/Jay • http://twitter.com/tech4j • http://github.com/balunasj • jbalunas@jboss.org