9. Highly coupled code is a step to spaghetti code 8 Can’t intercept and change code; Can’t unit-test in isolation; Conceptual problems in modules design; Logic is spread across many parts.
10. Divide et impera 9 DI’s base is Interface Oriented Programming. Write your code against abstractions rather then concrete implementations.
40. Pros? 25 Simplified component architecture; Easier to maintain; Replace; Reuse; Build in parallel; Easier to unit-test.
41. Cons? 26 Have to learn something new? Lower performance?(it depends) It might be hard to fix lifetime errors.
42. Should I use it? 27 Do you know OOP and design patterns? Do you write unit-tests? Do you use statically typed languages? First learn it. Don’t force a team that doesn’t see DI pros to use it.
44. Materials 30 M. Seemann. Dependency Injection in .Net - Manning Publications Co., 2010. R. Osherove. The art of Unit Testing - Manning Publications Co., 2009, ISBN: 978-933988-27-6. J. Miller. Cohesion And Coupling – MSDN Magazine, Oct. 2008. http://msdn.microsoft.com/en-us/magazine/cc947917.aspx F. Maulo. GuyWire. http://fabiomaulo.blogspot.com/2009/11/guywire.html K. Kozmic. How I use Inversion of Control containers. http://kozmic.pl/archive/2010/06/20/how-i-use-inversion-of-control-containers.aspx