--- Bob Lee <[EMAIL PROTECTED]> wrote: > On 2/26/07, Konstantin Priblouda > <[EMAIL PROTECTED]> wrote: > > > > > My point still holds true--Pico requires more > code > > > than Guice. > > > > Structly speaking using pico in a webapp requires > no > > code at all (except of course container > configuration > > in xml or whatever else) > > > Ummmm, strictly speaking, that's still code. ;)
Strictly speaking yes. But it is externalized and does not impose anything on used classes. > What is with third party libraries, which do not > know > > anything about guice? > > > > You can write a custom Provider as I illustrated > above. Even more code which has to be repeated again and again . Or subproject proliferation... > If I understood you correctly, in guice there will > be > > need to write some adapter / factory. Who got more > > code? > I'm pretty sure Pico is still more verbose. If you > explain what your example > is doing a little better, I'll be happy to > illustrate. Well, it is just providing configured hibernate session and its lifecycle - basically open session in view So it registers configuration + session factory in application scope, and session & lifecycle controller in request. > What if I like to use another session impl in the > same > > container? > Use an annotation. And if I need to register the sme class more than once? Yet another annotation? And another one? > You can override the scope in the configuration. You > can also implement your > own scopes and scope annotations. The users' guide > explains this. And those scope annotations will leak into my original code. ( And I prefer my classes to be innocent, and not knowing that it is managed by Guice or pico or whatever else. Such dependency invalidates whole point of DI / IoC ) 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 ____________________________________________________________________________________ Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. http://voice.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]