Command design Pattern in Java with Example

In simple words, Command design pattern is used to separate a request for an action from the object which actually performs the action. This decoupling between Invoker and Receiver object provides a uniform ways to perform different types of actions. This decoupling is achieved using a Command object, which is usually an interface with methods like execute(). The Requestor or Invoker only knows about Command object, and doesn't care of the actual object which process the request, which can be different. This transparency leads clean code on Invoker side and also enables opportunity to do several smart things on Command side. Your Command object can be as dumb as simply delegating request to Receiver and can be as smart as recording last command for performing UNDO and REDO functionality.
Read more �

Comments

Popular posts from this blog

Cara Membuat Halaman Login Hotspot Berbeda pada 1 Mikrotik

UltraISO Premium Edition v9.5.3

Arti OSAKMJ