(Web Development) Faster understanding of new projects

Source: Internet
Author: User

A large project can be clearly understood in a short time. You must have some skills and methods to understand it. I don't know how other heroes know each other. Here I just want to summarize my personal thoughts and hope you will not be confused.

1. First, you must understand the directory structure of the project:

To get a project, you must first understand the file structure of the project. Sometimes, through the file structure, we can clearly understand what framework the project uses. For example, thinkphp, struct, Django, the file directory structure of these frameworks are very clear, as long as you can see the structure to understand. For previous developers, he must have his own idea about the file structure, so he needs to analyze the main role of each folder, or what is the main responsibility. The best thing is to use the files in each folder under the notes. You can use the directory tree annotation method.

2. Understand the file naming rules:

If you get a more mature project, I think the file name of the project must be standardized. Of course, for a small project, you can just do it. But for a large project, you must have certain naming rules so that developers can reach a consensus. File naming rules are generally as follows:

1. Name the class according to the folder. For example, if indexaction. php is under admin in the app folder, the class name in indexaction can be named app_admin_indexaction.

2. Based on the file name, you can directly name the class according to the class name. For example, if the class name is basemode, the class file is base_mode.php.

3. Name the file based on its role. For example, if it is a class, name is used. class. PHP. For example, if view is used, name is used. view. PHP, or name for model type. model. PHP

In fact, there are many naming rules, and the key is to check the communication and coordination between project developers, or follow the naming rules of the framework.

3. Understand the code processing process (if there is a framework, first learn the Framework ):

If there is a framework, I suggest you first learn the framework, understand the basic call relationship of the framework, and then learn about the project. I think that is a breeze.

If there is no framework, the project is still a step by step. The first step is not urgent. A general project includes an access file, index.html, index. php, index. jsp, and so on. What does it mean to catch this file? That is to say, you must understand the code of this file and do not give up easily, if the entry file is not clear, it is difficult to understand how the entire project is called and how it runs. In general, the entry file will jump to another file or contain other files. At this time, you need to know clearly. If some design patterns are used, you should first understand the design patterns. For example, MVC, most of the current development uses the MVC design pattern, and do not rule out the use of others, therefore, you must first understand some basic knowledge. For example: basic design patterns, basic frameworks, and some file structures and naming rules under those frameworks for future development and use. After learning about the project's entry file, you must be able to clearly understand how the project obtains URL Information after entering a URL, in this way, you can access the information you need.

4. Add new functions for the project based on the above items.

If you have understood the code processing process of the project, you can develop a small application based on the project. Suggestion: Add a new class, a new method, and a new page according to the file structure and naming rules. Finally, input the corresponding URL to access the data. If the desired information is successfully displayed, congratulations. You have a basic understanding of this project. The next step is to analyze the corresponding requirements and add new applications. I think if these four steps can be done well, adding new applications is just a problem of implementation, there will be no great obstacles to project awareness.

I have little project experience, but in summary, first, in order to be able to consolidate myself for future use; second, I hope our web developers can communicate with me, it allows us to learn about a new project more quickly. Third, I am very grateful to my mentor and team lead for their guidance.

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.