• Sat. Nov 23rd, 2024
solid_img
SOLID principles are the design principles that enable us manage most of the software design problems.
The term SOLID is an acronym for five design principles intended to make software designs more understandable, flexible and maintainable.
The principle are a subset of many principles promoted by Robert C.Martin.
The SOLID acronym was first introduced by Michael Feathers.
SOLID Acronym:
S:Single Responsibility Princliple(SRP)
O:Open closed Princliple(OSP)
L:Liskov substitution principle(LSP)
I:Interface Segregation principle(ISP)
D:Dependency Inversion Principle(DIP)
SRP:  Robert C.Martin expresses the principle as,”A class should have only one reason to change”
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: Introduced by Barbara Liskov state that “objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program”.
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.
we can also state that derived types must be substitutable for their base types.
Open Closes principle: “Software entities should be open for extension,but closed for modification”
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 .
The design should be done in a way to allow the adding of new functionality as new classes .Keeping as much as possible exsting code unchanged
Interface Segregation Principle:
“Many client-specific interface are better than one general-purpose interface”
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:
One should “depened upon abstraction,[not] concretions”
Abstractions should not depend on the details Whereas the details should depend on abstractions
High-level modules should not depend on low level modules.
Why SOLID
If we don’t follow SOLID Principles we 
.End uo with tight or strong coupling of the code with many other modules/applications
.Tight coupling causes time to implement any new requirement,features or any bug fixes and some times it creates unknown issues.
.End up with a code Which is not testable.
.End up with duplication of the code.
.End up creating new bugs by fixing another bug.
.End up with many unknown issue in the application development cycle.
Following SOLID Principles helps us to 
.Achieve reduction in complexity of code
.Increase readability,extensibility and maintenance.
.Reduce error and Implement Reusability.
.Achieve Better testability.
.Reduce tight coupling.
Solution to develop  a succesful application depends on:
.Architecture :choosing an architecture is the first step in designing application based on the reauirements.
E.g.:MVC,WEBAPI,MVVM..etc.
.Design Principles:Application develpoment process need to follow the design principles.
.Design Patterns:We need to choose correct patterns to build software.

By skkumar199650

Highly skilled and dedicated Software Developer with over 5 years of experience in developing and debugging applications. Proficient in a wide range of technologies, including .NET Technology, Core Java, MS SQL Server, AWS, Liferay, Angular, Ionic, and Azure, Power BI,SSRS,SSIS. I am passionate about delivering robust and scalable software solutions that meet the highest standards. I thrive in collaborative environments, leveraging my strong analytical and problem-solving skills to drive successful outcomes.