A Web application, MVC architecture, from the controller, is the getter method of the model called, the result of which must be processed by the helper class method ? The helper class is initialized by the surrounding framework, with the addition to the DI container, the instance is obtained manually.

Question: where do I need to embed a call highlighted in bold? In the controller or in the model (issued it as a new property)?

Those. questions:

  • How thick can a getter be in a model? Is he in this case fat?

  • Is the dependence of the model on the сервиса (albeit acting as a helper) antipattern?

  • What kind of method? - etki
  • Formation of a full url of a picture by file name - hellboy
  • The formation logic depends on a heap of configuration parameters. - hellboy
  • Specification: the method is called both in the controller and in the form - hellboy
  • The conditional getter can be quite thick, the borders here are rather blurred, and it is wrong to prohibit the creation of additional getters with a little processing. Another thing is that if at this moment the host is substituted in the URL, then for me such an operation would be unacceptable, because The image storage area does not have to know a particular host, although this statement is also true within my programming paradigm. I would first of all separate the concept of the model from the directly stored entity, and then all dependencies could be stored in the repository, -> - etki

0