How to use SOLID as a framework to approach design problems: Low level design Part #1

TL;DR 1. Use design pattern only when you are absolutely sure about the problem it will solve. 2. Goal of design is to lay the abstractions of a system to reflect the problem space and hide implementation details under appropriate abstractions. 3. SOLID are guide lines to create coherent systems. 4. SRP: Function/class/module should do one thing and do it well 5. OCP: Modules should be open for extension but closed for modification. ( A bit confusing, so read it) 6. LSP: How to not misuse inheritance: Users of base class should not notice if you pass them an object of derived class. 7. ISP: Users should only conform to the part of interface that they use. 8. DIP: This is the most important one. It tells you how to decouple a system. It says depend of abstraction rather than concretion. ...

November 20, 2020 · 17 min · 3537 words · Malay Hazarika