Agreed. Dependency Injection it of a huge benefit. I didn't appreciate it until I joined a project that had 16 different vertical markets all built on the same core but each with different requirements from the users. Being able to pick and choose objects and inject them into a class so it could work with the right object has been immensely useful.
2011/12/20 Cédric Beust ♔ <[email protected]> > > On Tue, Dec 20, 2011 at 1:27 PM, Casper Bang <[email protected]>wrote: > >> Yup, I have yet to see a problem that could not be solved without AOP. Of >> course these fads are common within this business, i.e. after AOP came DI, >> which is another great example of a solution looking for a problem, making >> it hard to reason about code in an IDE. > > > I agree with the skepticism about AOP but strongly disagree about DI. > > However, the main benefit I get from DI on the (big) code base I work on > these days comes from an often overlooked benefit of Guice: being able to > add a field to some dependency in one line instead of having to pass it all > the way down from main(). > > I can't imagine the nightmare that our method signatures would look like > without DI. > > -- > Cédric > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > -- Robert Casto www.robertcasto.com www.sellerstoolbox.com -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
