Thiago H. de Paula Figueiredo schrieb:
Em Sat, 19 Dec 2009 17:56:57 -0200, Sebastian Hennebrueder
<[email protected]> escreveu:
Though, I miss some features in the Tapestry's container which I like
in Google Guice,
Which ones? Maybe we can add them to Tapestry-IoC.
I like the approach to add AOP to classes.
The following code filters all classes and adds the interceptor to all
methods annotated with the @Transactional annotation.
binder.bindInterceptor(Matchers.any(), Matchers
.annotatedWith(Transactional.class),
methodInterceptor);
I mentioned a couple of weeks ago that I miss the option to get grap of
the implementation. Currently you get only the interface and need to put
annotations there.
I am not sure if it is a viable solution to make the container
interchangeable. May be we could improve the integration with other
containers by letting them instantiating Service and Page classes and
post processing the classes with Tapestry.
Regarding services, that's exactly what the Spring integration does.
I see no reason why let other IoC framework to instantiate *page*
classes. I guess it is inviable, as Tapestry doesn't do post processing
them, it adds code to it then instantiate.
You are correct here.
I only agree that it would be nice to support JSR 303 (Validation
framework). This is not becauce it is standardized. I believe that it
is totally nonsense to standardize a couple of validations.
Why? Some of them are very common (@NotNull, @Length, @Size, etc), and
you can add your own validations. You do not need to use just the ones
provided out-of-the-box.
Because it is just to simple. I don't think that there is a need to
standardize every couple of lines.
The reason is that JPA and Hibernate uses those validations and as a
matter of fact 95 % (my guess) of all persistence layers are written
with those technologies.
JSR 299 is based on Hibernate Validator, a project that was created
after Hibernate and its support is based on some generic Hibernate
hooks. JPA supports them as ordinary event listeners. Hibernate and JPA
weren't written using any validation framework.
Hibernate Validator 4 is the reference implementation for JSR 299. Of
course you are right, that it is not a part of Hibernate or JPA but just
a module which can be integrated.
--
Best Regards / Viele Grüße
Sebastian Hennebrueder
-----
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]