Factory Design Pattern

Factory design pattern belong to the Creational design pattern category which explain how the objects are created. Factory Design Pattern comes with different flavors and we use the flavor as per our convenience. The very common example of Factory design pattern can be found in Spring. Creation of beans in Spring container is done using … More Factory Design Pattern

Strategy Design Pattern

This is kind of Behavioral Design Pattern(BDP) and as per the BDP definition, “Behavioral patterns describe how the objects behave when they interact with each other” and this design pattern is used when we have number of options to choose our strategy among available strategies. Example: Lets say you have one List of Employees which you want … More Strategy Design Pattern

Command Design Pattern

This is kind of Behavioral Design Pattern(BDP) and as per the BDP definition, “Behavioral patterns describe how the objects behave when they interact with each other” and as the name explain this design pattern is used when we give command to some one else to get our job done. Example: When you visit any restaurant, you … More Command Design Pattern