Decorator Pattern

Problem: The explosion of classes occurs because of N number of combinations for a product, for example, pizza or coffee, which leads to inconsistency in the code like maintainability, scalability, and readability and also requires to addition of more combinations on the requirement. This violates the open-closed principle. If you…

Continue reading

Strategy Design Pattern

Strategy Design Pattern is one of the behavioural design patterns. This pattern helps to bring different strategies to the table, which means implementing different strategies for a task For example, payment services have different strategies (options) on e-commerce platforms e.g. credit card, net banking, UPI, pay later, wallets, etc. Some…

Continue reading