Monthly Archives: January 2009

Convention over Configuration in MSDN Magazine

The February ’09 edition of MSDN Magazine includes my latest article entitled “Convention over Configuration.”  Personally, I think this is an exciting topic and I really enjoyed writing on this subject.  I hope this article can help to spawn some … Continue reading 

Posted in Uncategorized | 15 Comments

Interception capabilities of StructureMap 2.5

Reposted from http://structuremap.sourceforge.net/Interception.htm.  I think this will be the last StructureMap post of the day for a while.    StructureMap 2.5+ added the ability to postprocess or even intercept and replace the objects being created.  While StructureMap will never include … Continue reading 

Posted in StructureMap | 3 Comments

Create your own Auto Registration Convention with StructureMap

In StructureMap 2.5 I added the ability to make “auto registration” policies that would enable StructureMap to just scan an assembly and figure out how to register types on its own. This is yet one more example of the new … Continue reading 

Posted in StructureMap | 11 Comments

Mentoring Other Developers

Last night I was finishing up an article on “Persistence Patterns,” and I was using a VB6/COM project I did years ago as a negative example (and not because it was VB6).  On that project, every time we needed to … Continue reading 

Posted in Uncategorized | 22 Comments

Conditional Object Construction in StructureMap (i.e. Fun with Lambdas)

What if you want StructureMap to return a different Type for users in one role versus user without that role?  What if you’d like to return one Type if the database is reachable and another Type if the database is … Continue reading 

Posted in StructureMap | 4 Comments

The recordings of the Virtual ALT.NET Meetings are online

Zack Young just posted the current list of VAN recordings here.   You can hear me stumble and bumble through my StructureMap Lessons Learned from Wednesday night.  I did a bit of my presentation from QCon San Francisco, and the … Continue reading 

Posted in StructureMap | Leave a comment

"BuildUp" Existing Objects with StructureMap

I know, you’re plrobably sick of me clogging the CodeBetter feed with this stuff, but I needed to post this just to answer a question on the StructureMap list.  A longstanding feature request is to be able to apply setter … Continue reading 

Posted in StructureMap | 11 Comments

Creating Policies for Setter Injection in StructureMap

One of my continuing goals for StructureMap is to reduce the amount of repetitive configuration code.  A recent trend in OSS .Net projects has been the usage of convention over configuration to eliminate tedious mapping and directive code.  I think … Continue reading 

Posted in StructureMap | 2 Comments

Don’t hide your light under a bushel

Yesterday I discovered a cool little addition to our localization subsystem that made some previous ugliness go away.  I’m thrilled that my coworker had a good idea and enacted it, but he didn’t tell the rest of us.  Anytime you … Continue reading 

Posted in Uncategorized | 3 Comments

Using the Build Session in StructureMap

Here’s your StructureMap Tip O’ the Day.  StructureMap 2.5+ introduces the “Build Session” that is a group of objects that give you access to information about the current object request.  In several spots you can query the BuildSession (IContext) to … Continue reading 

Posted in StructureMap | 1 Comment