Grokking Design Patterns for Engineers and Managers
Vote

0% completed

Observer Pattern

The Observer Pattern notifies many dependents when one object changes, without the source knowing who they are.

When a build finishes, four things should happen: post to Slack, update the dashboard, record metrics, and start a deployment. Written directly, the pipeline calls all four:

void finish(int buildNumber, String result) { slack.post(buildNumber, result); dashboard.update(result); metrics.record(buildNumber); deployer.start(); }

That works, and it costs more than it looks. `BuildPipeline

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content