My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

What is the best alternative to "managers"?

Sergio's photo
Sergio
·Aug 25, 2016

I read in some sites and articles, that using something like the "Managers" or classes with a lot of dependencies it's a bad practice.

So for example if i have a controller, and a repository and need to get the data of the database and make some changes or modifications and return to the controller to send the response, what is the best way?

Making one class for action? Make a class for functionality? making something like event domains? What is your approach on this?

FYI I'm using PHP in my current job. Any idea is welcome :)