Giter Site home page Giter Site logo

designpatterns's Introduction

Design Patterns

HttpPatch

The project includes examples of implementation of Design Patterns by GOF using C# and UML diagrams

Design Patterns can be classified into three categories namely - Creational patterns - Structural patterns - Behavioral patterns

  1. Creational design patterns
  • are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.

  • creational patterns consists of five design patterns

    • Abstract factory - which provides an interface for creating related or dependent objects without specifying the objects' concrete classes

    • Builder - separate the construction of a complex object from its representation so that the same construction process can create different representations

    • Factory method - centralize creation of an object of a specific type choosing one of several implementations

    • Singleton - restrict instantiation of a class to one object

    • Prototype - used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects

  1. Structural design patterns
  • are design patterns that ease the design by identifying a simple way to realize relationships between entities.

  • examples of structural design patters includes the following

    • Adapter - match interfaces of different classes or 'adapts' one interface for a class into one that a client expects

    • Bridge - decouple an abstraction from its implementation so that the two can vary independently

    • Composite - a tree structure of objects where every object has the same interface

    • Decorator - add additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes

    • Facade - create a simplified interface of an existing interface to ease usage for common tasks

    • Flyweight - a large quantity of objects share a common properties object to save space

    • Proxy - An object representing another object or a class functioning as an interface to something else

  1. Behavioral design patterns
  • are design patterns that identify common communication patterns between objects and realize these patterns.

  • examples of behavioral design patterns comprise of the following

    • Chain of Responsibility - command objects are handled or passed on to other objects by logic-containing processing objects

    • Commmand - command objects encapsulate an action and its parameters

    • Interpreter - a way to include language elements in a program

    • Iterator - iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation

    • Mediator - provides a unified interface to a set of interfaces in a subsystem

    • Memento - provides the ability to restore an object to its previous state (rollback)

    • Observer - objects register to observe an event that may be raised by another object

    • State - a clean way for an object to partially change its type at runtime

    • Strategy - algorithms can be selected on the fly

    • Template method - defer the exact steps of an algorithm to a subclass

    • Visitor - a way to separate an algorithm from an object

designpatterns's People

Contributors

marusyk avatar rmoswela avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.