Monthly Archives: June 2009

How we do MVC – View models

A while back, I went over a few of the patterns and opinions we’ve gravitated towards on our current large-ish ASP.NET MVC project, or, how we do MVC.  Many of these opinions were forged the hard way, by doing the … Continue reading 

Posted in ASPNETMVC, AutoMapper | 83 Comments

Expressions Cheat Sheet

I started getting really tired of looking up the translation between the ExpressionType and concrete Expression type (they don’t match up), so I created this cheat sheet that has each ExpressionType, derived Expression type and a simple example.  What’s interesting … Continue reading 

Posted in C# | 5 Comments

The Filter-ViewData anti-pattern

In just about every website you go to these days, its layout follows a very similar pattern: You have some static resource logo, a large main section with information that our controller action supplies.  But we also have some other … Continue reading 

Posted in ASPNETMVC | 18 Comments

More on Late-Bound Invocations with Expression Trees

Recently, I went on a bit of a tear in the AutoMapper trying to improve performance.  Besides the threading issues I introduced (dictionary lookups are NOT thread safe, in case you’re wondering), I looked at improving the performance of the … Continue reading 

Posted in C# | 3 Comments

Why opinionated input builders for ASP.NET MVC?

When we first started looking at crafting forms for MVC in a recent big project, we had just completed a ton of “view” screens for a wide variety of information.  Having learned quite a few things on crafting HTML on … Continue reading 

Posted in ASPNETMVC | Leave a comment

Requesting features for AutoMapper

On the AutoMapper mailing list, I get a lot of what I consider wacky requests.  Not because the requests aren’t valid, but rarely do I get any context of what people are trying to do with AutoMapper.  As a reference, … Continue reading 

Posted in AutoMapper | 6 Comments

Simplest versus first thing that could possibly work

One of the core XP practices that resonated with me quite early on was the concept of simple design.  When I learned TDD, this practice was further refined with the concept of doing the “simplest thing that could possibly work”.  … Continue reading 

Posted in Design | 3 Comments

Defining and refining conventions

At last night’s ADNUG talk, Jeremy Miller talked about Convention over Configuration, and many of the principles the Rails community embraces.  He showed a few examples of opinionated software, such as FubuMVC.  One thing I would have liked more conversation … Continue reading 

Posted in Design | 2 Comments

Reflecting reality

Reading over the latest MSDN magazine issue, I’m always encouraged when I see something that I consider important on the cover, Test-Driven Design.  It covers one of the more difficult technical aspects of TDD, which is mock objects.  It took … Continue reading 

Posted in TDD | 5 Comments

Fighting technical debt with the wall of pain

Technical debt, even on the agile-ist of agilista teams, still accumulates.  Debt is inevitable, as initial design is always based on assumptions, not all of which pan out.  I never view that as a failure, as all we can do … Continue reading 

Posted in Agile, Refactoring | 8 Comments