Monthly Archives: December 2009

AutoMapper DSL design post-mortem

As I move towards the 1.0 release of AutoMapper, I’m already running in to things I wish I had done differently.  I still will probably fix all of these eventually, but none of these design issues should prevent a release, … Continue reading 

Posted in AutoMapper | 5 Comments

Advanced StructureMap: connecting implementations to open generic types

One pattern we’re starting to see more and more is the idea of connecting messages to handlers.  These messages might be domain command messages, ActionResult messages, and more.  Beyond messaging implementations, we start to see a more basic pattern start … Continue reading 

Posted in StructureMap | 13 Comments

Enabling IoC in ASP.NET ActionResults (or, a better ActionResult)

One of the more interesting abstractions in ASP.NET MVC is the concept of an action result.  Instead of calling a method to direct the result of calling an action, such as frameworks like Rails allows: def create @book =[:book]) … Continue reading 

Posted in ASPNETMVC | 11 Comments

InfoQ interview on ASP.NET MVC in Action up

Last week, Jeffrey, Ben and I were interviewed by Jon Arild Tørresdal at InfoQ to talk about our recent book ASP.NET MVC in Action.  I’ve always loved the InfoQ interviews (as well as their articles), as they asked us really … Continue reading 

Posted in ASP.NET MVC in Action | Leave a comment

Organizing ASP.NET MVC solutions

Recently, a question came up on Twitter around your favorite project structure/solution organizing for ASP.NET MVC projects.  I’ve toyed around with quite a few different strategies for structuring projects, and I’m currently settled around one that gives me the most … Continue reading 

Posted in ASPNETMVC | 47 Comments

LINQ query operators and null lists

One of my pet peeves with the LINQ extension methods is their inability to handle null source lists.  For example, this will throw an ArgumentNullException: [Test] public void Should_handle_nulls() { List<int> ints = null; ints.Any(num => num < 0).ShouldBeFalse(); } … Continue reading 

Posted in LINQ | 8 Comments

Persistence model and domain anemia

Domain anemia is a term thrown around like it’s a horrible disease.  However, a while back, Greg Young talked about an intentional decision to create an anemic domain model.  In some contexts, an anemic domain model is an anti-pattern.  Instead, … Continue reading 

Posted in DomainDrivenDesign | 16 Comments

The Template Method is a lie

In my recent adventures with controller-less actions, and trying to solve the issue of the crazy CRUDController mess I had put myself (and our team/project) into.  While some gravitate towards the Singleton pattern to abuse after they learn the GoF … Continue reading 

Posted in Design, OO | 15 Comments

Migrating to Fluent NHibernate

Recently, I’ve been entrenched in migrating our existing hbm.xml mapping files to Fluent NHibernate.  Having been through other OSS upgrades, I was expecting something along the lines of pulling teeth.  I pictured a branch, tedious work to try and move … Continue reading 

Posted in NHibernate | 8 Comments