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

Build a simple Chat Room using Mediator Pattern (C#)

Introduction I’ve previously written about Mediator pattern and how it encapsulates object’s interaction and communication. This pattern promotes loose coupling between software components. It acts as a communication hub and it facilitates one-to-many, many-to-one and many-to-many communications. We than saw an example of Vehicles Control Center where vehicles position is communicated to control center. We … Read more

Working with XML Using C#

Introduction The Extensible Markup Language (XML) is a simple text-based format for representing structured information: documents, data, configuration, books, transactions, invoices, and much more. It is a very common format and In this post, we will learn some of the basic ways to work with XML in C#. Getting Started XDocument and XElement are the … Read more