StructureMap 2.5 is Released!

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.

About Jeremy Miller

Jeremy is the Chief Software Architect at Dovetail Software, the coolest ISV in Austin. Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy is the author of the open source StructureMap tool for Dependency Injection with .Net, StoryTeller for supercharged acceptance testing in .Net, and one of the principal developers behind FubuMVC. Jeremy's thoughts on all things software can be found at The Shade Tree Developer at http://codebetter.com/jeremymiller.
This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://realfiction.net Frank Quednau

    Topnotch, Dog’s bollocks, terrific!

    “Transparent creation of concrete types that are not explicitly registered”

    I just love that one. A very cheap way to decouple yourself from StructureMap is to have an ObjectResolver dependency. That one essentially contains an indexer that relays to GetNamedInstance. Cheap, cheap, cheap, but guud.

    Also, thank you SO much for having the instance name being part of a composite key of type + name. This also hits me as superb. And many more things I am only discovering. (The whining comes a bit later, you know that…)

    Haven’t used any of the type scanner though…with LINQ and a couple of extension methods (HasAttribute, ImplementsInterface…) it’s become so darned easy to wire up stuff based on a couple of conventions.

    Need to stop! Good job!

  • http://blogs.lessthandot.com chrissie1

    Thank you very much.

  • http://www.citizenparker.com Scott Parker

    Outstanding, congratulations and thanks Jeremy. If only all Open Source projects were so serious about their documentation.

    -Scott

  • http://kohari.org/ Nate Kohari

    Congrats Jeremy!

  • http://www.lostechies.com/blogs/rhouston Ray Houston

    Congrats!