SOLID Design Patterns
Introduction: SOLID is short for 5 Design Patterns/ Principles (S-O-L-I-D) of Coding which are very commonly used in every software system. All the frameworks and existing solutions are based on these principles hence its very important to understand them before you even start designing or writing your piece of code. These are the guidelines to write clean code which is easy to maintain and extend without creating lots of bugs. S - Single Responsibility O - Open Closed Principle L - Liskov Substitution I - Interface Segregation D - Dependency Inversion/Injection S- Single Responsibility This pattern states that every class/piece of code should have single responsibility and lots of tasks should not be aggregated into a single class. for example if a class Book stores information about a book, it should not be responsible about printing the book or logging information about it onto the console. we can divide the task of printing or logging into a separate class. For ex...