Model View Controller (MVC) Design Pattern

Introduction Model-View-Controller (MVC)is a classic design pattern often used by applications that need the ability to maintain multiple views of the same data. That is when we want to use the same data but rendered on different types of devices like PC, mobile, pad etc. Each of these devices will be required to render the same content in a different format. The MVC pattern hinges … Continue reading Model View Controller (MVC) Design Pattern

Design Pattern and Types

Introduction There are so many books and articles on the internet that already explain these topics in depth. But sometimes what we look at is brief but up to date description of topics. In the coming days, I will be writing some articles which will explain different design patterns as short as possible. anyone can use this as Quick Reference material. In day to day … Continue reading Design Pattern and Types

Prototype Pattern

Introduction Is a Creational Pattern. This design pattern that is used to instantiate a class by copying, or cloning, the properties of an existing object. The new object is an exact copy of the prototype but permits modification without altering the original. Cloning can be achieved by implementing ICloneable¬†of the System namespace. The only member of ICloneable interface is Clone method that returns a new … Continue reading Prototype Pattern

Singleton Pattern

The singleton pattern falls into Creational patterns. When it is used Used when we want only one object to be shared between clients. The client should not create an object. The object should be created only once and then the same object should service all the client requests. How to Implement There are various different ways of implementing the singleton pattern in C# based on … Continue reading Singleton Pattern

Abstract Factory Patterns

This is a rarely used pattern. It exists only when you have factory patterns in the project. Abstract factory expands on the basic factory pattern. Abstract factory helps us to unite similar factory patterns classes into one unified interface. This leads to more simplified interface for the client. Example:     Steps: We have common an Interface or Abstract class The concrete classes implement this … Continue reading Abstract Factory Patterns

Factory Pattern

Introduction One of the most widely used creational patterns is the Factory. This pattern is aptly named, as it calls for the use of a specialized object solely to create other objects, much like a real-world factory. We need Factory pattern: To eliminate new keywords to create on client. The client is not aware of the concrete classes. Logical Model As with other design patterns, … Continue reading Factory Pattern