This document discusses replacing ActiveRecord callbacks with a publish-subscribe model using Wisper. It outlines some of the issues with callbacks, such as tight coupling, brittle tests, and synchronous operations. Wisper provides an alternative by decoupling business logic from models using an event-driven publish-subscribe approach. This improves testability and allows asynchronous background processing. The document also briefly covers Wisper features like broadcasting lifecycle events and integrating with ActiveJob for asynchronous jobs.
Related topics: