--- Paul Benedict <[EMAIL PROTECTED]> wrote: > Bob, > > I see some interesting similarities to other > projects. Tapestry has an > @Inject annotation, and Spring has a @Required > annotation. I guess my > question is why would someone prefer Guice support > over Spring? I read > the "Why Guice?" section, but I didn't see this > question.
I would ask why to prefer guice over pico/nanocontainer instead ;) IMHO, Annotations are cool and sexy, but they are not usefull in this context as they are bound to compile time. My typical usage pattern for dependency injection is: I have some generic tools / frameworks which I like to integrate in a webapp (for example, user management, security and menu system: http://www.sourceforge.net/projects/jtec) And some of those tools need ( say ) hibernate session. But I have more than one hibernate session in my web application. If my wiring is configured via annotations ( compile time ) I'm lost - I have to recompile my rfamworks just to be used in some project. Thats where externalized configuration rules. ( and pico contaienr supports not only xml , but also groovy and other scriupting configuration ) regards, ----[ Konstantin Pribluda http://www.pribluda.de ]---------------- Still using XDoclet 1.x? XDoclet 2 is released and of production quality. check it out: http://xdoclet.codehaus.org ____________________________________________________________________________________ Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]