6 Jan
2010

Event Driven Architecture: Publishing Events using an IOC container

In my last post I talked about advanced IOC usage and how it is possible to use an IOC container to resolve an open generic from a closed implementation. This is technically cool, but it does not explain why this is important. In this post I want to show some additional code that will demonstrate […]

Read More
6 Dec
2009

Authenticated web services calls with Asp.Net MVC

I?ve been encountering a problem as of late.  I?m creating a lot of ?Single Page Pattern? web applications.  This means you load the page once, then handle everything else via web service calls. And if you have ever worked on web applications you should be familiar with the ?user went to lunch? issue (session timeout).  […]

Read More
1 Nov
2009

State Pattern, Enumeration Class and Fluent NHibernate (Oh my!)

Recently, I needed to change a basic enumeration into a full-fledged state pattern. After getting all my domain classes updated, I began reviewing the persistence layer. And I hit a wall. I wasn’t sure how I wanted to update my Fluent NHibernate convention to persist the current state.

Read More
25 Sep
2009

Extending the ObservableCollection to add navigation methods such as MoveFirst, MoveNext, MoveLast, and MovePrevious.

Recently, I had the need to navigate a list by using methods such as MoveFirts, MovePrevious, MoveNext, and MoveLast while at the same time keeping track of its current location to notify the user where they are at in the list. Enter the ICollectionView.  ?You can think of a collection view as a layer on […]

Read More
2 Aug
2009

This is Real

Category:UncategorizedTag: :12 Comments on This is Real

Real code in a production system which will remain unnamed, as will the source. Drink it in. class Customer { public string Role; public void Save() { // lots of code here string[] roles = Roles.GetAllRoles(); foreach (string role in roles) { if (Role.ToUpper() == role.ToUpper()) { Role = role; break; } } // lots […]

Read More
1 Aug
2009

Fluent Domain Methods

Category:UncategorizedTag: :9 Comments on Fluent Domain Methods

In my last post, I talked about a Generic Expression Builder class for easily creating domain entities through expression builders. This generic base class takes away some of the burden while developing these expression builder classes.  Expression builders are generally useful inside the domain when you need to create and set up a complete aggregate […]

Read More
31 Jul
2009

Exception Logging with EntLib Made Simple

Logging application exceptions is like getting a new muffler. It isn’t exciting. It isn’t very fulfilling. It just costs time and money. Also, it is something that needs to be done. So, can we make exception logging as frictionless as possible? Roll your own logging library. Repeat the same code a lot in your application […]

Read More