Comment

Comment by g3mo

The 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.

parent g3mo 9 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton