Skip to content

shalini47ch/Design-Pattern-Python

Repository files navigation

Code Implementation of Design Patterns in Software Engineering

imageimageimage

Design Patterns Mnemonic Guide

Overview

This guide provides a mnemonic to help remember key design patterns, categorized into Creational, Structural, and Behavioral patterns. Each pattern is briefly described along with a mnemonic to facilitate recall.


CategoryPatternUsageMnemonic
CreationalAbstract FactoryCreate families of related or dependent objects without specifying their concrete classesArchitect family objects
Factory MethodCreate objects without specifying the exact class of the object that will be createdForge objects
BuilderConstruct a complex object step by stepBuild step by step
PrototypeCreate new instances of objects that are identical to existing onesPainting a clone
SingletonEnsure a class has only one instance and provide a global point of access to itSingle instance
StructuralDecoratorAdd responsibilities to objects dynamicallyDress up
AdapterConvert one interface to another so that it matches what a client expectsAdapt the plug
FacadeProvide a unified interface to a set of interfaces in a subsystemFront desk
BridgeDecouple an abstraction from its implementation so that the two can vary independentlyBuild a bridge
ProxyProvide a surrogate or placeholder for another object to control access to itPlaceholder proxy
CompositeCompose objects into tree structures to represent part-whole hierarchiesCompose a tree
FlyweightMinimize memory usage by sharing as much data as possible with other similar objectsPrudent memory
BehavioralStrategyDefine a family of algorithms, encapsulate each one, and make them interchangeableSwitch strategies
ObserverNotify other objects about state changesObserve and notify
MementoCapture and restore an object's internal state without violating encapsulationMemory capsule
CommandEncapsulate a request as an object, allowing for parameterization of clients with queues, requests, and operationsControl commands
IteratorProvide a way to access the elements of an aggregate object sequentially without exposing its underlying representationIterate sequentially
Template MethodDefine the skeleton of an algorithm in a method, deferring some steps to subclassesTemplate for tasks
VisitorDefine a new operation without changing the classes of the elements on which it operatesVisit elements
StateAllow an object to alter its behavior when its internal state changesState-based behavior
Chain of ResponsibilityPass a request along a chain of handlers, allowing each handler to either handle the request or pass it to the next handlerSend along the chain
MediatorDefine an object that encapsulates how a set of objects interact, promoting loose couplingCentral mediator

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages