Gaza, a piece of our soul. ❤️🇵🇸

SOLID Principles | kudvenkat

kudvenkat

kudvenkat

I strongly believe the best gift that we can give is "The Gift of Education".. I have created thousands of software training video tutorials and made them available at no cost on YouTube. Our goal is to help students who has the potential but cannot afford expensive software training. Money should not be a barrier to become great software engineers and build great system.. Join hands to support our great cause of providing quality education to those that cannot afford. Let's do our bit to th

Course Details

  • Course Lessons6
  • Course Period0h 51m
  • No.Students3
  • LanguageEnglish
  • Prerequisite OOP
  • (1)
  • Start Now for free
Student Reviews

( 5 Of 5 )

1 review
5 Stars
100%
4 Stars
0%
3 Stars
0%
2 Stars
0%
1 Star
0%
Y
youtube

08-07-2023
Solid Design Principles

In this tutorial we will discuss SOLID design principles with simple real world examples.
Please join me to gift education to those who cannot afford.
https://www.patreon.com/kudvenkat
SOLID Principles Introduction
1. SOLID principles are the design principles that enable us manage most of the software design problems
2. The term SOLID is an acronym for five design principles intended to make software designs more understandable, flexible and maintainable
3. The principles are a subset of many principles promoted by Robert C. Martin
4. The SOLID acronym was first introduced by Michael Feathers
What is SOLID
S : Single Responsibility Principle (SRP)
O : Open closed Principle (OSP)
L : Liskov substitution Principle (LSP)
I : Interface Segregation Principle (ISP)
D : Dependency Inversion Principle (DIP)
Single Responsibility Principle
1. Robert C. Martin expresses the principle as, "A class should have only one reason to change”
2.Every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class
Liskov Substitution Principle
1. Introduced by Barbara Liskov state that “objects in a program should be replaceable with instances of their sub-types without altering the correctness of that program”
2. If a program module is using a Base class, then the reference to the Base class can be replaced with a Derived class without affecting the functionality of the program module
3. We can also state that Derived types must be substitutable for their base types
Open/Closed Principle
1. “Software entities should be open for extension, but closed for modification”
2. The design and writing of the code should be done in a way that new functionality should be added with minimum changes in the existing code
3. The design should be done in a way to allow the adding of new functionality as new classes, keeping as much as possible existing code unchanged
Interface Segregation Principle
1. “Many client-specific interfaces are better than one general-purpose interface”
2.We should not enforce clients to implement interfaces that they don't use. Instead of creating one big interface we can break down it to smaller interfaces
Dependency Inversion Principle
1. One should “depend upon abstractions, [not] concretions"
2. Abstractions should not depend on the details whereas the details should depend on abstractions
3. High-level modules should not depend on low level modules
If we don’t follow SOLID Principles we
1. End up with tight or strong coupling of the code with many other modules/applications
2. Tight coupling causes time to implement any new requirement, features or any bug fixes and some times it creates unknown issues
3. End up with a code which is not testable
4. End up with duplication of code
5. End up creating new bugs by fixing another bug
6. End up with many unknown issues in the application development cycle
Following SOLID Principles helps us to
1. Achieve reduction in complexity of code
2. Increase readability, extensibility and maintenance
3. Reduce error and implement Reusability
4. Achieve Better testability
5. Reduce tight coupling
Solution to develop a successful application depends on
Architecture : choosing an architecture is the first step in designing application based on the requirements. Example : MVC, WEBAPI, MVVMetc
Design Principles : Application development process need to follow the design principles
Design Patterns : We need to choose correct design patterns to build the software