More

    INTRODUCTION TO THE SOLID PRINCIPLES OF DESIGN

    SOLID is a mnemonic acronym introduced by Michael Feathers for five of the principles named by Robert C. Martin, and when applied together, these intend to make it more likely that a programmer will create a system that is easy to maintain and extend over time.

    1. (++) Single responsibility principle (SRP)
      • Every class should have a single responsibility, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility. 
    2. Open Close Principle (OCP)
      • Open for extension, closed for modification. Our code should be open to change (or extension) and closed for modification to accommodate that change.
    3. (++) Liskov substitution principle
      • ​​Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
    4. Interface segregation principle
      • Many client-specific interfaces are better than one general-purpose interface.
    5. Dependency inversion principle (DIP)
      • Depend upon abstractions. Do not depend upon concretions. Spring’s frameworks popular dependency injection feature is based on this principle.

    REFERENCES: 

    1. https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)
    2. Head First Design Patterns By Eric Freeman, Elisabeth Freeman, Bert Bates, Kathy Sierra

    Recent Articles

    OAUTH – FREQUENTLY ASKED QUESTIONS FOR INTERVIEWS AND SELF EVALUATION

    Why is refresh token needed when you have access token? Access tokens are usually short-lived and refresh tokens are...

    SUMO LOGIC VIDEOS AND TUTORIALS

    Sumo Logic Basics - Part 1 of 2 (link is external) (Sep 29, 2016)Sumo Logic Basics - Part 2 of 2...

    GIT – USEFUL COMMANDS

    Discard all local changes, but save them for possible re-use later:  git stash Discarding local changes...

    DISTRIBUTED COMPUTING – RECORDED LECTURES (BITS)

    Module 1 - INTRODUCTION Recorded Lecture - 1.1 Introduction Part I – Definition

    BOOK REVIEW GUIDELINES FOR COOKBOOKS

    Whenever you add reviews for the book, please follow below rules. Write issues in an excel.Create an excel...

    Related Stories

    Leave A Reply

    Please enter your comment!
    Please enter your name here

    Stay on op - Ge the daily news in your inbox