Experience in developing large projects in PHP: php development projects
I. Variables It is best to store all the variables in an array, which brings a lot of convenience in program development, especially when the program is very large. The naming of variables should be suitable for your habits. Whether it is in pinyin or English, it should at least have a certain meaning, so as to be suitable for memory. The variable name should be normalized as much as possible and should not conflict with the keyword in PHP.
Ii. Functions PHP comes with many functions, which makes programming much easier. Of course, in large programs, we often need to define many functions, dozens or even hundreds. Of course, if you do not call a function in a program that uses the class, you should call a method. The usage of the class is not discussed here. When there are more functions, it is inevitable that they will be mixed up. Is there any way to solve this problem? The usage of the above variables is the same. Similarly, we can also put all our own function names in an array. In this way, we can check whether the function has repeated definitions at any time in the array. If you find that the phenomenon is repeated, you can change it immediately. This increases the programming speed. When using a function, you need to pay attention to global variables. Although this is a small problem, it cannot be ignored. Otherwise, when a variable calls a thousand calls, hehe. Check whether the variable has been declared as a global variable in the function.
3. Program comments Program annotations are very important. Whether it is C or JAVA, program annotations can often reflect the good programming style of programmers. Whether it is for people or themselves, it is of great benefit. Of course, we are talking about the development of large projects. The spirit of group cooperation is very important. When your program is written, it is hard for others to understand how to talk about the spirit of group cooperation. Of course, if this large project is developed by you alone, it should be another matter, or you have a short time to write comments. But in general, this situation is rare. Unless it is a very time. A good programmer will definitely add comments to every program he writes, even for himself.
4. What text editing software is used to write source programs? In fact, there is no certain rule, as long as you like it. I prefer PHPEDIT. Maybe I am used to it. Now I don't feel it when I leave PHPEDIT and write PHP. I use NOTEPAD when I am a beginner, because the program is relatively simple. So you can use NOTEPAD to cope with it. For programs with hundreds of lines, it is obviously inappropriate to use NOTEPAD. Using PHPEDIT improves productivity several times, even if you have never used it. |
Http://php.662p.com/thread-277-1-1.html
Can php develop large projects?
Of course. Facebook is built on php, and of course it achieves some performance improvement expansion.
Google also has php code
What framework is better for php to develop large projects?
Yii is good, tp. Suitable for beginners,