How to learn ThinkPHP correctly? How can I make good use of it?

Source: Internet
Author: User
During PHP learning, we often encounter the word ThinkPHP. Those who have learned PHP or who have been familiar with PHP must be familiar with ThinkPHP. Yes, she is a PHP Framework. Today, the PHPChina training department editor will show you a short "ThinkPHP

During PHP learning, we often encounter the word ThinkPHP. Those who have learned PHP or who have been familiar with PHP must be familiar with ThinkPHP. Yes, she is a PHP Framework. Today, the PHPChina training department will show you a short "ThinkPHP" tour, thinkPHP makes ThinkPHP easier and easier for you without leaving your home.

Maybe someone will think that I am advertising ThinkPHP? NONo, she is so famous that no one needs to advertise for her. Let's get down to the truth. Today, we are avoiding the "concepts", "formulas", and "rules" that make people feel uncomfortable and headaches. Indeed, these things are a piece of cake for experts. In the face of people who are new to PHP, it may be too early to talk about ThinkPHP's "concepts", "formulas", and "principles. Therefore, we will only talk about the learning method here.

To better understand and learn ThinkPHP, we need to emphasize the idea of "object-oriented.

Many children's shoes always form a process-oriented idea in learning PHP, that is, to analyze the steps needed to solve the problem, and then implement it step by step. It can be summarized as modular. What Object-oriented means is to visualize a thing. Objects include attributes and behaviors. when the program to be processed is large, the object-oriented thinking can be well reflected. For example, "What do James do today?", if we use process-oriented writing, we need to list all the events from morning to night. The requirements are highly accurate and highly repetitive in the face of errors that require troubleshooting. if we change to an object-oriented approach, we only need to take the attributes of Xiao Ming's shoes, and what he wants to do to write out the method applied to, it can use the corresponding thing, and can inherit, isn't it very convenient.

With the idea of object-oriented, ThinkPHP is far away. ThinPHP is written by Chinese people. it is aimed at the usage habits of Chinese people. compared with ZendFrameWork, ThinPHP may not be so perfect, but its flexibility is definitely applauded.

To understand ThinkPHP and better use it, in addition to the above ideas, we also need to know that another major feature of ThinkPHP is behavior ). Like what we humans do when they want to do something, ThinkPHP's "behavior" is an action or processing in the execution process. In the execution process of the framework, actions can be generated at every position. For example, routing detection is an action, static cache is an action, and user permission detection is also an action, ranging from business logic to browser detection, multi-language detection, and so on, it is even said that you want to pop up Hello, world for the first visit to your website users! These actions can be viewed as an action. the existence of actions allows you to change or add some features on the periphery without modifying the framework and application.

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.