Training materials on Bean Validation 1.1

by Emmanuel Bernard on 28 May 2014 training

I have two good Bean Validation related content for you today.

Training slides (in French)

Laurent Guerin wrote a comprehensive training on Bean Validation (1.0 and 1.1) for French students. The slides are available under a Creative Commons license. I did review them and they are very good.

The bad news is that they are in French. The good news is that they are in French!

Video training (in English)

Antonio Goncalves, my esteemed co-host of Les Cast Codeurs has published a 2 and a half hour video training on Bean Validation. It is hosted on Pluralsight where packages start at $29 / month but you can get the first 10 days free.

The good news is that Antonio has a Dr Love / French accent combo voice. The bad news? I'll let you find out ;)

Let me know if you have found good materials on Bean Validation. We might start a dedicated page on the website.

Comments

XML namespace and JCP

by Emmanuel Bernard on 04 Jun 2013 feedback

Antonio Goncalves, fellow JCP member and friend has asked me why Bean Validation XML's namespace has not moved from its original location to the jcp.org location like other Java EE 7 specifications.

I don't remember being aware that such a move was orchestrated so there are two possible reasons:

  1. I was never been made aware of the move,
  2. I was aware of it but considered that it was low priority compared to the other issues we were working on.

Provided we had to work hard till the last minute, and that the community never was keen on the XML support we put in Bean Validation, #2 is not impossible but I suspect it's #1 or I would have opened an issue to track the task.

Anyways, that's not a problem. Anyone can open an issue (I've just created one for this task), write a couple of pull requests to fix the spec, TCK and RI as explained in our contribute section. Scratch your own itch: so who's jumping? :)

We will have to wait for the next version of the spec to avoid breaking older applications but if it's committed, it won't be forgotten.

PS: no, I'm not bitter, but since I haven't blogged in a while that was a good occasion to remind everyone of the power of contributions ;)

Comments

Bean Validation 1.1 is a spec

by Emmanuel Bernard on 02 May 2013 release

It's now official, these couple of years of work have made it into an official JCP specification. Bean Validation is also part of Java EE 7 which has been approved too a few of days ago.

We have already discussed the features at great length here but to do a short summary:

  • support for method and constructor validation (via CDI, JAX-RS etc)
  • integration with CDI (Validator and ValidatorFactory injectable, ConstraintValidator instances being CDI beans and thus accept @Inject, etc)
  • EL expressions based error messages
  • group conversion in object graphs

I would like to thank the expert group and the community at large (without your input there would be no 1.1), Hardy and Gunnar that worked round to clock on the spec, the RI and the TCK and deliver everything on time, Pete for being my springboard when all hell broke lose and the folks at Oracle who worked with us to integrate Bean Validation with the rest of the Java EE ecosystem whether it be spec, implementation or TCK.

Go grab Hibernate Validator, the RI. The team has even spent an extra couple of weeks to deliver a nice documentation. And if you can't sleep, go read the specification itself.

Comments

Bean Validation 1.1 CR3 - Final Approval Ballot

by Emmanuel Bernard on 21 Mar 2013 release

Bean Validation, Hibernate Validator (its Reference Implementation) and the Test Compatibility Kit have been handed over to the JCP for what is called the Final Approval Ballot. That's when the expert committee votes for the go / no-go of the specification going final as it is.

We have found a few glitches when working on both the RI and the TCK in the last month but everything is in order now. The biggest visible change for you is that we renamed @ValidateExecutable into @ValidateOnExecution and we added a way to disable method validation entirely via the XML deployment descriptor.

We worked hard to make a stellar TCK. Let's speak numbers: the specification has 549 assertions including 492 testable. We cover 98,8% of them with 1500 tests. Good luck to all future Bean Validation 1.1 implementors :)

Everything is already available for you to use:

Enjoy!

Comments

Bean Validation 1.1 CR1 - Proposed Final Draft

by Emmanuel Bernard on 20 Feb 2013 release

Our Proposed Final Draft has been officially handed over to the JCP last night.

After a frantic month of work culminating with two weeks of monomaniac focus, we are finally handing over the Bean Validation 1.1 Proposed Final Draft to the JCP. Of course everything is open source so you can get it too:

What's new in Bean Validation 1.1?

The specification highlights very well the main features of this version but to summarize them:

  • work done entirely in the open
  • support for dependency injection and better integration with CDI
  • support for method and constructor validation
  • support for group conversion when cascading
  • support for EL based message interpolation

What's different between Beta 4 and CR 1?

We did a lot of polishing and nailed a lot of remaining corner cases. Here is a few of the tasks we worked on:

  • rework of the JavaDoc
  • move to @SupportValidationTarget on ConstraintValidator instead of the additional @CrossParameterConstraint on the constraint to mark a constraint as cross-parameter
  • many more examples in the specification
  • improve node creation logic when nodes are added programmatically
  • improve the creation logic of custom nodes when using the programmatic API of ConstraintViolationBuilder in a ConstraintValidator

And of course many hours rereading the specification to find holes and fix them.

Review

Hibernate Validator 5.0.0.CR1 and the TCK should be here any minute. Help us make this spec as good as possible by reviewing it and opening issues where it itches you.

You can access the specification here. All changes are marked with a different color. Green for additions, yellow for changes. This will help you see what has changed precisely.

Please send us your remarks and comments:

Many many thanks to my partners in crime Hardy and Gunnar that worked around the clock with me to deliver this proposed final draft right on time but with no compromise on quality.

Comments