In this blog post, I’ll share to you different object oriented design principles that every programmer or software developer has to master. There are already so many articles about this on the internet but I’ll try to explain it in my own way to expand my understanding about this topic.
Design Principles is an essential way of designing or writing code to make that code more maintainable, flexible or extensible.
These design principles are proven and tested by the great programmers and authors who has many years of experience in software development. It is good when you know these design principles to avoid problems when maintaining your code.
I created a list below.
- The Open Closed Principle (OCP)
- The Don’t Repeat Yourself Principle (DRY)
- The Single Responsibility Principle (SRP)
- The Liskov Substitution Principle (LSP)
- Interface Segregation Principle (ISP)
- Favor Composition Over Inheritance
- Programming for Interface Not Implementation
- Delegation Principle
- Encapsulate What Changes
For each design principle, I will create a blog posts explaining the design principle and provide a code that violates that principle and code that conforms with that principle. And here, I will update the link for each principle. I cannot publish all design principle for one day, but I intend to published it all this month.
If you want to keep updated with my posts, don’t forget to subscribe.