Dennis Byrne schrieb:
XML configuration files do quite well their job and were designed to avoid
coupling parametrization stuff in code. Now it seems we return to the point
were we started. It seems more a response to .NET than real desirable
functionality, as we already had it with external configuration files.

I have to agree w/ this 100%, XML still rocks.  After doing my latest project 
w/ EJB3 annotations, I don't see much added value.

But the truth is, annotations are very sexy right now.  This project isn't 
lacking in users, but I think this would generate a lot more interest in 
MyFaces.

Actually this is getting off topic. But I see annotations
as a huge improvement over central configuration in certain situations.
As someone mentioned it is first of all a good place to have
configurations if it has to change with your code on the fly.
Secondly it cuts down severely on artefacts because annotations work on introspection, which most xml based configurations dont.

So you end up with two annotations per class, within the code instead of a 20-30 line extra xml artefact. Perfect example is for instance the @WebMethode or the @Transactional annotation

There are scenarios where a central configuration in xml makes perfect sense. For application singletons for instance, or db connection configuration.

But this is totally off topic for now.

Reply via email to