I personally think that if you need to extract the original business logic code or the complex business logic code to be implemented separately into a class library. MVC mainly solves the separation of view, model and user control. In actual business scenarios, it may involve more complex logical processing, such as multi-table joint query, transaction process processing, etc. These complex, relatively independent, view-independent business logic codes can be extracted into separate class libraries to provide external interfaces. Called through dependency injection or direct reference in MVC. The M in MVC just plays the role of a domain model, which may be better.
When I saw this question being asked, I wanted to say: "Idiot, idiot, what kind of JB question are you asking?" However, after thinking about it, I feel that no matter what, I should be tolerant. Here, I want to ask You, what is the business logic or foundation you are based on? Why do this? What do you think are the benefits of doing this? From this, we can analyze and answer your thoughts. Otherwise, most people don’t want to answer questions without context, especially those who work in technology. They often want to get a reason, and they will naturally think it is unreasonable. I'll scold you. Alas, let’s not talk about the following. Let me mention one thing here. If the other three layers are put into the model, it will not be called model, and it will not be called MVC. As for the situation, I can’t describe it.
I personally think that if you need to extract the original business logic code or the complex business logic code to be implemented separately into a class library.
MVC mainly solves the separation of view, model and user control. In actual business scenarios, it may involve more complex logical processing, such as multi-table joint query, transaction process processing, etc. These complex, relatively independent, view-independent business logic codes can be extracted into separate class libraries to provide external interfaces. Called through dependency injection or direct reference in MVC. The M in MVC just plays the role of a domain model, which may be better.
When I saw this question being asked, I wanted to say: "Idiot, idiot, what kind of JB question are you asking?" However, after thinking about it, I feel that no matter what, I should be tolerant. Here, I want to ask You, what is the business logic or foundation you are based on? Why do this? What do you think are the benefits of doing this? From this, we can analyze and answer your thoughts. Otherwise, most people don’t want to answer questions without context, especially those who work in technology. They often want to get a reason, and they will naturally think it is unreasonable. I'll scold you. Alas, let’s not talk about the following. Let me mention one thing here. If the other three layers are put into the model, it will not be called model, and it will not be called MVC. As for the situation, I can’t describe it.
Haha, I guess the poster has a problem with his expression skills
Integrate the other three layers in the project into the model. What’s the point of layering this way
It’s unscientific to do this. MVC is to separate the others.
Oh, if you do this, you don’t need to layer it. Why do you still need MVC...
You are an alien. . . .
2B, you still ignore it, can you ask clearly?
You can understand the concept of mvc