0

I have an PHP MVC application (the modules are not being used), and im using services as my source of information

The problem is that my controllers/services/helpers are getting bigger and i have many different service calls for any controller action (+/- 5 service call per action and im handling the information sent and received)

What can i use/do between to put it better and reduce the business logic inside controllers and services to scale my application?

Simão Lemos
  • 1,170
  • 2
  • 8
  • 14
  • This is a perfect question for [CodeReview](https://codereview.stackexchange.com), if you post the code with it. It's not a very good question for SO. – KIKO Software Sep 02 '17 at 23:03

1 Answers1

2

For the side of services - start looking at concepts of domain objects and data mappers.

As for controllers - they should actually have no business logic in them at all. If you do not have separation between views and controller (e.g. you are referring to your templates as "views"), then they might have some presentation logic in them, but that's it. The other suggestion would be start separating those both parts. This post might help a bit.

P.S. I have no clue about how phalcon does things

tereško
  • 58,060
  • 25
  • 98
  • 150