Patterns Archive

A .NET Generic Repository Pattern With Implementations

I previously blogged about the repository pattern and .NET implementations. Here are the links to those old posts: The Repository Pattern The Repository Pattern – Part 2 Since that time, I have zeroed in on a fairly

Loosely Coupled JavaScript Using PubSub

I recently watched a very interesting video by Rebecca Murphy that discussed using the pubsub architecture to create loosely coupled JavaScript. The concept is to develop your JavaScript objects and allow the communication between the objects to

Using Ninject To Manage Critical Resources

This post does not pertain to the most recent (shortly after the release of this post) versions of Ninject. Ninject now handles the deactivation of all objects bound ‘InRequestScope’. Recently a discussion with a reader led to

The Repository Pattern – Part 2

I previously wrote about using the Repository Pattern with Linq to Fluent NHibernate and MySQL. Since that time, I have had the opportunity to refine and extend this approach. I have also noticed quite a few hits

The Repository Pattern with Linq to Fluent NHibernate and MySQL

I have heard a lot of good things about NHibernate, but have never had the opportunity to use it. In this post I will describe how to get started using Fluent NHibernate with Linq to NHibernate using

Ninject Binding and the Decorator Pattern

I am really enjoying Ninject as an IOC container. If you want to get started with Ninject check out my previous posts: Ninject – Getting Started, Resources, Basic Binding Ninject – Life Cycle Management or Scoping Recently,

Ninject – Life Cycle Management or Scoping

Previously we discussed getting started with Ninject and dependency injection in general. In the getting started post, we introduced a fictitious example application. This application defined concrete implementation for the following interfaces: IFileSystem – Abstraction of file

Ninject – Getting Started, Resources, Basic Binding

This post will cover the information needed to get started with Ninject. By the end of this post, you will be able to use Ninject in your application as a dependency injector. Here is a description from

Dependency Injection and Inversion of Control Containers

In future posts, I plan on diving into Ninject 2. As I was writing that post, I found myself covering a lot of background material on dependency injection (DI) and inversion of control (IOC) containers. This is

The jQuery Chaining Pattern Implemented Using C#

If you are a web developer you surely are familiar with jQuery and its ability to chain commands together. For instance: $("#someElement") // Select an element .removeClass("off") // Remove a class .css("background" : "red") // Add a