Beginner: After learning the PHPSmarty template, MVC framework mode, and thinkPHP framework, I feel that it is very troublesome to build a website. I don't know how to deploy the website. how can I use modular design to design the website? thank you for your learning experience !!! Previously, we changed the front-end html to... for beginners:
After learning the PHP Smarty template, MVC framework pattern, and thinkPHP framework, I feel that it is very troublesome to build a website. I don't know how to deploy the website. how can I use modular design to design the website? thank you for your learning experience !!!
Previously, I directly changed the front-end html to PHP, which is easy to understand and use. I don't feel any trouble. I also know that projects will have to be modeled and quickly designed in the future, but I feel that I will not solve the problem in an instant.
Reply content:
Beginners:
After learning the PHP Smarty template, MVC framework pattern, and thinkPHP framework, I feel that it is very troublesome to build a website. I don't know how to deploy the website. how can I use modular design to design the website? thank you for your learning experience !!!
Previously, I directly changed the front-end html to PHP, which is easy to understand and use. I don't feel any trouble. I also know that projects will have to be modeled and quickly designed in the future, but I feel that I will not solve the problem in an instant.
Controller
The controller focuses on data and logic (backend)
View
The template focuses on data presentation and page layout (front-end)
Model
Focus on database interaction (backend)
Separate the three layers.
There are also modular settings in TP. each module can complete some unique functions, such:
User
The module focuses on user registration, logon, password retrieval, data editing, and social login verification,
Invoice
The module focuses on creating, displaying, and changing orders,
Payment
The module focuses on unified collection, order payment, and order refund.
Each module has its ownModel
View
Controller
.
Multiple modules form your own APP, which is your website.
For example, add one of the three modules.Product
The module can form a basic Mall APP.
Thinkphp documents are detailed and suitable for Chinese users.
You only need to understand PHP syntax, understand MVC in depth, read the sample code, and write the CURD application within 1-2 weeks.