Answer the question
In order to leave comments, you need to log in
How to design a department module that would have department employees + a brief description of the department under ZF2?
Excuse, please, for the possibly (or rather not possible, but it is), stupid title of the question.
The answer itself is obvious. There are departments, there is a description of the departments, there is an employee, there is a description of the employee, there is a connection between the department and the employee. Everything is simple.
Another question is how to code it later on zf2.
ZF2 consists of modules. This is where the questions arise: write 1 large and mostrous module that would be responsible for everything or write a module for departments directly and a module that would work with users and somehow connect them to each other? Is it possible to code it on ZF2 later?
I am new to zf2. I'm trying to poke, I'm learning with midget steps, that's why such questions appear. Actually, the question here is not about design, but about whether it can be organized on zf2 or, rather, how BETTER to organize such a subject area. As for implementation, if there are any questions, then later, at the moment, such an organizational issue is of interest.
Please advise :)
Answer the question
In order to leave comments, you need to log in
I see the following options:
1. Write the application as a single module.
2. Write an application in the form of two modules, each of which requires the obligatory presence of another module.
3. Write an application in the form of two modules, each of which can work both independently and in conjunction with another module (if one is installed in the system).
The first and second options are almost equivalent (there will be no monstrosity in the first option if the same attention is paid to the design of the application structure as in the second case).
In my opinion, the second option should be used only if such a separation is required by some organizational conditions (for example, if modules are developed by different developers who, for some reason, cannot work together within a single application).
The third option, respectively, will increase development costs due to writing additional code (you will need to write code both for the situation when one module works in tandem with another, and for the situation when one module works in isolation from another).
In general, if it comes from the condition of the problem that these two modules will work in pairs and only in pairs (i.e., initially complete isolation is not laid down), then, in my opinion, there is no point in dividing such an application into modules.
In my opinion, writing two modules for such a trivial task is like writing a new module for every new web page. I wrote such a thing (however, 5 years ago, back on ZF 1. *), there is nothing unusual there, I would recommend that you better think about the database architecture.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question