From ActiveRecord callbacks to Publish/Subscribe pattern and event-driven design

Imagine that you are working on a large legacy application that also contains the dreaded ActiveRecord callbacks in the models handling most of the business logic. At some point, and under a certain level complexity, the mess caused by that choice might become hard to keep under control, the risk of introducing bugs will increase and the teams(s) working on the application will be way less productive. That will most likely lead to an attempt to find a better way of designing the application. The problem, though, might be that the scope of the application is so huge that introducing any meaningful changes to the application will take weeks, if not months.
From ActiveRecord callbacks to Publish/Subscribe pattern and event-driven design #ruby #rubydeveloper #rubyonrails #activerecord #callbacks https://rubyonrails.ba/single/from-activerecord-callbacks-to-publish-subscribe-pattern-and-event-driven-design

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles