Solutions in PHPMVC-php Tutorial

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.