Dezember 2007 - Einträge

So, how expensive is it to let Castle Windsor / Spring.NET make my object?

Lately I was getting increasingly curious about the overhead of using a Dependency Injection-container to provide me with instances of my objects. With overhead I mean if and how much longer it takes for the DI container to provide me with the desired instance.

Indeed, this is not an overly interesting number. After all, how often do you instantiate an object in your Application's lifecycle and even if you do it very often, how does it compare to other activities of your Software like doing a Database Query?

read more

Applying Attributes to method parameters

Hopefully everybody who reads this knows more or less what Attributes are in terms of .NET/C# programming. While I was scanning the documentation for that interesting Monorail project (btw, if you ever played with RoR you probably feel right at home), I noticed that you can also apply attributes to method parameters. In the following I develop a small example as to how you can make use of such a feat. First let's get the mockery behind us...

read more