How to learn the source code of PHP open source project more effectively

Source: Internet
Author: User
Tags php open source project

One. First install the source code, combined with its documentation and manuals, familiar with its function and its application.

Two. Browse the directory structure of the source code to understand the capabilities of each directory.

Three. After the above two steps to believe that you have a preliminary understanding of the open source products, then start to analyze its source bar now. In this step we begin to analyze the source code framework. For example, the entry method is a single entry or multi-entry, the page between the call rules, can be based on the rules to find a function of the page.

Four. Familiar with the code writing style of the source code, such as indentation, typesetting format and so on.

Five. Familiarize yourself with the database and tables used in the source code, and refer to its technical support documentation.

Six. After the above steps believe that we have a more profound understanding of the source code, but this understanding is only superficial, down we from 6 aspects of the specific analysis it:
1. The entry structure and the specific implementation of the page invocation method, if you see the tool class and tool functions, try to familiarize yourself with it. This step of the analysis can learn the source code of the system architecture mode.
2. Analyze the tool classes and tool functions used in the source code, so you can learn a lot of programming techniques. You can improve your own programming skill.
3. Combine some security rules to study how this source code is designed for security. This can improve their awareness and skill in safety.
4. If you have a template engine, look at the source code template engine. Roughly from the implementation of the way, efficiency, ease of use and other aspects to consider.
5. Research the various functional modules of the system, so as to learn programming skills can also open their own programming ideas, the next time you encounter something similar to the heart has a spectrum.
6. The research system uses the design pattern, the same function realization, uses the design pattern to be possible to be different, compares the East analysis design pattern which we previously made, is enhances our harness code the only way.
7. Study the source code on Access pressure, execution efficiency, system efficiency, database query optimization.

Jdhu Tags: my blog

How to learn the source code of PHP open source project more effectively

Related Article

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.