[hibernate-dev] [BeanValidation] Naming adjustments for the Bootstrap API

Hardy Ferentschik hibernate at ferentschik.de
Fri Jan 16 09:09:47 EST 2009


On Thu, 15 Jan 2009 16:24:34 +0100, Emmanuel Bernard  
<emmanuel at hibernate.org> wrote:

>> I am still not
>> convinced that the whole API fis not overcomplicated
>
> Which step is too complicated and need simplification. Any example?

I just think there are too many levels of indirection. When I look at the  
example on how to get to a
ValidatorFactory all seems good, but I get regularly lost when I start  
browsing the code and click through classes like:

- ValidationProviderResolver
- GenericBuilderFactory
- SpecializedBuilderFactory
- ValidatorFactoryBuilder
- BootstrapState
- ValidatorFactory
- ValidatorBuilder

There seem to be two driving forces behind these interfaces/classes - type  
safety
and covering all possible scenarios. Personally, I think a cast can  
sometimes be easier to understand than
generics and maybe not all bases have to be covered.

One simplification could be the removal of ValidatorBuilder.

--Hardy






More information about the hibernate-dev mailing list