Welcome to JavaPolis 2007!
Overall Presentation Goal
Speaker's Qualifications
Constraints
Constraints in the Java Ecosystem
How are they applied
How are they applied
So what is the problem?
What is the solution?
Constraints in the Java Ecosystem
Expressing the constraint
Expressing the constraint
Expressing the constraint
Expressing the constraint: annotations
JSR 303
JSR 303 Members
How to express a constaint
Validating an object graph
Expression constraints
How to define a new constaint
How to define a new constraint
How to define a new constaint
How to define a new constraint
Possible validations
Validate an object (graph)
Message
Groups
Constraint repository API
Who could use it?
Ultimate goal
Thank you for your attention
Validating data is a common task that is copied in many different layers of an application, from the presentation tier to the persistence layer. Many times the exact same validations will have to be implemented in each separate validation framework, proving time consuming and error-prone. To prevent having to re-implement these validations at each layer, many developers will bundle validations directly into their classes, cluttering them with copied validation code that is, in fact, meta-data about the class itself.
This JSR will define a meta-data model and API for JavaBean validation. The default meta-data source will be annotations, with the ability to override and extend the meta-data through the use of XML validation descriptors. It is expected that the common cases will be easily accomplished using the annotations, while more complex validations or context-aware validation configuration will be available in the XML validation descriptors.
The validation API developed by this JSR will not be specific to any one tier or programming model. It will specifically not be tied to either the web tier or the persistence tier, and will be available for both server-side application programming, as well as rich client Swing application developers. This API is seen as a general extension to the JavaBeans object model, and as such is expected to be used as a core component in other specifications, such as JSF, JPA, and Bean Binding.
After graduating from Supelec (French "Grande Ecole"), Emmanuel has spent a few years in the retail industry where he started to be involved in the ORM space. He joined the Hibernate team 4 years ago and is now a core developer at JBoss, a division of Red Hat.
Emmanuel is the lead developer of Hibernate Annotations and Hibernate EntityManager, two key projects on top of Hibernate core implementing the Java Persistence(tm) specification, as well as Hibernate Search and Validator.
Emmanuel is a member of the EJB 3.0 expert group and the JSR 303: Bean Validation expert group. He is a regular speaker at various conferences and JUGs, including JavaOne, JBoss World and JAX.