This is just a quick update of an older post of mine. Since StructureMap’s convention API has changed quite a bit, here is the updated version of the code used in the post using the new APIs introduced in StructureMap 2.5.4.
The new code is actually easier. It should look something like this . . . [...]
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 [...]
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 [...]
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 [...]
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 [...]
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 [...]
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>())
[...]
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 [...]
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 [...]