Php class-what do you think of the PHP framework for the first time? For example, what I see now: thinkPHP framework?

Source: Internet
Author: User
For example, the first time I read the PHP framework, I don't know where to start. For example, thinkphp. 1: What should I look at if there are so many files in it? Isn't it because every file has been retried? 2: What is the order of view? Because the files are organized in a certain order, I don't know how to sort out a framework. For example, the first time I read the PHP framework, I don't know where to start. For example, thinkphp.

1: What should I look at if there are so many files in it? Isn't it because every file has been retried?

2: What is the order of view? Since the files are organized in a certain order, I don't know how to sort out the structural order of a framework?

3: How long does it take to look at a framework?

4: to what extent is a basic understanding of a framework?

5: Can you tell us the differences between mainstream PHP frameworks? Which one can be selected )?

The first time I came into contact with the framework, I hope you can talk about the experience.

Reply content:

For example, the first time I read the PHP framework, I don't know where to start. For example, thinkphp.

1: What should I look at if there are so many files in it? Isn't it because every file has been retried?

2: What is the order of view? Since the files are organized in a certain order, I don't know how to sort out the structural order of a framework?

3: How long does it take to look at a framework?

4: to what extent is a basic understanding of a framework?

5: Can you tell us the differences between mainstream PHP frameworks? Which one can be selected )?

The first time I came into contact with the framework, I hope you can talk about the experience.

1. First, read the full TP manual from the beginning, and then go to the official website to view the knowledge under the "tutorial ".
2. Read all the knowledge in Section 1, read a project written using the TP framework, and sort out the ideas based on the functions one by one. After reading these ideas, you will basically know how to use TP.
3. Based on your own needs, there is no clear time, mainly depending on the degree to which you want to master, the speed of reading, and the ability to learn, it is fast to learn, but it does not need to be well mastered. It is very fast to simply add, delete, query, and modify data.
4. You can create a simple project on your own to implement some basic functions.
5. I am not doing PHP development based on myself. Currently, only TP is available, but the framework that I want to talk about is different from each other. You can search Baidu for it, you need to select the framework suitable for your project based on your project. If it is not the best framework, it is suitable for your project.

The above blue baby @ blueangel has already answered a lot in detail, so let me talk about common framework things. symfony is said to be something php should have mastered, familiar with various frameworks. Generally, enterprises use the Yii framework. I am using the Yii framework and Laravel framework. The Yii framework is used at the company. Laravel is used at home. For Beginners, I suggest you master the ThinkPHP framework idea first. I suggest you first master the latest ThinkPHP framework, then read the previous framework manual or code, and compare it to find out what is wrong with the design of the previous framework, where is the latest Thinkphp framework? This step is to familiarize yourself with the framework design ideas, at least the Thinkphp framework design ideas. After a year, the advanced Yii framework, the Laravel framework, and even the Symfony framework are both very fast. By the way, large enterprise sites usually use the Yaf framework developed by @ Laruence, I have never used the Yaf framework. I forgot whether it is the underlying php framework developed in C or C ++.

Read the code of some sample projects from the beginning in the order of official documents. I learned codeignitet and symfony.

The first layer will be used. All of the above are clear.
On the second layer, you can view the source code of the framework and have a clear understanding of the system running process, such as the system process of thinkphp.

The third layer is write, which can be rewritten, or even written by yourself.

However, I wrote thinkphp projects for two or three years. The second layer has not been learned yet...

Starting from the entry file, check which files are called for the display of a page and understand the framework logic.

The next IDE usually has code redirection. From the entrance file, you can see that you have run the process once. If you use TP, you will see the querying between query_string and the controller. When will the route take effect, then to the Controller, the controller is followed by the template 'compilation '. I forgot about it.
The var_dump method is incomprehensible.
After running the process again, you can take a look at the relevant driver (cache, DB, etc.) in TP and the code of the model class.
If you do not want to solve the problem, you can go through it in two days.

First read the document, follow the process to trace the code, and keep chasing the controller. This is a step-by-step process.

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.