/ Published in: JavaScript
The Command pattern aims to encapsulate method invocation, requests or operations
into a single object and gives you the ability to both parameterize and pass method calls
around that can be executed at your discretion. In addition, it enables you to decouple
objects invoking the action from the objects which implement them, giving you a
greater degree of overall flexibility in swapping out concrete 'classes'.
into a single object and gives you the ability to both parameterize and pass method calls
around that can be executed at your discretion. In addition, it enables you to decouple
objects invoking the action from the objects which implement them, giving you a
greater degree of overall flexibility in swapping out concrete 'classes'.