Design Patterns for Dummies. The Proxy Pattern

This is the second post in a series of post on Design patterns. Presently we are going through the structural patterns. In my previous post I had discussed about the Decorator Pattern. I will be writing about the proxy pattern today.

Read More...

Design Patterns for Dummies. The Decorator Pattern

Yes there are a lot of posting on design patterns, and you might ask why another of these post on design patterns. I am doing this post so that I can document the design patterns for myself for later use.

There are 23 design patterns as observed by the Gang Of Four (Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides). And they are categorized basically into 3 segments viz. Structural, Creational and Behavioral patterns. I will take these in order.

Read More...

Cloning Extension Method

C# comments suggest edit

As you know cloning creates a replica of the instance of a type. There are basically 2 ways of cloning. Shallow Copywhich means the original object and the copied object reference the same memory location after the process and Deep Copywhich means the original object and the copied object do not reference the same location after the process. You can shallow copy the object by using the protected MemberwiseClone method of the object. You can implement the Clone method of the ICloneable interface for each class you have to clone for the deep copy. I somehow did not like the idea of implementing this Clone method in each and every class that I wanted to clone, so I created a generic class  to get the deep cloning working. Here is the code.

Read More...

Extension Methods and LINQ

C# comments suggest edit

This is the final post about the new features in C# 3.0. You can read the first two posts here and here. In these posts I have just described the new features of C# 3.0 without going much into details. If time permits I will elaborate on each of these.

Read More...

MPS using VistaDB

As promised in my previous post on VistaDB providers, I have implemented the VistaDB provider for my website. The full source code is available here. Note : I did this in a hurry and I might have missed out on some things. Please feel free to send feed back on this.

Read More...