PHPMVC has never touched on MVC before, but I have heard of it. later I saw a simple MVC demonstration in a book, which is interesting, so I decided to take a good look at it because the example given in this book is extremely simple, and it was translated by domestic people written by foreign people, A lot of words are hard to understand. I found relevant information on the Internet, which is also the same. no one is easy to understand. In fact, I don't have much confusion, mainly because the MODEL, VIEW, and CONTROLLER in MVC are puzzled by PHP MVC.
I have never touched on MVC before, but I have heard of it. later I saw a simple MVC demonstration in a book, which is very interesting. so I decided to study it well.
The example given in this book is extremely simple, and is translated by Chinese people written by foreign people.
Finding relevant information on the Internet is the same, and none of them can be easily understood.
In fact, I don't have much confusion. it's not clear what models, views, and controllers in MVC are responsible for. for example, if a user registers, I want to check whether the user already exists, in this case, which layer of the three-tier architecture implements the main functions?
Is the MODEL responsible for retrieving the database, returning the retrieval information, and then determining whether the user exists or not based on the returned retrieval information in the VIEW, and then calling the corresponding template to display the result?
Or is the MODEL directly responsible for determining whether the user already exists?
If it is the first method, is the MODEL only responsible for retrieving, modifying, adding, and deleting database records?
In my current understanding, the MODEL is responsible for all the validity verification, and the VIEW is only responsible for parsing and displaying the results returned by the MODEL. I don't know if this is correct.
I don't have a lot of scores now. I have to add some points when I earn some points. thank you for your answers.
------ Solution --------------------
I don't know ~~
But I can tell you for sure
In MVC, there are more than one controller ~~
Learn the framework developed with MVC