Extending Ruby on Rails with Service Objects
blog.harigopal.in
Extending Ruby on Rails with Service Objects
1–2 of 2 posts
Re: Extending Ruby on Rails with Service Objects
#2The classic Model-View-Controller (MVC) method generally asks the programmer to put business logic in the model. This is sound advice for a small-to-medium size project, allowing a modicum of clarity and relative ease of testing, compared to business logic spread across controllers. However, as the number of problems your business tackles increases, bloating of the model is inevitable.
The service object pattern allieviates this with a back-to-the-roots approach, asking you to encapsulate different pieces of business logic in its own little container - each easy to understand, test, use, and re-use.