SlideShare una empresa de Scribd logo
1 de 52
Descargar para leer sin conexión
1

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
JSF Best Practices
Edward Burns
@edburns
http://slideshare.net/edburns/
Consulting Member of Staff, Oracle
Program Agenda
 Review of the JSF Lifecycle
 Conversion and Validation

 JSF Navigation Review

3

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
The following is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality, and should
not be relied upon in making purchasing decisions. The
development, release, and timing of any features or functionality described for
Oracle’s products remains at the sole discretion of Oracle.

4

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Lifecycle Review

5

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Review: The Lifecycle Orchestrates MVC
The Baseball and Apple Pie of Web apps
• Data Conversion and Validation
• Page Flow
• Database integration

• I18N, L10N, A11Y
• Support CSS, Markup based
layout
• User Friendliness!

6

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Review: The Lifecycle Orchestrates MVC
The Baseball and Apple Pie of Web apps

7

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Review: The Lifecycle Orchestrates MVC
The Baseball and Apple Pie of Web apps
• The JSF Lifecycle uses some elements of the

strategy design pattern
– Define a family of algorithms

– Encapsulate each one
– Make them interchangeable

• For each Lifecycle phase, traverse the

UIComponent hierarchy and take the
appropriate action.
• Inversion of control in the extreme
• Analogy with Maven: work with the framework, not against it.

8

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Review: The Lifecycle Orchestrates MVC
Additional details added

9

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Interacting with the Lifecycle
Phase Listeners and System Events
 Phase Listeners
– coarse grained
– Not aware of individual components
– act before and after each lifecycle phase

 System Event
– fine grained
– can be attached to an individual component instance
– act during each lifecycle phase

10

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Interacting with the Lifecycle
Phase Listeners
 Similar in concept to Servlet Filter, but able to act within the JSF

lifecycle
 How to implement them
– Provide an implementation of javax.faces.event.PhaseListener
– MethodExpression that takes a javax.faces.event.PhaseEvent

11

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
PhaseListener
Implementing the Interface javax.faces.event.PhaseListener
public class MyPhaseListener implements PhaseListener {
public PhaseId getPhaseId() {
return (PhaseId.ANY_PHASE);

}
public void afterPhase(PhaseEvent event) {
System.out.println("afterPhase(" + event.getPhaseId() + ")");

}
public void beforePhase(PhaseEvent event) {
System.out.println("beforePhase(" + event.getPhaseId() + ")");
}
}

12

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
PhaseListener
Declare to the Runtime
 For all pages: faces-config.xml
<lifecycle>
<phase-listener>standard.MyPhaseListener</phase-listener>
</lifecycle>

 Per-page: <f:phaseListener>
 type attribute: fully qualified class name
 binding attribute: expression that evaluates to the instance

13

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
PhaseListener
How to impact the execution of the lifecycle
 FacesContext.renderResponse()
– Skip to Render Response Phase

 FacesContext.responseComplete()
– Do no further lifecycle processing on this request.

14

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Interacting with the Lifecycle
System Events
 Publish/Subscribe event bus for things that happen during the JSF

Lifecycle, not application specific
 Inspired by Solaris Dtrace, Linux strace, truss, etc.
 Listeners can be registered at three scopes
– component UIComponent.subscribeToEvent()
– view UIViewRoot.subscribeToEvent()
– application Application.subscribeToEvent()

 Publish is always with Application.publishEvent()

15

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
System Events

Interacting with
the Lifecycle
16

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Interacting with the Lifecycle
System Events
1.
2.

Implement the listener interface
Register for the event
–

<f:event> tag

–

faces-config.xml

<application>
<system-event-listener>
<system-event-listener-class>com.foo.MyListener
</system-event-listener-class>
<system-event-class>javax.faces.event.PreRenderViewEvent
</system-event-class>
</system-event-listener>
</application>
17

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Conversion and Validation

18

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Conversion and Validation
Type Safety for the UI
 How does JSF handle the concept of “value”?
– Apply Request Values
 unconverted string value pushed into UIComponent instances via

decode() method
– Process Validations
 Value is converted with Converter and validated with Validator(s)
– Update Model Values

 Value is pushed to value expression (if any)
– Render Response
 Value is pulled from value expression

19

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Conversion and Validation
Type Safety for the UI
 Behavior Based Interfaces
– ValueHolder
 Anything that displays a value
– EditableValueHolder
 When that value is editable by the end user.

20

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
21

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Converter
Standard Converters in package javax.faces.Convert
 Throw ConverterException to indicate conversion failure
 Failure added as per-component FacesMessage, other

components continue to be processed.
 Skip to Render Response phase if one or more
FacesMessage is present

22

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Converter
Implementing the interface javax.faces.convert.Converter
public static class CustomConverter implements Converter {
public Object getAsObject(FacesContext context, UIComponent component, String value)
{}
public String getAsString(FacesContext context, UIComponent component, Object value)
{}

}

23

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Converter
Declare to the Runtime
 faces-config.xml
– by id
<converter>
<converter-id>creditCardConverter</converter-id>
<converter-class>carstore.CreditCardConverter</converter-class>
</converter>

– by type
<converter>
<converter-for-class>java.util.Date</converter-for-class>

<converter-class>com.mycompany.MyThirdConverter</converter-class>
</converter>

24

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Converter
Declare to the Runtime
 @FacesConverter annotation
– value attribute is the converter id

– forClass attribute is the class converted by this converter

 Important subtlety
– Due to the nature of annotation scanning, a single usage of

@FacesConverter may only have one or the other of value and forClass.

25

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Associating a Converter with a UIComponent
Several ways
 Implicit converter, based on the type of the property referenced by the

EL Expression
 Explicit converter
– <f:converter>
 converterId attribute
 binding attribute

– converter attribute on a UIComponent

 Subtlety with <h:selectManyListbox>
– Must use <f:converter> for all types not handled by package

javax.faces.convert converters
26

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Associating a Converter with a UIComponent
Several ways
 Programmatically: call ValueHolder.setConverter( )

27

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Validators
Standard Validators in package javax.faces.validator
 Throw ValidatorException to indicate validation

failure
 Failure added as per-component
FacesMessage, other components continue to be
processed.
 Skip to Render Response phase if one or more
FacesMessage is present

28

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Validators
Implementing the interface javax.faces.validator.Validator
public class CustomValidator1 implements Validator {
public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException {
}

}

 Why the checked exception?
– Validation is a business level concern, make it more explicit

29

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Validators
Tip
 When programming custom Validators and Converters, program

defensively.
 Check inbound arguments for null.
 Avoid throwing non-expected exceptions

30

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Validators
Declaring a Validator to the runtime
 faces-config.xml
<validator>
<validator-id>CreditCardValidator</validator-id>
<validator-class>com.foo.CreditCardValidator</validator-class>
</validator>

 @FacesValidator annotation
– value attribute is the id
– isDefault is boolean

31

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Validators
Empty String Considerations
 Context parameter
javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL

– true: if the incoming value is the empty string, will automatically call

UIInput.setSubmittedValue(null)
– false or not set: Allow the empty string to pass through

32

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Validators
Default Validator
 Added to all EditableValueHolder instances in every page
 Declared in faces-config.xml
<application>
<default-validators>
<validator-id>MyValidator</validator-id>
</default-validators>
<application/>

 Empty <default-validators/> causes the list to be cleared
 Declared with @FacesValidator annotation isDefault attribute
33

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Validators
Bean Validator
 The javax.faces.validate.BeanValidator validator is the default default

Validator
 It is the gateway to JSR-303 Bean Validation
 Validates the JavaBeans property referenced by the component
 Validation expressed as “constraint” annotation on the property
 Property vs whole bean validation

34

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Validators
Bean Validator Standard Constraints
@NotNull(groups = Order.class)

@Size(min = 1, message =
"{validator.notEmpty}", groups = Order.class)
@CreditCard(groups = Order.class)
public String getCreditCard() {

return creditCard;
}

35

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Bean Validator
Making your own constraints

1.

Annotate your annotation
@Documented
@Constraint(validatedBy = CreditCardConstraintValidator.class)
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface CreditCard {
// message string should be {constraint.creditCard}
String message() default "{validator.creditCard}”;
//CreditCardVendor vendor default ANY;
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}

36

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Bean Validator
Making your own constraints

2.

Implement your constraint
public class CreditCardConstraintValidator
implements ConstraintValidator<CreditCard, String> {
private Pattern basicSyntaxPattern;
public void initialize(CreditCard parameters) {
basicSyntaxPattern = Pattern.compile("^[0-9 -]*$");
}
public boolean isValid(String value, ConstraintValidatorContext ctxt) {
if (value == null || value.length() == 0) {return true;}
if (!basicSyntaxPattern.matcher(value).matches()) { return false;}
return luhnCheck(stripNonDigits(value));
}
}

37

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Bean Validator
Disabling Bean Validator
 Context param

javax.faces.validator.DISABLE_BEAN_VALIDATOR
set to true

38

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Bean Validator
DEMOs
 Basic Bean Validator
 Version 1.1 Method

and Parameter
Validation

39

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Bean Validator
Groups
Groups
Validates all but this one

Validates these only

 Exposed to JSF via <f:validateBean validationGroups=“”>

40

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Associating a Validator with a UIComponent
Several ways
 Nest validator tag inside component
 Programmatically, call

EditableValueHolder.addValidator( )

41

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
JSF Navigation Review

42

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
How to Declare Navigation

 Explicit Navigation
– Declared via XML rules in faces-

config.xml file
 Implicit Navigation
– Relies on filename of pages
– No need for rules in faces-config.xml

43

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Explicit Navigation
 Designed to be well suited to developer

tools, hence syntax is verbose
 “action” is returned from all
ActionSource components
– Explicitly hard coded in the page
– Returned via a Value Expression

44

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Implicit Navigation
A reaction to all that verbosity
 from-view-id is the current view
 If there exists a page that is equivalent to the value of the current

action, the navigation is performed.

45

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
How Navigation Is Performed
POST vs GET
 JSF 1.0
– All navigation was POSTback based
 form does HTTP POST
 server does RequestDispatcher.forward()
 sends back new page, from old URL
 ABUSE OF HTTP!

 JSF 2.0
– Adds POST REDIRECT GET

46

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Further Navigation Enhancements
JSF 2.2 Faces Flows
 JSF 1.0
– All navigation was POSTback based
 form does HTTP POST
 server does RequestDispatcher.forward()
 sends back new page, from old URL
 ABUSE OF HTTP!

 JSF 2.0
– Adds POST REDIRECT GET

47

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Further Navigation Enhancements
 JSF 2.2 Faces Flows

 What’s in a Flow?

 Flow Nodes

48

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Further Navigation Enhancements
 JSF 2.2 Faces Flows

 PDF 7.5.1

49

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Questions?

Ed Burns
@edburns

50

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
The preceding is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality, and should
not be relied upon in making purchasing decisions. The
development, release, and timing of any features or functionality described for
Oracle’s products remains at the sole discretion of Oracle.

51

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
52

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Más contenido relacionado

La actualidad más candente

Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsVirtual Nuggets
 
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondOracle
 
Spring Framework
Spring FrameworkSpring Framework
Spring Frameworknomykk
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Edward Burns
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewEugene Bogaart
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the HorizonJosh Juneau
 
Spring 3 MVC CodeMash 2009
Spring 3 MVC   CodeMash 2009Spring 3 MVC   CodeMash 2009
Spring 3 MVC CodeMash 2009kensipe
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC frameworkMohit Gupta
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in actionAnkara JUG
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 DemystifiedAnkara JUG
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7Vijay Nair
 
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talkEd presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talkEdward Burns
 
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7Bruno Borges
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC SeminarJohn Lewis
 

La actualidad más candente (20)

Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
 
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and Beyond
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...
JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...
JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
 
Spring 3 MVC CodeMash 2009
Spring 3 MVC   CodeMash 2009Spring 3 MVC   CodeMash 2009
Spring 3 MVC CodeMash 2009
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC framework
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talkEd presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
 
J2ee
J2eeJ2ee
J2ee
 
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC Seminar
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 

Destacado

JSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksJSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksIan Hlavats
 
Back 2 basics - SSMS Tips (IDf)
Back 2 basics - SSMS Tips (IDf)Back 2 basics - SSMS Tips (IDf)
Back 2 basics - SSMS Tips (IDf)sqlserver.co.il
 
Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013sqlserver.co.il
 
JSF Component Behaviors
JSF Component BehaviorsJSF Component Behaviors
JSF Component BehaviorsAndy Schwartz
 
Building a Computer Science Pathway in Your High School - Feb 2017
Building a Computer Science Pathway in Your High School - Feb 2017Building a Computer Science Pathway in Your High School - Feb 2017
Building a Computer Science Pathway in Your High School - Feb 2017Hal Speed
 
Architecting large Node.js applications
Architecting large Node.js applicationsArchitecting large Node.js applications
Architecting large Node.js applicationsSergi Mansilla
 
Online bus pass management system
Online bus pass management systemOnline bus pass management system
Online bus pass management systempiyush khadse
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutesSimon Willison
 
Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...
Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...
Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...Beat Signer
 
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...Beat Signer
 
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture AppDynamics
 
Bus Ticket Management System Documentation
Bus Ticket Management System DocumentationBus Ticket Management System Documentation
Bus Ticket Management System Documentationmuzammil siddiq
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with ExamplesGabriele Lana
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsBG Java EE Course
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Beat Signer
 

Destacado (19)

JSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksJSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End Frameworks
 
JSF Design Patterns
JSF Design PatternsJSF Design Patterns
JSF Design Patterns
 
Back 2 basics - SSMS Tips (IDf)
Back 2 basics - SSMS Tips (IDf)Back 2 basics - SSMS Tips (IDf)
Back 2 basics - SSMS Tips (IDf)
 
Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013
 
JSF Component Behaviors
JSF Component BehaviorsJSF Component Behaviors
JSF Component Behaviors
 
Building a Computer Science Pathway in Your High School - Feb 2017
Building a Computer Science Pathway in Your High School - Feb 2017Building a Computer Science Pathway in Your High School - Feb 2017
Building a Computer Science Pathway in Your High School - Feb 2017
 
Architecting large Node.js applications
Architecting large Node.js applicationsArchitecting large Node.js applications
Architecting large Node.js applications
 
Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
 
Online bus pass management system
Online bus pass management systemOnline bus pass management system
Online bus pass management system
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutes
 
Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...
Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...
Extended ER Model and other Modelling Languages - Lecture 2 - Introduction to...
 
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture
 
Bus Ticket Management System Documentation
Bus Ticket Management System DocumentationBus Ticket Management System Documentation
Bus Ticket Management System Documentation
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with Examples
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 

Similar a Best Practices for JSF, Gameduell 2013

JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)Fred Rowe
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOFglassfish
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7Bruno Borges
 
The 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksThe 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksKunal Ashar
 
Oracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error HandlingOracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error HandlingChris Muir
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture ComponentsDarshan Parikh
 
Servlet to Spring: Internal Understanding
Servlet to Spring: Internal UnderstandingServlet to Spring: Internal Understanding
Servlet to Spring: Internal UnderstandingKnoldus Inc.
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questionsjbashask
 
Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?Fred Rowe
 
Load runner 8.0
Load runner 8.0Load runner 8.0
Load runner 8.0medsherb
 
Application Lifecycle Management (ALM).pdf
Application Lifecycle Management (ALM).pdfApplication Lifecycle Management (ALM).pdf
Application Lifecycle Management (ALM).pdfAmitesh Raikwar
 
Service Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on DemandService Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on DemandErika Barron
 
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)Shing Wai Chan
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...Fwdays
 
Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()Bruno Borges
 
Securing JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top TenSecuring JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top TenDavid Chandler
 

Similar a Best Practices for JSF, Gameduell 2013 (20)

JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOF
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7
 
The 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksThe 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web Frameworks
 
Oracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error HandlingOracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error Handling
 
oraclewls-jrebel
oraclewls-jrebeloraclewls-jrebel
oraclewls-jrebel
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Android Architecture Components
Android Architecture ComponentsAndroid Architecture Components
Android Architecture Components
 
Servlet to Spring: Internal Understanding
Servlet to Spring: Internal UnderstandingServlet to Spring: Internal Understanding
Servlet to Spring: Internal Understanding
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questions
 
Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?
 
Struts Interceptors
Struts InterceptorsStruts Interceptors
Struts Interceptors
 
Load runner 8.0
Load runner 8.0Load runner 8.0
Load runner 8.0
 
Application Lifecycle Management (ALM).pdf
Application Lifecycle Management (ALM).pdfApplication Lifecycle Management (ALM).pdf
Application Lifecycle Management (ALM).pdf
 
Service Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on DemandService Virtualization: Delivering Complex Test Environments on Demand
Service Virtualization: Delivering Complex Test Environments on Demand
 
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
JavaOne San Francisco 2013 - Servlet 3.1 (JSR 340)
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()
 
Securing JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top TenSecuring JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top Ten
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 

Más de Edward Burns

Developer Career Masterplan
Developer Career MasterplanDeveloper Career Masterplan
Developer Career MasterplanEdward Burns
 
Jakarta EE 11 Status Update​
Jakarta EE 11 Status Update​Jakarta EE 11 Status Update​
Jakarta EE 11 Status Update​Edward Burns
 
Sponsored Session: Please touch that dial!
Sponsored Session: Please touch that dial!Sponsored Session: Please touch that dial!
Sponsored Session: Please touch that dial!Edward Burns
 
How modernizing enterprise applications gives you a competitive advantage
How modernizing enterprise applications gives you a competitive advantageHow modernizing enterprise applications gives you a competitive advantage
How modernizing enterprise applications gives you a competitive advantageEdward Burns
 
Wie Azure Jakarta EE Nutzt
Wie Azure Jakarta EE NutztWie Azure Jakarta EE Nutzt
Wie Azure Jakarta EE NutztEdward Burns
 
Practical lessons from customers performing digital transformation with Azure
Practical lessons from customers performing digital transformation with AzurePractical lessons from customers performing digital transformation with Azure
Practical lessons from customers performing digital transformation with AzureEdward Burns
 
wls-azure-devnexus-2022.pdf
wls-azure-devnexus-2022.pdfwls-azure-devnexus-2022.pdf
wls-azure-devnexus-2022.pdfEdward Burns
 
Jakarta EE und Microprofile sind bei Azure zu Hause
Jakarta EE und Microprofile sind bei Azure zu HauseJakarta EE und Microprofile sind bei Azure zu Hause
Jakarta EE und Microprofile sind bei Azure zu HauseEdward Burns
 
Java on Your Terms with Azure
Java on Your Terms with AzureJava on Your Terms with Azure
Java on Your Terms with AzureEdward Burns
 
Wars I’ve Seen From Java EE to Spring and more, Azure has you covered
Wars I’ve SeenFrom Java EE to Spring and more, Azure has you coveredWars I’ve SeenFrom Java EE to Spring and more, Azure has you covered
Wars I’ve Seen From Java EE to Spring and more, Azure has you coveredEdward Burns
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...Edward Burns
 
Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?Edward Burns
 
Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?Edward Burns
 
Building a Serverless State Service for the Cloud
Building a Serverless State Service for the CloudBuilding a Serverless State Service for the Cloud
Building a Serverless State Service for the CloudEdward Burns
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Edward Burns
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015Edward Burns
 
JSF 2.3 Adopt-a-JSR 10 Minute Infodeck
JSF 2.3 Adopt-a-JSR 10 Minute InfodeckJSF 2.3 Adopt-a-JSR 10 Minute Infodeck
JSF 2.3 Adopt-a-JSR 10 Minute InfodeckEdward Burns
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckEdward Burns
 
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?Edward Burns
 
CON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To YouCON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To YouEdward Burns
 

Más de Edward Burns (20)

Developer Career Masterplan
Developer Career MasterplanDeveloper Career Masterplan
Developer Career Masterplan
 
Jakarta EE 11 Status Update​
Jakarta EE 11 Status Update​Jakarta EE 11 Status Update​
Jakarta EE 11 Status Update​
 
Sponsored Session: Please touch that dial!
Sponsored Session: Please touch that dial!Sponsored Session: Please touch that dial!
Sponsored Session: Please touch that dial!
 
How modernizing enterprise applications gives you a competitive advantage
How modernizing enterprise applications gives you a competitive advantageHow modernizing enterprise applications gives you a competitive advantage
How modernizing enterprise applications gives you a competitive advantage
 
Wie Azure Jakarta EE Nutzt
Wie Azure Jakarta EE NutztWie Azure Jakarta EE Nutzt
Wie Azure Jakarta EE Nutzt
 
Practical lessons from customers performing digital transformation with Azure
Practical lessons from customers performing digital transformation with AzurePractical lessons from customers performing digital transformation with Azure
Practical lessons from customers performing digital transformation with Azure
 
wls-azure-devnexus-2022.pdf
wls-azure-devnexus-2022.pdfwls-azure-devnexus-2022.pdf
wls-azure-devnexus-2022.pdf
 
Jakarta EE und Microprofile sind bei Azure zu Hause
Jakarta EE und Microprofile sind bei Azure zu HauseJakarta EE und Microprofile sind bei Azure zu Hause
Jakarta EE und Microprofile sind bei Azure zu Hause
 
Java on Your Terms with Azure
Java on Your Terms with AzureJava on Your Terms with Azure
Java on Your Terms with Azure
 
Wars I’ve Seen From Java EE to Spring and more, Azure has you covered
Wars I’ve SeenFrom Java EE to Spring and more, Azure has you coveredWars I’ve SeenFrom Java EE to Spring and more, Azure has you covered
Wars I’ve Seen From Java EE to Spring and more, Azure has you covered
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
 
Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?
 
Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?
 
Building a Serverless State Service for the Cloud
Building a Serverless State Service for the CloudBuilding a Serverless State Service for the Cloud
Building a Serverless State Service for the Cloud
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
 
JSF 2.3 Adopt-a-JSR 10 Minute Infodeck
JSF 2.3 Adopt-a-JSR 10 Minute InfodeckJSF 2.3 Adopt-a-JSR 10 Minute Infodeck
JSF 2.3 Adopt-a-JSR 10 Minute Infodeck
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
 
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?
 
CON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To YouCON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To You
 

Último

PicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer ServicePicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer ServiceRenan Moreira de Oliveira
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceMartin Humpolec
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.francesco barbera
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxYounusS2
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataSafe Software
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingGDSC PJATK
 
Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?SANGHEE SHIN
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 

Último (20)

PicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer ServicePicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer Service
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your Salesforce
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptx
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?Do we need a new standard for visualizing the invisible?
Do we need a new standard for visualizing the invisible?
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 

Best Practices for JSF, Gameduell 2013

  • 1. 1 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 2. JSF Best Practices Edward Burns @edburns http://slideshare.net/edburns/ Consulting Member of Staff, Oracle
  • 3. Program Agenda  Review of the JSF Lifecycle  Conversion and Validation  JSF Navigation Review 3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 4. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 5. Lifecycle Review 5 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 6. Review: The Lifecycle Orchestrates MVC The Baseball and Apple Pie of Web apps • Data Conversion and Validation • Page Flow • Database integration • I18N, L10N, A11Y • Support CSS, Markup based layout • User Friendliness! 6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 7. Review: The Lifecycle Orchestrates MVC The Baseball and Apple Pie of Web apps 7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 8. Review: The Lifecycle Orchestrates MVC The Baseball and Apple Pie of Web apps • The JSF Lifecycle uses some elements of the strategy design pattern – Define a family of algorithms – Encapsulate each one – Make them interchangeable • For each Lifecycle phase, traverse the UIComponent hierarchy and take the appropriate action. • Inversion of control in the extreme • Analogy with Maven: work with the framework, not against it. 8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 9. Review: The Lifecycle Orchestrates MVC Additional details added 9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 10. Interacting with the Lifecycle Phase Listeners and System Events  Phase Listeners – coarse grained – Not aware of individual components – act before and after each lifecycle phase  System Event – fine grained – can be attached to an individual component instance – act during each lifecycle phase 10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 11. Interacting with the Lifecycle Phase Listeners  Similar in concept to Servlet Filter, but able to act within the JSF lifecycle  How to implement them – Provide an implementation of javax.faces.event.PhaseListener – MethodExpression that takes a javax.faces.event.PhaseEvent 11 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 12. PhaseListener Implementing the Interface javax.faces.event.PhaseListener public class MyPhaseListener implements PhaseListener { public PhaseId getPhaseId() { return (PhaseId.ANY_PHASE); } public void afterPhase(PhaseEvent event) { System.out.println("afterPhase(" + event.getPhaseId() + ")"); } public void beforePhase(PhaseEvent event) { System.out.println("beforePhase(" + event.getPhaseId() + ")"); } } 12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 13. PhaseListener Declare to the Runtime  For all pages: faces-config.xml <lifecycle> <phase-listener>standard.MyPhaseListener</phase-listener> </lifecycle>  Per-page: <f:phaseListener>  type attribute: fully qualified class name  binding attribute: expression that evaluates to the instance 13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 14. PhaseListener How to impact the execution of the lifecycle  FacesContext.renderResponse() – Skip to Render Response Phase  FacesContext.responseComplete() – Do no further lifecycle processing on this request. 14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 15. Interacting with the Lifecycle System Events  Publish/Subscribe event bus for things that happen during the JSF Lifecycle, not application specific  Inspired by Solaris Dtrace, Linux strace, truss, etc.  Listeners can be registered at three scopes – component UIComponent.subscribeToEvent() – view UIViewRoot.subscribeToEvent() – application Application.subscribeToEvent()  Publish is always with Application.publishEvent() 15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 16. System Events Interacting with the Lifecycle 16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 17. Interacting with the Lifecycle System Events 1. 2. Implement the listener interface Register for the event – <f:event> tag – faces-config.xml <application> <system-event-listener> <system-event-listener-class>com.foo.MyListener </system-event-listener-class> <system-event-class>javax.faces.event.PreRenderViewEvent </system-event-class> </system-event-listener> </application> 17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 18. Conversion and Validation 18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 19. Conversion and Validation Type Safety for the UI  How does JSF handle the concept of “value”? – Apply Request Values  unconverted string value pushed into UIComponent instances via decode() method – Process Validations  Value is converted with Converter and validated with Validator(s) – Update Model Values  Value is pushed to value expression (if any) – Render Response  Value is pulled from value expression 19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 20. Conversion and Validation Type Safety for the UI  Behavior Based Interfaces – ValueHolder  Anything that displays a value – EditableValueHolder  When that value is editable by the end user. 20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 21. 21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 22. Converter Standard Converters in package javax.faces.Convert  Throw ConverterException to indicate conversion failure  Failure added as per-component FacesMessage, other components continue to be processed.  Skip to Render Response phase if one or more FacesMessage is present 22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 23. Converter Implementing the interface javax.faces.convert.Converter public static class CustomConverter implements Converter { public Object getAsObject(FacesContext context, UIComponent component, String value) {} public String getAsString(FacesContext context, UIComponent component, Object value) {} } 23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 24. Converter Declare to the Runtime  faces-config.xml – by id <converter> <converter-id>creditCardConverter</converter-id> <converter-class>carstore.CreditCardConverter</converter-class> </converter> – by type <converter> <converter-for-class>java.util.Date</converter-for-class> <converter-class>com.mycompany.MyThirdConverter</converter-class> </converter> 24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 25. Converter Declare to the Runtime  @FacesConverter annotation – value attribute is the converter id – forClass attribute is the class converted by this converter  Important subtlety – Due to the nature of annotation scanning, a single usage of @FacesConverter may only have one or the other of value and forClass. 25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 26. Associating a Converter with a UIComponent Several ways  Implicit converter, based on the type of the property referenced by the EL Expression  Explicit converter – <f:converter>  converterId attribute  binding attribute – converter attribute on a UIComponent  Subtlety with <h:selectManyListbox> – Must use <f:converter> for all types not handled by package javax.faces.convert converters 26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 27. Associating a Converter with a UIComponent Several ways  Programmatically: call ValueHolder.setConverter( ) 27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 28. Validators Standard Validators in package javax.faces.validator  Throw ValidatorException to indicate validation failure  Failure added as per-component FacesMessage, other components continue to be processed.  Skip to Render Response phase if one or more FacesMessage is present 28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 29. Validators Implementing the interface javax.faces.validator.Validator public class CustomValidator1 implements Validator { public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { } }  Why the checked exception? – Validation is a business level concern, make it more explicit 29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 30. Validators Tip  When programming custom Validators and Converters, program defensively.  Check inbound arguments for null.  Avoid throwing non-expected exceptions 30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 31. Validators Declaring a Validator to the runtime  faces-config.xml <validator> <validator-id>CreditCardValidator</validator-id> <validator-class>com.foo.CreditCardValidator</validator-class> </validator>  @FacesValidator annotation – value attribute is the id – isDefault is boolean 31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 32. Validators Empty String Considerations  Context parameter javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL – true: if the incoming value is the empty string, will automatically call UIInput.setSubmittedValue(null) – false or not set: Allow the empty string to pass through 32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 33. Validators Default Validator  Added to all EditableValueHolder instances in every page  Declared in faces-config.xml <application> <default-validators> <validator-id>MyValidator</validator-id> </default-validators> <application/>  Empty <default-validators/> causes the list to be cleared  Declared with @FacesValidator annotation isDefault attribute 33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 34. Validators Bean Validator  The javax.faces.validate.BeanValidator validator is the default default Validator  It is the gateway to JSR-303 Bean Validation  Validates the JavaBeans property referenced by the component  Validation expressed as “constraint” annotation on the property  Property vs whole bean validation 34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 35. Validators Bean Validator Standard Constraints @NotNull(groups = Order.class) @Size(min = 1, message = "{validator.notEmpty}", groups = Order.class) @CreditCard(groups = Order.class) public String getCreditCard() { return creditCard; } 35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 36. Bean Validator Making your own constraints 1. Annotate your annotation @Documented @Constraint(validatedBy = CreditCardConstraintValidator.class) @Target({ElementType.METHOD, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface CreditCard { // message string should be {constraint.creditCard} String message() default "{validator.creditCard}”; //CreditCardVendor vendor default ANY; Class<?>[] groups() default {}; Class<? extends Payload>[] payload() default {}; } 36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 37. Bean Validator Making your own constraints 2. Implement your constraint public class CreditCardConstraintValidator implements ConstraintValidator<CreditCard, String> { private Pattern basicSyntaxPattern; public void initialize(CreditCard parameters) { basicSyntaxPattern = Pattern.compile("^[0-9 -]*$"); } public boolean isValid(String value, ConstraintValidatorContext ctxt) { if (value == null || value.length() == 0) {return true;} if (!basicSyntaxPattern.matcher(value).matches()) { return false;} return luhnCheck(stripNonDigits(value)); } } 37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 38. Bean Validator Disabling Bean Validator  Context param javax.faces.validator.DISABLE_BEAN_VALIDATOR set to true 38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 39. Bean Validator DEMOs  Basic Bean Validator  Version 1.1 Method and Parameter Validation 39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 40. Bean Validator Groups Groups Validates all but this one Validates these only  Exposed to JSF via <f:validateBean validationGroups=“”> 40 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 41. Associating a Validator with a UIComponent Several ways  Nest validator tag inside component  Programmatically, call EditableValueHolder.addValidator( ) 41 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 42. JSF Navigation Review 42 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 43. How to Declare Navigation  Explicit Navigation – Declared via XML rules in faces- config.xml file  Implicit Navigation – Relies on filename of pages – No need for rules in faces-config.xml 43 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 44. Explicit Navigation  Designed to be well suited to developer tools, hence syntax is verbose  “action” is returned from all ActionSource components – Explicitly hard coded in the page – Returned via a Value Expression 44 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 45. Implicit Navigation A reaction to all that verbosity  from-view-id is the current view  If there exists a page that is equivalent to the value of the current action, the navigation is performed. 45 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 46. How Navigation Is Performed POST vs GET  JSF 1.0 – All navigation was POSTback based  form does HTTP POST  server does RequestDispatcher.forward()  sends back new page, from old URL  ABUSE OF HTTP!  JSF 2.0 – Adds POST REDIRECT GET 46 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 47. Further Navigation Enhancements JSF 2.2 Faces Flows  JSF 1.0 – All navigation was POSTback based  form does HTTP POST  server does RequestDispatcher.forward()  sends back new page, from old URL  ABUSE OF HTTP!  JSF 2.0 – Adds POST REDIRECT GET 47 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 48. Further Navigation Enhancements  JSF 2.2 Faces Flows  What’s in a Flow?  Flow Nodes 48 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 49. Further Navigation Enhancements  JSF 2.2 Faces Flows  PDF 7.5.1 49 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 50. Questions? Ed Burns @edburns 50 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 51. The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 51 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 52. 52 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.