tag:blogger.com,1999:blog-5479191305093780981.post7795918376736699993..comments2022-02-28T11:35:44.077-08:00Comments on Lex Spoon: Why not inject dependencies "manually"?Lex Spoonhttp://www.blogger.com/profile/13859632965228608649noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5479191305093780981.post-63279526087174022492009-06-12T23:50:43.257-07:002009-06-12T23:50:43.257-07:00There's a good video from Google IO where they...There's a good video from Google IO where they go over Guice.<br /><br />http://code.google.com/events/io/sessions/BigModularJavaGuice.html<br /><br />They also show that the factory code is what you shouldn't have in your code.<br /><br />And thanks for all the good work on Scala. Maybe we can get a GWT Scala compiler???? :)Blair Zajachttps://www.blogger.com/profile/02164317781365600148noreply@blogger.comtag:blogger.com,1999:blog-5479191305093780981.post-65304186863236380122009-02-09T07:57:00.000-08:002009-02-09T07:57:00.000-08:00Robert, I agree, but the "Traditional Java Way" th...Robert, I agree, but the "Traditional Java Way" that is shown is a straw man. Just above that example there is discussion on how to do better. If you compare against crummy code, then anything looks like an improvement.<BR/><BR/>Rafael, methods and object encapsulation also solve recursive dependencies. They are powerful tools of abstraction, but you have to think to use them.Lex Spoonhttps://www.blogger.com/profile/13859632965228608649noreply@blogger.comtag:blogger.com,1999:blog-5479191305093780981.post-67022282919262254872009-02-06T17:17:00.000-08:002009-02-06T17:17:00.000-08:00One advantage of dependency injection frameworks i...One advantage of dependency injection frameworks is that they resolve recursive dependencies, so you won't have to.Anonymoushttps://www.blogger.com/profile/03350776762967743057noreply@blogger.comtag:blogger.com,1999:blog-5479191305093780981.post-75995713387572731632009-02-06T11:58:00.000-08:002009-02-06T11:58:00.000-08:00While I haven't looked at the Guice docs in a whil...While I haven't looked at the Guice docs in a while, I suspect you missed the point of the factory examples... They aren't demonstrating the "Guice" way, they are showing the "Traditional Java Way" people would have done service providers.<BR/><BR/>The point of Guice or any dependency injector is to keep you from having to write 200 factories in your application. Not to make them easier to work with :)Robert "kebernet" Cooperhttps://www.blogger.com/profile/03336622901079453553noreply@blogger.com