On a quest for the silver bullet..

» Currently browsing: Bits and bytes


Reflection and performance

Number of Comments » 3

The open source framework Glue that I’ve created, use a lot of reflection to invoke members on objects. This has sparked my interest in exploring the use of reflection in respect to performance. A colleague of mine, Åsmund Eldhuset, and I set aside an evening for a geeknight to get to the bottom of this, [...]

How I use the Glue mapping framework

Number of Comments » 3

Glue is a general purpose, bidirectional automatic mapping framework for the .Net platform, with strong verification and testing tools.
I’m actively developing it. I’m also actively using it. In this post I’ll share my experience as a user of Glue, and how easy it is to set up the mappings using TDD.
The example
We want to create [...]

Glue – the new mapping framework

Number of Comments » 6

I’ve spent this summer implementing a new mapping framework for the .Net plattform: Glue.
You’ll find examples and code here: http://glue.codeplex.com
Glue is a general purpose, bidirectional automatic mapping for the .Net platform, with strong verification and testing tools.
I’ve seen quite a lot of less than optimal handling of mapping issues in quite a few projects over [...]

ASP.NET MVC: DefaultControllerFactory is not thread safe!

Number of Comments » 1

I am not sure if this is a bug or a “feature” of the ASP.NET MVC framework. Either way, this is something you should be aware of as it can cause some very hard to track concurrency issues which might leak information between your HttpRequests.
In my last project we used the ASP.NET MVC framework along [...]

ASP.NET MVC: Let StructureMap create your controllers

Number of Comments » 4

For those of you already familiar with StructureMap and want to use it to configure your objects in ASP.NET MVC, read on.
The ASP.NET MVC framework has a default controller factory (DefaultControllerFactory) that requires all controllers to have a parameterless constructor. So, if you want to inject your dependencies to the constructor, you can’t do it. [...]

Interviewing Clemens Vasters

Number of Comments » 0

In december Lars Wilhelmsen and I made an interview with Clemens Vasters. We talk about different topics around the new Azure and Cloud technologies from Microsoft. Clemens Vasters works as a Program Manager in the .NET Online Services team and is responsible for the ‘Service Bus’ feature area of Microsoft’s upcoming Cloud Platform.
Børge Hansen from [...]

Creating a dynamic xml reader with C# 4.0

Number of Comments » 3

“The static type dynamic” was the catchphrase at PDC’08 when talking about what’s new in C# 4.0. The dynamic type seems to be introduced mainly to simplify the code you write when doing Com interop. But many also see this as a step towards the dynamic languages for C#. I like C#. I also like [...]

Boo AstMacros explained

Number of Comments » 3

In this post I am going to explain how you write your own macros in Boo. Writing macros is a powerful way to use the compiler extensibility built into Boo. Macros in Boo actually let you create your own keywords which are resolved at compile time.
Before you read on, these posts might be useful to [...]

Boo AstAttributes explained

Number of Comments » 4

Writing extensions for Boo is a very powerful thing. In this post I’m going to explain how to write AstAttributes in Boo. These attributes are much more than normal .net attributes. They are one of the ways you can extend the Boo language.
Before you read on, these posts might be useful to read:

Boo Getting Started
Boo [...]

Boo: Getting started

Number of Comments » 3

Want to look into Boo? Let me give you a quick guide to getting the tools you need.
Development environment
For the time being I recommend you do your coding in Sharpdevelop. Download and install the latest here. You should also download the latest Boo-distro (the binaries), and move (and overwrite) the Boo-files into The sharpdevelop [...]