What it is good for

The observer design pattern is easy to implement and allows us to add new observers or remove old observers at runtime. It helps to decouple logic and communication, which makes for some good quality classes that have only one responsibility.

Get Scala Design Patterns - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.