Command design pattern for beginners.
Prerequisite - Please read Controller design pattern first, t o understand command design pattern better. Background - This design pattern is applicable for broad applications. I am hoping that you have a good understanding of the Controller design pattern. Implementing controller would be very difficult without command if you are designing large applications (say 50+ modules). As we know, the controller is a singleton, and it has to delegate control/work (to one or maybe more than one) modules according to the nature of the request. Writing code to implement this will be very huge (in lines of code), and it will become tough to maintain (that code) in the maintenance phase. The solution to this problem is the Command design pattern. Let's understand the command design pattern with a classic example - Example - What operations do we perform in railway web site? Reserve tickets. Cancel tic...