At long last, I pushed a StructureMap 3.0 nuget to the public feed today nearly a full decade after its very first release on SourceForge as the very first production ready IoC container in .Net. I’d like to personally thank Frank Quednau for all his work on finally making StructureMap PCL compliant.
While this release don’t add a lot of new features, it’s a big step forward for usability and performance and I believe that StructureMap 3.0 will greatly improve the developer experience. Most importantly, I think the work we’ve done on the 3.0 release has fixed all of the egregious internal flaws that have bothered me for years and *I* feel very good about the shape of the code.
What’s Different and/or Improved?
- The diagnostics and exception messages are much more useful
- The registration DSL has been greatly streamlined with a hard focus on consistency throughout the API
- The core library is now PCL compliant and targets .Net 4.0. So far SM3 has been successfully tested on WP8
- I have removed strong naming from the public packages to make the world a better place. I’m perfectly open to creating a parallel signed version of the Nuget, but I’m holding out for a pull request on that one:)
- Nested container performance and functionality is vastly improved (100X performance in bigger applications!)
- Xml configuration and the ancient attribute based configuration has been removed.
- Interception has been completely rewritten with a much better mechanism for applying decorators (a big gripe of mine from 2.5+)
- Resolving large object graphs is faster
- The Profile support was completely rewritten and more effective now
- Child containers (think client specific or feature specific containers)
- Improvements in the usage of open generics registration for Jimmy Bogard
- Constructor function selection and lifecycle configuration can be done per Instance (like every other IoC container in the world except for SM❤.0😦 )
- Anything that touches ASP.Net HttpContext has been removed to a separate StructureMap.Web nuget.
- Conventional registration is more powerful now that the configuration model is streamlined and actually useful as a semantic model
Still to Come:
I’m still working on a new version of the StructureMap website (published with FubuDocs!), but it’s still a work in progress. Since I desperately want to reduce the time and effort I spend on supporting StructureMap, look for it soon-ish (for real this time).
Someday I’d like to get around to updating my old QCon ’08 talk about lessons learned from a long-lived codebase with all the additional lessons from the past 6 years.