MVC: create a class on the M layer, create the object of the corresponding class in the C layer, and then upload it to the V layer. The V layer calls the corresponding class method using the object. Have you seen this mode? MVC: create a class on the M layer, create the object of the corresponding class in the C layer, and then upload it to the V layer. The V layer calls the corresponding class method using the object. Have you seen this mode?
Reply content:
MVC: create a class on the M layer, create the object of the corresponding class in the C layer, and then upload it to the V layer. The V layer calls the corresponding class method using the object. Have you seen this mode?
Generally, the M layer of MVC is a data model and operation method. The C layer is responsible for calling the M layer and organizing data. The final data of layer V data ..
However! The code habits of each company are different and do not strictly abide by this. As you said. Building a data object in M is only an instantiated object in C, and the V layer is called. I have seen similar code styles in a few Japanese companies, which is also allowed. So nothing ~ You only need to write according to the unified rules.
I have also seen M only declare data, C operate data, V Process + output mode. It is also quite easy to write. The key is the company's