Skip to main content


Showing posts from October, 2021

SOLID Principle

SOLID is a design principle used in software industry. The objective of this principle is to make software Scalable, Maintainable, Loosely coupled, Encapsulated etc. The major flaws in design to fail the software are as below: Assigning more and more responsibility to a single class. Depending one class on another class. Spreading/Introducing duplicate code in the system. SOLID principle provide great help to overcome these design flaws. SOLID Principle Details S: Single Responsibility Principle (SRP) O: Open Closed Principle (OCP) L: Liskov Substitution Principle (LSP) I: Interface Segregation Principle (ISP) D: Dependency Inversion Principle (DIP) S: Single Responsibility Principle (SRP) A Class or Module or Function should have only one job to do. In another words, our Class or Module or Function should have only one reason to change. It should not be like Swiss knife wherein if one of them need to change then entire tool need to be

Design Patterns

Design patterns are basically the best practices used by expert in software development to achieve high scalability, high maintainability, high solutionability, high flexibility and so on. Design Patterns can be classified into three categories Creational, Structural and Behavioral patterns. Creational Design Patterns It provide a way to create an object while hiding the creation logic instead of instantiating objects directly using new key word. It provide more flexibility to the program to decide which objects need to be created for a given use case. Example Factory Pattern, Factory Method Pattern, Abstract Factory Pattern, Singleton Pattern, Builder Pattern, Prototype patterns are the example of creational design pattern. Structural Design Patterns Assembling classes and objects into larger structure while keeping the structures flexible and efficient. Inheritance is an example of this pattern. Example Adapter Pattern, Bridge