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

2009-01-16 Thread Hardy Ferentschik
On Thu, 15 Jan 2009 16:24:34 +0100, Emmanuel Bernard  
 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



___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


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

2009-01-16 Thread Emmanuel Bernard
But you never see these classes unless you implement the spec. And if  
you implement the spec, I don't care how hard it is for you.


ValidatorBuilder is an essential feature used by JPA and JSF so that's  
a no go.


On  Jan 16, 2009, at 09:09, Hardy Ferentschik wrote:

On Thu, 15 Jan 2009 16:24:34 +0100, Emmanuel Bernard > 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





___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev