Category Archives: Architecture

Curbing long tail design

One of the perks of my job (and talking to a lot of folks) is that I get to see a lot of people’s actual code. Not gists, blog examples, or GitHub playgrounds, but real, actual, production code. Some code … Continue reading 

Also posted in Design | 21 Comments

Limiting your abstractions

It’s been almost 3 years since I first wrote about moving away from the Repository abstraction. Since then, I’ve gone more or less full-bore without any concept of a repository in the systems I’ve built. I haven’t removed existing repositories, … Continue reading 

| 38 Comments

Evolutionary Project Structure

I used to care quite a bit about project structure in applications. Trying to enforce logical layering through physical projects, I would start off a project by defaulting to building an app with at least two projects, if not more. … Continue reading 

Also posted in Domain-Driven Design | 78 Comments

ORM techniques for legacy databases

One of the reasons folks typically go with a hand-rolled ORM (i.e., using ADO.NET by hand) is the assumption that ORMs don’t work well with legacy databases or databases designed in isolation from any sort of object model used to … Continue reading 

Also posted in NHibernate, SQL | 22 Comments

Don’t write your own ORM

In my last post, I talked about various kinds of patterns of ORMs and how to choose an ORM strategy. From the comments and tweets I got, it seems like some folks still think that their only ORM choices are: … Continue reading 

| 49 Comments

Choosing an ORM strategy

One of the mistakes I see people make (and have made myself) is assuming that you must choose exactly one ORM strategy for an entire database/application/system. It’s simply not the case. You can (and should) tailor your ORM strategy to … Continue reading 

| 33 Comments

Troubleshooting SQL index performance on varchar columns

Doing a deployment last night, I ran into an issue around indexing performance around SQL columns of type varchar. Varchar is the ANSI version of character data – storing as 8-bits, while nvarchar is Unicode, storing as 16 bits. For … Continue reading 

| 13 Comments

Limits of performance optimization

Back in college, where I was an Electrical Engineering undergrad, I had an especially difficult professor for my microcontrollers course. In this course, we would hand-roll assembly language instructions and upload them to the 68HC12 testing board. (Side-note, I never, … Continue reading 

| 7 Comments

Dealing with transactions

In the last post on NServiceBus, I got quite a few comments that one way to fix the problem of dealing with non-transactional operations that must happen if some transaction succeeds is to simply move the non-transactional operation after the … Continue reading 

| 10 Comments

Async messaging realities

I got a bit of a chuckle from Ayende’s post on time traveling emails. In it, he shows messages in his email inbox received out of order chronologically from when they actually occurred in the real world. That’s one of … Continue reading 

| 6 Comments