NDepend
NDepend

Background A month ago, Patrick Smacchia a C# MVP and the author of Ndepend reached out to me to have a look at his product: NDepend and asked me to share my thoughts on it. I must say I felt very happy when Patrick contacted me to let me try this and also giving me the honor... » read more

State Pattern
State Pattern

State Pattern State pattern allows an object to alter its behavior when its internal state changes and the object will appear to change its class.  For explaining state pattern lets consider the example of a Turnstile at public transportation entrance for subway, where we can use our subway card so that turnstile unlocks provided there... » read more

Singleton Pattern
Singleton Pattern

Singleton Pattern The Singleton pattern ensures class has only one instance and provides a global access to it. In other words, it says that singleton pattern makes it impossible to instantiate the class except for the first time and whenever you want an instance you must use the same instance. There is a good argument... » read more

Null Object Pattern
Null Object Pattern

 If something is null in the program it means we have two paths one path on which we do something in the program when it is null another path is the one when it’s not null. The problem is this type of branching as soon as something is null, we must check that value everywhere... » read more

Decorator Pattern
Decorator Pattern

Decorator Pattern Imagine there is an object where if we send a message Speak () to the object returns “Hello World” as response. Decorator pattern says that if I want to change the behavior of the object, I can do so without changing the contents of the object at run time. Decorator pattern wraps the... » read more

Observer Pattern
Observer Pattern

Observer Pattern We have one object whose state keeps changing and there is another object which wants to know whenever the state has been changed. Think of something like an RSS client which wants to know when a new article has been published or a broadcast message which delivers to all the recipients. Push Vs... » read more