Jeremy D. Miller -- The Shade Tree Developer

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
StructureMap 2.5.2 is Released

I just released StructureMap 2.5.2 on SourceForge.  You can download it here.  This release contains some new features:

  1. The IContainer is always injected into the Container itself.  This means that you can expect a constructor argument of type “IContainer” to be filled with the current Container.  This does work with ObjectFactory
  2. “Missing Instance” handler.  If you ask for an Instance by name that does not exist, Missing Instance gets a chance to handle the request
  3. Conditional Construction – I’ve gotten a lot of questions about “I want to do this if the user has this role, and this if he doesn’t” type of scenarios.  The Conditional Instance feature bakes this into StructureMap out of the box
  4. Convention based Setter Injection Policies.  Specify rules like “I want all public setter properties where the PropertyType is in this namespace to be injected by StructureMap”
  5. New functionality in IContext / BuildSession (TryGetInstance<T>() and GetInstance<T>(name))
  6. The BuildUp() functionality to inject dependencies through public setters of an existing object for usage in ASP.Net WebForms and other environments that do not allow you to control object creation
  7. Convenience methods for requesting open generic types
  8. Minor improvements to the Assembly Scanning.  Easier ways to create auto registration policies.
  9. Interception techniques can now use the IContext during construction

There is one breaking change, the InstanceInterceptor interface was changed to include an IContext argument to its Process() method:

 

    public interface InstanceInterceptor

    {

        object Process(object target, IContext context);

    }

 

I’ll be blogging examples of the new features in the next week.  Starting on Monday, there will be at least one new StructureMap tip posted every day until the end of January.

 

 

What’s Next?

I didn’t get everything into this release that I wanted to, and I’m behind in some promises.  I start the next (2.5.3) release tomorrow night.  In order of priority, the upcoming release(es) will contain:

  • Prism Bootstrapper (2.5.3)
  • Improved Diagnostic Messages
  • A Reference Common Service Locator
  • Samples, Samples, Samples!
  • Silverlight Version
  • Medium Trust Enhancements
  • Compact Framework Version

I’m hoping to get the Prism Bootstrapper out this week, and the rest by the end of January. 

 

Where Has it Been?

Mostly out of self reflection, I thought I’d throw together a timeline for StructureMap.

  1. Summer ‘02 – I was a non-coding architect with no .Net or J2EE delivery experience, and I was scared.  I plotted a plan to build the world’s greatest ORM in order to build up some credibility to find another job where I could code.  I explained it to my then wife and she named it “StructureMap.”  The name made a lot more sense back then ;)
  2. Christmas ‘02 – StructureMap coding begins
  3. Summer ‘03 – I was traveling for ThoughtWorks and away from the family a lot.  At nights I was working on the configuration subsystem for my grand vision.  I ran out of energy and mothballed it.
  4. January ‘04 – I started reading about PicoContainer in the Java world and thought to myself, “that configuration subsystem code could be morphed into this IoC/DI tool thingie.”
  5. Early Spring ‘04 – What became StructureMap quickly took shape at nights and on the plane trips back and forth between Chicago O’Hare and Austin.
  6. June 9, 2004 – Version 0.80 was released on SourceForge.  StructureMap had been used in a production system shortly before the OSS release. Xml in, objects out.  You could use attributes out the wazoo too.
  7. Jan 15, 2005 – Version 0.90 was released.  Fancier ways to take Xml in, and spit out objects.  I added setter injection for the first time.  My first attempt at improved diagnostics.
  8. May 5, 2006 – Version 1.0 was released.  Crazy ways to take Xml in, and spit out objects.  More diagnostic tools and some NAnt tasks that have since been quietly excised
  9. April 2, 2007 – Version 2.0 was released.  The first version of what is now the Registry DSL.  I cut my teeth on Fluent Interfaces on this release.  Supported open generics for the first time.
  10. Fall ‘07 through Fall ‘08 – StructureMap was effectively gutted and largely re-architected.  It hurt, but I learned a lot and the architecture is vastly easier to extend now. 
  11. June 23, 2008 – Version 2.4.9 was released as a compromise
  12. Summer ‘08 – Jimmy Bogard openly mocks me at every turn by calling the forthcoming 2.5 release the “Duke Nukem Forever” release
  13. Oct 27, 2008 – StructureMap 2.5 follows closely on the heals of “Chinese Democracy.”  I describe 2.5 as the “Python 3000” release
  14. Dec 12, 2008 – Version 2.5.1 is released as a bit of a Merry Christmas present with some bug fixes that built up from the 2.5 release
  15. Jan 11, 2008 – Version 2.5.2 is released with some new functionality that builds on the 2.5 architecture.

Posted 01-11-2009 11:37 PM by Jeremy D. Miller

[Advertisement]

Comments

scott wrote re: StructureMap 2.5.2 is Released
on 01-12-2009 2:06 AM

Impressive. Not SM (well, that too) but the tenacity. I knew the path colloquially just from knowing you, but seeing it laid out there like that with dates and all really nails down the weight of the project and just how much of yourself you've given to the community. You will never have to buy your own beer when I'm around ;)

DotNetKicks.com wrote StructureMap 2.5.2 is Released
on 01-12-2009 3:21 AM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Daniel Lidström wrote re: StructureMap 2.5.2 is Released
on 01-12-2009 3:59 AM

I want to thank you for wanting to support Compact Framework. There's not a lot to choose from when targeting CF. I am definitely looking forward to StructureMap CF! :-)

Derik Whittaker wrote re: StructureMap 2.5.2 is Released
on 01-12-2009 6:16 AM

Congrats man, nice work

Stu Campbell wrote re: StructureMap 2.5.2 is Released
on 01-12-2009 6:21 AM

Jeremy, thanks for all your hard work and being so responsive on the mailing list. I'm still an SM noob but really liking it so far.

Arkadiusz Waśniewski wrote re: StructureMap 2.5.2 is Released
on 01-12-2009 7:55 AM

.NET Compact Framework. Hm... I think it will be very hard to get really good performance especially using reflection. But I hope You will... :-)

Dew Drop - January 12, 2009 | Alvin Ashcraft's Morning Dew wrote Dew Drop - January 12, 2009 | Alvin Ashcraft's Morning Dew
on 01-12-2009 11:23 AM

Pingback from  Dew Drop - January 12, 2009 | Alvin Ashcraft's Morning Dew

Eric Lee wrote re: StructureMap 2.5.2 is Released
on 01-12-2009 1:33 PM

Thanks for all your work on this.  I'm using StructureMap on a real project for the first time and wow, IoC containers are awesome!  They get rid of SO MUCH pain!

Claudio Lassala wrote re: StructureMap 2.5.2 is Released
on 01-12-2009 2:07 PM

Looking forward for the Prism bootstrapper!

jam wrote re: StructureMap 2.5.2 is Released
on 01-12-2009 3:28 PM

Thanks for all your hard work. I am beginning to learn more about all the best practices for architecture, IoC, loose coupling, high cohesion, SOC etc. and it has been made fun and easy to learn these because of people like you who come up with great tools and framework like structure map to make the experience of learning and applying these principles to working projects. And more importantly share it with the community. Great work.

Just a small suggested correction for  the "Where Has it Been?" section for point 15. The year should be 2009 instead of Jan 11, 2008 :). Just pointing out as looking at the chronological evolution of the Structure Map is an inspiration to do something good for others.

Reflective Perspective - Chris Alcock » The Morning Brew #263 wrote Reflective Perspective - Chris Alcock &raquo; The Morning Brew #263
on 01-13-2009 1:54 AM

Pingback from  Reflective Perspective - Chris Alcock  &raquo; The Morning Brew #263

Chris Marisic wrote re: StructureMap 2.5.2 is Released
on 01-14-2009 10:32 AM

Jeremy,

I'm not familiar with Prism / what a bootstrapper would do for it, could you give me a link point me  in the right direction on this?

Good frameworks for IOC and Validation | Just Programmer wrote Good frameworks for IOC and Validation | Just Programmer
on 01-15-2009 2:49 AM

Pingback from  Good frameworks for IOC and Validation | Just Programmer

Glenn Block wrote re: StructureMap 2.5.2 is Released
on 01-15-2009 3:46 AM

Nice job Jeremy! I really need to play with SM one of these days. Next time we see each other let's pair 1 hr  on MEF, 1 hr on SM. :-)

BTW, I like the new injecting the container in the container featuree ;-)

Cross Site Scripting » Blog Archive » Structuremap 2.5.2 is Released - Jeremy D. Miller — the Shade … wrote Cross Site Scripting &raquo; Blog Archive &raquo; Structuremap 2.5.2 is Released - Jeremy D. Miller &#8212; the Shade &#8230;
on 01-18-2009 4:15 AM

Pingback from  Cross Site Scripting  &raquo; Blog Archive   &raquo; Structuremap 2.5.2 is Released - Jeremy D. Miller &#8212; the Shade &#8230;

Add a Comment

(required)  
(optional)
(required)  
Remember Me?