This post originated from an RSS feed registered with .NET Buzz
by Udi Dahan.
Original Post: IOC, TDD, and design
Feed Title: Udi Dahan - The Software Simplist
Feed URL: http://feeds.feedburner.com/UdiDahan-TheSoftwareSimplist
Feed Description: I am a software simplist. I make this beast of architecting, analysing, designing, developing, testing, managing, deploying software systems simple.
This blog is about how I do it.
Before tackling another aspect of IOC in .Net, I think it necessary to reiterate a point oft raised in TDD circles: If it's hard to test, you should probably take another look at your design. I think that we have maybe let the "design pendulum" swing to far as a part of the methodology shift XP, and the other agile methods, have brought. Although TDD does guide us to let the design float up out of the code while we are iterating, I feel that we do not have to forget all we have learned about good design over the years. We can save quite a bit of time by aiming closer to the target. There are also certain "practices" that help; preferring instances to statics is one, separating interface from implementation is another. Finally, touching back on the IOC point - I think that taking the step to using dependency injection, with or without frameworks, will help us get to better designs faster. I believe it to be a necessary step that should not be skipped. However, to believe that the design continuum ends at IOC is to ignore history - something better always comes along, eventually (usually because the problems we deal with change so that yesterday's solutions don't quite cut it anymore)....