Git Product home page Git Product logo

designpatterns's Introduction

DesignPatterns

Notes for different design patterns in programming. This aplies to almost any language but I am focusing on C# and .NET.

SOLID Design Principles

  • Introduced by Robert C. Martin (aka: Uncle Bob)

See Projects with related names for a code example. I am keeping all code in one file on purpose. To keep projects in groups and keep things simple for demonstration.

  1. Single Responsibility

    • A single class should have one reason to change
  2. Open-Closed Principle

    • Open for extension closed for modification
    • we shouldn't need to modify existing code. we can use inheritence, with interfaces
    • in our code we get asked to add more filters on a products page. We are going to use the "Specification Pattern" (not gang of four but considered an enterprise pattern).
  3. Liskov Substitution Principle

    • which describes the fundamental nature of data abstraction, and is used in type theory (see subtyping) and in object-oriented programming (see inheritance). Her work was recognized with the 2008 Turing Award, the highest distinction in computer science. (named after Barbara Liskov)

    • we should be able to substitute a base type for a sub type.

  4. Interface Segregation Principle

  5. Dependency Inversion Principle

Creational

- Builder

- Factories

	a. Abstract Factory

	b. Factory Method

- Prototype

- Singleton

Structual

- Adapter

- Bridge

- Composite

- Decorator

- Facade

- Flyweight

- Proxy

Behavioral

- Chain of Responsibility

- Command

- Interpreter

- Iterator

- Mediator

- Memento

- Null Object

- Observer

- State

- Strategy

- Template Method

- Visitor

designpatterns's People

Contributors

coryf65 avatar

Watchers

 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.