Manage Hierarchies with Composite Pattern

Introduction The composite design pattern generalize a hierarchical structure. It helps deal with tree structure of information. This make things easier for clients due to uniform way to work with individual items and for collections. Lets start by stating that composite is not composition (composition is another useful software design approach. Decorator pattern utilizes composition). … Read more

Extending functionality using Decorator Pattern (C#)

Introduction The decorator pattern is a structural design pattern which allows you to dynamically add functionality to classes without modifying the target class. It does this by creating a wrapper around the original class, which gives you an extension point to inject in new behavior. It allows you to maintain a strong separation of concerns … Read more

Observer Pattern in .NET

Introduction I have previously written few posts about delegates, .NET Events, Events Args to show that similar to real world events, we can use this concept in our code and how useful they are in certain scenarios. In this post, we will see that those types are a good candidate for implementing observer pattern without … Read more