I recently study the source of learning Phpcms, has been studied fast for a week, the following combination of online search for some research PHP open Code Program analysis methods and their own ideas to share how to study the method of PHP code and some tips.
First, the source code must be installed, so that he can access through HTTP. Find out about the features that the app has and how the URL is being requested for distribution.
Second, browse the directory structure of the source code to understand the functions of each directory.
Third, the analysis of 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 coding style of the source code, such as variable naming method, function and class naming, indentation, typesetting format.
Five, familiar with the source code used in the database and table, if you have a reference document can 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 to analyze 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. 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. This step of the analysis can learn the source code of the system architecture mode.
2. Combine some security rules to study how this source code is designed for security. This can improve their awareness and skill in safety.
3. 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.
4. Study the various functional modules of the system, so as to learn the programming skills can also open their own programming ideas, the next encounter similar application development is handy.
5. The research system uses the design pattern, the same function realization, uses the design pattern to be different, compares the application analysis design pattern which we previously made, can greatly improve our ability to control the code.
7. Study the source code on Access pressure, execution efficiency, system efficiency, database query optimization, of course, the premise of the source of your research has to be considered in this regard.
Articles you may be interested in
- Prevent page Right-click, copy, Save As, view source files and other functions to achieve web page source code protection
- PHP implementation restricts domain names and protects source code from being copied
- How to use MVC patterns in PHP
- Programmer tips for developing large applications
- Summary of methods for generating random passwords in PHP
- 9 Promising PHP open source projects (including iphone push and phpforandroid)
- Summary of thinkphp development skills
- Men's dressing and pairing skills
http://www.bkjia.com/PHPjc/764171.html www.bkjia.com true http://www.bkjia.com/PHPjc/764171.html techarticle I recently studied the source of learning Phpcms, has been studied fast for a week, the following combination of online search for some research PHP open Code Program analysis method and share your own ideas ...