How to use an IoC container with Sitecore CMS
We are going to use the Sitecore CMS in our new project. We'd like to use any Io开发者_StackOverflow中文版C container inside it. Is it possible? Does it require any configuration changes? Where can we find a good example?
Sure it's possible, and really has very little (if anything) to do with Sitecore itself. It therefore wouldn't require configuration changes. You can find good examples most anywhere, but I assume you've been around them yourself. Like the Inversion of Control pattern, for instance.
A fellow Sitecore professional blogged a bit about IoC specifically, here. http://mcore.wordpress.com/2009/05/27/agile-sitecore-design/
The one piece of advice I'd offer would be to check internally whether having IoC will make the project simpler? In very large projects where Sitecore is only a single component among many then it absolutely can but in most projects it will only add needless complexity. Same rule applies for various other techniques such as MVP architecture or code generated custom items.
精彩评论