As of, oh, whenever SourceForge ends up cooperating and uploading the file, StructureMap 2.5 is officially released! The binaries are available for download now at http://sourceforge.net/projects/structuremap. For the first time in quite a while, the binary release includes a new CHM file for all of the public facing API.
So, what does the release mean?
The documentation is unfortunately not complete, but I wanted to make the release now as effectively putting a stake in the ground and saying "from this moment on, I commit to maintaining *this* public interface and all changes from here on out will be backwards compatible with the 2.5 release." I’m working diligently on the documentation. You can browse the documentation work in progress here. In the meantime, please ask any StructureMap questions in the google group for StructureMap.
To be upfront, I’ve treated the 2.5 release as my Python 3000 release, meaning that I’ve taken every opportunity to clean up the API and blow away some unfortunate trash in the code. This release marks nearly a fullblown re-architecting of the StructureMap internals, and that new architecture has largely been responsible for the explosion in functionality in this release. All of this does mean that some existing API’s introduced in 2.0 for the Registry DSL are already gone. I’ve learned a lot about writing internal DSL’s with C# in the meantime. That learning, combined with all the new language goodies in .Net 3.5, have led to a somewhat different Registry DSL, but one that I hope will be easier to read and more discoverable once you stop yelling at me for changing it
Unfortunately, this release has taken so long that Jimmy Bogard openly mocks it as the “Duke Nukem Forever” release. I saw the news the other day about Guns & Roses finally releasing Chinese Democracy, and I knew that I *had* to get this thing out.
If you happen to be at QCon San Francisco in November, come to my talk and you’ll hear all about the 5 years of hard lessons I’ve learned from doing and redoing StructureMap. If you’re at KaizenConf this week, go to Chad Myer’s talk and you’ll hear quite a bit from the internal DSL angle.
The new functionality in StructureMap 2.5:
- Completely revamped Assembly scanning options
- Cleaner, more predictable way to initialize a Container. StructureMapConfiguration is now deprecated, please use ObjectFactory.Initialize().
- Optional setter injection
- All new abilities to query the configuration of a Container
- The ability to use StructureMap with ZERO Xml or attributes by default
- The ability to add services at runtime. You can now programmatically add an entire Assembly at runtime for modular applications that might not want all services to be loaded at startup.
- An auto mocking container based on Rhino Mocks 3.5. I was a doubter on the validity of AMC, but I’m sold now that I’ve used it
- Contextual object construction
- More sophisticated auto wiring rules
- Supporting NameValueCollection and IDictionary types
- Far more extensibility
- Interception and post processing hooks for you AOP enthusiasts. StructureMap will NOT include its own AOP engine, but will allow you to use the runtime AOP technique of your choice.
- More configuration options in both Xml and the Fluent Interface. Completely revamped the Registry DSL.
- More options for modular configuration (mix and match Xml configuration or Registry’s at will) — which basically had to trigger:
- Completely revamped diagnostics, including the Environment Testing support
- Transparent creation of concrete types that are not explicitly registered
- Create objects with explicit arguments passed to the container
- Use the underlying Container independently of ObjectFactory
- Pluggable auto registration with your own custom Type scanning policies
- StructureMap is now strong named (thanks to Steve Harman)
- Pull configuration from the App.config (thanks to Josh Flanagan)
- Generics fixes (thanks to Derrick Rapp)
Anyway, I’ve got some documentation to go write. Watch the blog for a lot more content on StructureMap usage. We’ve added some other functionality at work that hasn’t gotten into the trunk, but I’m putting the kibosh on new code until the documentation and website is completely overhauled.