DESIGN_PRINCIPLE

MVC Pattern

Introduction MVC Pattern stands for Model-View-Controller Pattern. This pattern is used to separate application's concerns. Model - Model manages the app data and state. It is not concerned with UI or presentation. View - View represents the visualization of the data that model contains. Controller - Controller acts on both [...]

2024-04-17T23:20:00+05:30Categories: Programming|Tags: |

Proxy Pattern

Introduction Proxies are also called surrogates, handles, and wrappers. They are closely related in structure, but not purpose, to Adapters and Decorators. Proxy Pattern provides a representative for another object in order to control the client’s access to it. There are a number of ways it can manage that access. [...]

2020-05-14T16:14:52+05:30Categories: Programming|Tags: |

State Pattern

Introduction State pattern is one of the behavioral design pattern. This pattern is used when an object changes its behavior based on its internal state. This pattern allows an object to have many different behaviors that are based on its internal state. Unlike a procedural state machine, it represents state [...]

2020-05-14T14:58:10+05:30Categories: Programming|Tags: |

Composite Pattern

Introduction Composite pattern is used where we need to treat a group of objects in similar way as a single object. Composite pattern composes objects in term of a tree structure to represent part as well as whole hierarchy. This pattern creates a class that contains group of its own [...]

2020-05-14T16:19:26+05:30Categories: Programming|Tags: |

Iterator Pattern

Introduction Iterator pattern is used to access the elements of a collection object in sequential manner without any need to know its underlying representation. Iterator pattern falls under behavioural pattern category. An aggregate object such as a list should give you a way to access its elements without exposing its [...]

2020-05-14T14:25:01+05:30Categories: Programming|Tags: |

Template Method pattern

Introduction Template method design pattern is to define an algorithm as skeleton of operations and leave the details to be implemented by the child classes. The overall structure and sequence of the algorithm is preserved by the parent class. This design pattern is used popularly in framework development. This helps [...]

2020-05-14T16:04:10+05:30Categories: Programming|Tags: |

Facade Pattern | Design Pattern

Introduction Facade pattern hides the complexities of the system and provides an interface to the client using which the client can access the system. This type of design pattern comes under structural pattern as this pattern adds an interface to existing system to hide its complexities. This pattern involves a [...]

2020-05-14T16:43:16+05:30Categories: Programming|Tags: |

Adapter Pattern

Introduction Adapter pattern works as a bridge between two incompatible interfaces. This pattern involves a single class which is responsible to join functionalities of independent or incompatible interfaces. A real life example could be a case of card reader which acts as an adapter between memory card and a laptop. [...]

2020-05-14T15:41:09+05:30Categories: Programming|Tags: |

Command Pattern | Design Pattern

Introduction Command design pattern is a Behavioral Patterns. This pattern encapsulates commands (method calls) in objects allowing us to issue requests without knowing the requested operation or the requesting object. Command design pattern provides the options to queue commands, undo/redo actions and other manipulations. Command design decouples the object that [...]

2020-05-05T22:49:59+05:30Categories: Programming|Tags: |

Singleton Pattern

Introduction Sometimes it's important to have only one instance for a class. Usually singletons are used for centralized management of internal or external resources and they provide a global point of access to themselves. It involves only one class which is responsible to instantiate itself, to make sure it creates [...]

2020-05-04T19:22:59+05:30Categories: Programming|Tags: |
Go to Top