Monthly Archives: January 2009

AutoMapper mailing list created

Since the one AutoMapper blog post comment section is a terrible place to ask and answer questions, I created an AutoMapper-users Google Group: http://groups.google.com/group/automapper-users I was probably being a little presumptuous that there are user(s) plural other than me, but … Continue reading 

Posted in AutoMapper | 1 Comment

Be wary of container calls in tests

This one cost me a couple of hours today.  To be clear: No calls to the IoC container in a unit or integration test! I want my tests to fail because of an assertion failure, not because of a setup … Continue reading 

Posted in Testing | 15 Comments

ASP.NET MVC options for consolidating HTML

It comes up very early in any ASP.NET MVC application: duplicated HTML.  Bits and pieces of final rendered page may appear on two or more different pages, and that’s duplication we would like to eliminate.  In WebForms land, we had … Continue reading 

Posted in ASP.NET MVC | 16 Comments

AutoMapper: the Object-Object Mapper

In Domain-Driven Design, creating a rich domain model in code is essential for capturing the richness and complexity of the real-world domain.  These domain models, designed as POCOs, are not very portable, nor should they be.  Domain models live inside … Continue reading 

Posted in AutoMapper | 89 Comments

JavaScript decorator pattern

I don’t care how many other places this is on the net, file this one under “so I won’t need to look ever again.” I needed to augment an existing JavaScript function by applying a decorator to it, where I … Continue reading 

Posted in JavaScript | 4 Comments

A new breed of magic strings in ASP.NET MVC

One of the common patterns in Ruby on Rails is the use of hashes in place of large parameter lists.  Instead of hashes, which don’t exist in C#, ASP.NET MVC uses anonymous types for quite a few HTML generators on … Continue reading 

Posted in ASP.NET MVC | 12 Comments

Enabling success with opinionated architecture

One of my pet peeve questions I often see on various tech mailing lists is “How can I prevent situation XYZ”.  In one recent case, it was “How can I prevent UI calls to mutable methods in the domain?”  The … Continue reading 

Posted in Design | 5 Comments

DDD is not all-or-nothing

The Domain-Driven Design book (or, the Blue Bible), is chock-full of patterns.  Software patterns, team patterns, integration patterns and so on.  As a consequence, many readers might assume that DDD requires these patterns, that you must apply these patterns, and … Continue reading 

Posted in Domain-Driven Design | 13 Comments

10 things to embrace in 2009

With 2008 behind us, what better way to kick off the new year than another cheesy top 10 list.  This time, with more bold! Rather than focus on the negative, here are a few things I’d like to see continued … Continue reading 

Posted in Rant | 3 Comments

Extension methods and a plea for mixins

I was having a spot of trouble the other day trying to get my extension methods to show up in my ASP.NET MVC Views.  One of the issues we’ve run into is trying to make our Views (more) intelligent on … Continue reading 

Posted in ASP.NET MVC, C# | 4 Comments