StructureMap 2.5.1 is Released

I just uploaded a new incremental release of StructureMap with a bunch of bugfixes and a few new features.  Download it here.

From the release notes:

* Fixed issue with With<T>(object).GetInstance<U>() functionality.  This is now much more robust.
* Bug fix for Hybrid scoping
* TryGetInstance() and TryGetNamedInstance(). 
* Ignore setter emitting for indexer properties — fixed a bug reported on the forum
* Multithreading lock problem fixed by Josh
* Patch for session lifetime.  There is now an option for “CacheBy(InstanceScope.HttpSession)”
* Fixed Public IDictionary setter injection in xml : http://groups.google.com/group/structuremap-users/browse_thread/thread/21265544d73cd395?hl=en
* Pete Johnson’s fix for ObjectFactory.Configure() setting policy.  You can now set the scoping/lifecycle of a PluginType from Configure()
* EjectAllInstances<T>() clears out Singleton objects now (and calls Dispose() if appropriate)
* Josh has added an experimental debugger visualizer for StructureMap Container’s

* The AutoMocker isn’t as whiny about RhinoMocks versions.  There is also an AutoMocker strategy for Moq now as well 

* A minor performance enhancement that stops StructureMap from doing a scan of all types on the StructureMap assembly itself.

 

Please send all questions to the StructureMap Google list.

 

The Future

I’m hoping to complete the new StructureMap website and documentation over the holidays, and that’s the next priority.  After that, I’d like to get a new 2.6 release out in the early quarter of ’09.  Here’s what I’m thinking about in no particular order:

  1. A Silverlight ready version (i.e. a cutdown StructureMap)
  2. Finish the Mono support.  It’s very close, but I want to make sure
  3. The *#%$ “BuildUp” functionality that allows you to do setter injection on an object that’s created somewhere else.  Thank you ASP.Net.
  4. Convention based setter injection (low hanging fruit)
  5. A guarantee that StructureMap will function in partially trusted environments, or at least real guidance on what it can and cannot do
  6. “Missing Instance” handlers
  7. A “ConditionalInstance” that will give you easier ways to do conditional construction
  8. Improved diagnostics.  The error output and the output from StructureMapDoctor and ObjectFactory.AssertConfigurationIsValid() could be a lot better

Now’s a good time to ask for things.

 

Ok, that’s it for me this year.  Merry Christmas and Happy Holidays, and I’ll see you in January.

 

 

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 StructureMap. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://www.brianlow.com Brian

    Suggestion for the StructureMap website: an ultra short example on the home page to demonstrate what StructureMap is.

  • http://codebetter.com/blogs/jeremy.miller Jeremy D. Miller

    @Kelly,

    You don’t need “BuildUp” for WinForms or WPF. Use the more “Presenter First” approach and have the View injected into the Presenter, and the Shell injected into the ApplicationController. It’s not the normal Microsoft way, but it works out well in practice.

    I’ll blog on that in January. I’ve already got something queued up that might address that.

  • http://blog.kellybrownsberger.com Kelly Brownsberger

    It’s fine to throw hate at ASP.NET for creating a need for BuildUp, but I would say the WinForms designer is another real-world scenario where BuildUp is a must. I most definitely hate the WinForms designer, but I hate the work involved in avoiding it even more. If someone’s got a better way, I’d love to hear about it. I’ve found the least-friction approach is to have pure ctor based DI at the outer levels of the UI classes, but use setter based injection on designer constructed instances on inner controls. Having a container that can do this for me, is one less thing I have to worry about.

    Yes, it feels a little ugly, but there’s are too many real-world scenarios where this just makes a lot of pragmatic sense.

  • Karsten

    Merry Christmas to you too, and thanks for StructureMap :-)

  • http://codebetter.com/blogs/jeremy.miller Jeremy D. Miller

    @Jeff,

    Okay, I just promised that to about 2 people, so Prism Bootstrapper it is.

    …but for Jan. 5th

  • http://www.agilification.com Jeff Doolittle

    PRISM bootstrapper for StructureMap (preferably with no dependencies on WPF). That’s what *I* want for Christmas.

  • http://codebetter.com/blogs/jeremy.miller Jeremy D. Miller

    Fixed in SourceForge. Please try again.

  • http://www.rasmuskl.dk Rasmus Kromann-Larsen

    The download listing for 2.5.1 seems empty for me?

    I can only seem to download 2.5.

  • Pete Johanson

    On the issue of Mono support, one of the bugs with *compiling* StructureMap on Mono (on linux here) was fixed sometime since the 2.0.1 release (see https://bugzilla.novell.com/show_bug.cgi?id=434835). Using the 2.2 preview release here, I’m at least able to compile StructureMap.dll inside of MonoDevelop (SVN trunk MD).

    However, trying to compile StructureMap.AutoMocking complains about the assembly version used for the “friend assembly” to allow StructureMap.Automocking to gain access to the one ObjectFactory.ReplaceManager method. Don’t really have time to dig further, but it’s coming along at least. No idea how well the unit tests fair running on Mono though.

    If you need any help with testing, etc the Mono stuff, please let me know, I will be happy to help.