S
S
Sergey Melodin2018-10-08 15:16:11
Zend Framework
Sergey Melodin, 2018-10-08 15:16:11

What is the difference between ServiceManager and ModuleManager?

The project uses ZF2, before that I didn’t deal with ZF at all, I’m parsing the documentation, I’m a little stuck on managers - EventManager, ServiceManager, ModuleManager. As I understand it, EventManager is just an Observer implementation for business logic, but what is the difference between ServiceManager and ModuleManager?
UPD
I found this article: https://juriansluiman.nl/article/120/using-zend-fr...
As far as I understand from it - ModuleManager sets the contract for modules, and ServiceManager uses modules according to the contract specified through ModuleManager .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
novrm, 2018-10-08
@melodyn

If we consider the project in the form of a "pyramid", then ...
At the top is a web application - the display of which is a website.
A module is a self-contained single "block" of a web application; a functionally complete php-code which can consist of models, views, controllers, services, etc... The module extends the functionality of the web application and can only function "inside" the web application.
ModuleManager - container for module manipulation.
Service - "mechanism" in the module, for manipulations between models, controllers, views, etc...
ServiceManager - a container for manipulating services.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question