Decorator: sending notifications

Add behaviour to a value by wrapping it in another value with the same interface.

Level Intermediate

What you will see

  1. One email, three extra jobs
  2. One type, one option per job
  3. A notifier that holds a notifier
  4. Before, after or around the call
  5. The order of the layers
  6. When not to use it

Before / after

Base: decorator-base-goView the diff

Exercises