I’ve been experimenting with ASP.NET MVC and StructureMap (an IOC container), and the integration has been quite smooth. For guidance on combining StructureMap with ASP.NET MVC, check out Elija Manor’s blog post. Be cautious of the favicon issue.
I’m also using NHibernate and Fluent NHibernate for a cleaner configuration compared to XML. If you need to set specific properties in Fluent NHibernate, this Stack Overflow thread provides a helpful example. Additionally, the TekPub NHibernate series and Kona project examples are great resources.
Now, onto the topic of TDD. While I appreciate TDD as my preferred coding method, I’m grappling with its application at a higher level. For example, how do I decide when to introduce a repository or an IOC container, and should I TDD the IOC code?
I’ve sought advice from the Swedish ALT.NET group and found that BDD and the concept of a Walking Skeleton might offer solutions. BDD helps address broader design concerns, while TDD focuses on lower-level details.
My current approach is to start with a simple design (MVC + repositories + IOC), establish a basic functional/integration test to verify core functionality, and then use TDD to refine and enhance the design. This way, you build a functional skeleton that can be fleshed out with TDD as development progresses.