Giter Club home page Giter Club logo

solidprinciples's Introduction

SOLIDPrinciples

Examples explaining the SOLID principles OOD (Object Oriented Design)

Exists 5 Design principles

  • S stands for SRP (Single responsibility principle)
  • O stands for OCP (Open closed principle)
  • L stands for LSP (Liskov substitution principle)
  • I stands for ISP (Interface segregation principle)
  • D stands for DIP (Dependency inversion principle)

1. SRP (Single responsibility principle)

A class that have a single responsibility and not muiltiple, the class can move in all the activities of the system.

2. OCP (Open closed principle)

In OOP the entities i.e. classes, functions, modules, etc. Should be open by extension and closed by modification. Extend the behavior and the source code is not modified.

3. LSP (Liskov substitution principle)

If S is a subtype of T, then objects of type T in a program may be replaced with objects of type S without altering any of the desirable properties of that program. Barbara Liskov - 1987.

4. ISP (Interface segregation principle)

The client should not be forced to depend on methods it does not use (Interface concept).

5. DIP (Dependency inversion principle)

It refers to a specific form of decoupling software modules.It states.

  • High-level modules should not depend on low-level modules. Both should depend on abstractions.
  • Abstractions should not depend on details. Details should depend on abstractions.

solidprinciples's People

Contributors

fabianvarela avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.