MantisBT: master c5868132

Author Committer Branch Timestamp Parent
vboctor vboctor master 2017-11-16 20:35 master b60c48bc
Changeset

Command Pattern

Use Command Pattern to achieve the following:

  • Re-using of business logic across Web UI, REST API, and SOAP API.
  • Having commands that execute a specific intent e.g. assign, close, monitor rather than just update.
  • Enable core code to hook into such commands to handle side effects like email messages.
  • Enable plugins code to hook in such commands to modify changes, block the change, post to slack, etc.
  • Use exceptions that can be surfaced to APIs or Web UI.
  • Enable having a clean model using ADODB or some higher level ORM library that is used by commands.
add - core/commands/Command.php Diff File
add - core/commands/CommandException.php Diff File
add - core/commands/CommandFactory.php Diff File
add - core/commands/Context.php Diff File
add - core/commands/MonitorCommand.php Diff File