Posts Tagged ‘StructureMap’

StructureMap: Registry usage (2010-1-6)

I recently read something like this on Twitter:
“It feels wrong to have registration and scanning in the Registry class”
(I’m not quite sure but I think it was from Jimmy Bogard)
I absolutely second that. One of the decisions in my current project (a composite smart client) was to separate these two things, in order to give [...]

Changes in StructureMap 2.5.4 (2010-1-5)

Interesting what some people do during the Christmas holidays. In the case of Jeremy D. Miller this was releasing a new version of StructureMap and working heavily on the Fubu MVC codebase.
Today I had the pleasure to migrate my current projects codebase (which previously used Unity and Unity.Interception) to the newest StructureMap version 2.5.4 and [...]

Cutting the fluff from Service registration (or how to do funky stuff with CoC, Castle.DynamicProxy & StructureMap) (2009-7-24)

The more I play around with Convention over Configuration in combination with StructureMap the more I’m amazed about what you can do with it and how much it reduces the amount of code you need in order to configure and wire stuff together. Today I implemented this convention for our current prototype:

Every class whose [...]

Diving into the StoryTeller trunk, Part 5: The EventAggregator (2009-7-20)

I’ve spend some time with the Pub / Sub topic on my own in the past. Although I still like my own implementation, even a year after I’ve originally written it (yes, rare but sometimes that happens), I really like how Jeremy implemented it. The EventAggregator in StoryTeller is one of those examples of how [...]

Diving into the StoryTeller trunk, Part 4: Registration of Generics (2009-7-17)

I really like the way StructureMap automates the container registration. Part 1 already showed a lot of the convention based container registration mechanism. Today I would like to touch an aspect of registration which doesn’t really fit under the term "convention over configuration", but is a really cool functionality non the less. For this post [...]

Diving into the StoryTeller trunk, Part 3: The INeedBuildUp convention (2009-7-15)

Another day in the trunk, another convention found.  After all startable instances have been started in the bootstrapping process, there is very similar looking convention which acts upon the INeedBuildUp interface, a marker interface. The code for it looks like this:

ObjectFactory.Model.PluginTypes
.Where(p => p.Implements<INeedBuildUp>())
.Select(x => x.To<INeedBuildUp>())
[...]

Diving into the StoryTeller trunk, Part 2: The IStartable convention (2009-7-14)

In the last post I talked a bit about how “Convention over Configuration” is applied to container registration in the StoryTeller trunk. Another neat convention which can be found in the bootstrapping process of StoryTeller is a convention around startable instances .
Each instance in the StoryTeller assemblies whose contract applies to StructureMaps default convention [...]

Diving into the StoryTeller trunk, Part 1: Convention based registration (2009-7-13)

Since I’ve read some bits about Rails I often wondered how “Convention over Configuration” (CoC) might look like in a .NET environment. StructureMap  was (AFAIK) the first IoC container in the .Net realm which provided functionality in order to combine conventions with dependency injection. It’s not surprising that StoryTeller relies a lot on StructureMap and [...]