Category Archives: Patterns

Proper Session/DbContext lifecycle management

Most “heavy” object-relational mappers (ORMs) have an interface that provides more than just easy querying of the database. They also are implementations of two key patterns: Unit of Work Identity Map For NHibernate, this is the ISession interface, and for … Continue reading 

Also posted in Architecture | 42 Comments

Put your controllers on a diet: POSTs and commands

Previous posts in this series: Redux Defactoring A survey GETs and queries In the last post, we looked at encapsulating the interesting part of GET actions (taking request parameters and building a model) into individual encapsulated query objects and handlers. … Continue reading 

Also posted in Architecture, ASP.NET MVC | 38 Comments

Fluent Silverlight – Part 1

Introduction We (that is Ray Houston and myself) want to introduce a new framework we developed in the past few months. This framework provides a fluent interface to Microsoft Silverlight. As we have been able to leverage a lot of … Continue reading 

Also posted in Team Build, VSTS | Leave a comment

PTOM – Brownfield development – Making your dependencies explicit

Introducing DI and “poor man’s DI” Introduction Greenfield Development happens when you start a brand new project, as in, clean slate development. No legacy code lying around, no old development to maintain. You’re starting afresh, from scratch, from a blank … Continue reading 

Also posted in Agile, Testing | Leave a comment

The open closed principle

In the previous two posts I discussed the S of S.O.L.I.D. which is the Single Responsibility Principle (SRP) and the D of S.O.L.I.D. which corresponds to the Dependency Inversion Principle (DI). This time I want to continue this series with … Continue reading 

Also posted in Tools | Leave a comment

Real Swiss don’t need SRP, do they?

Introduction You may ask yourself why I publish another article about the single responsibility principle (SRP). We already had some very good post about this principle at Los Techies, e.g. here, here and here to mention just a few. Well, … Continue reading 

Also posted in C# | Leave a comment

Domain Models in presentation frameworks

One common question when applying DDD is how to interpret other architecture’s concepts of a “model”.  For example, two common presentation architectures are MVC and MVP.  In each of those acronyms, the “M” is short for “Model”.  So what exactly … Continue reading 

Also posted in ASP.NET MVC, Domain-Driven Design | 27 Comments

PTOM: The Composite Design Pattern

The Composite Design Pattern This post talks about the Composite Design Pattern and is part of Pablo’s Topic of the Month – November: Design Patterns. A Composite is a tree structure where each node can be represented as a common … Continue reading 

Also posted in C# | Leave a comment

Pablo’s Topic of the Month – November: Design Patterns

Pablo’s Topic of the Month – November: Design Patterns Back in April, we announced we would be doing a PTOM on Design Patterns. It turned out that April was a busy month for all of us and we didn’t live … Continue reading 

Also posted in Agile, VSTS | Leave a comment

Strategies and discriminators in NHibernate

I recently posted about enumeration classes, and how I like to use them as a sort of “Enumerations with behavior”.  Not every enumeration should be replaced with a class, but that pattern helps quite a bit when I find a … Continue reading 

Also posted in NHibernate | 14 Comments