7 abilities that you should have when developing PHP
1. PHP ability
1. In the understanding stage, you can write some code, because you did it with the help of the manual and google. Variables are defined randomly, and many functions are unknown. It is very slow to do things. I write whatever comes to my mind. The code is written in a mess, and later maintenance is very troublesome.
2. In the familiarization stage, check functions frequently. You may have read the manual once or twice. You will basically understand all the commonly used functions. Later maintenance brings you a lot of pain. You start to find that your code has many shortcomings. You start to think about how to improve your code and how to plan your code from the perspective of the project, instead of writing whatever you think of and knowing how. To reduce redundant code, make your code clear, and know what kind of code is comfortable to write. Basic code specifications have been formed. In order to improve myself, I will deliberately go to some technical forums to study and research.
3. Very familiar stage. Originally I wanted to write about proficiency, but now I don’t know what level of proficiency is, and I haven’t heard anyone say that they are proficient in PHP, so I just use it to become familiar with it. At this stage, I think you have moved from process-oriented to object-oriented. Personally, I think the biggest benefit of object-oriented is that it can make the entire project functional and modular, making it very convenient for later maintenance, revision, and upgrade. Wouldn't it be the same development when there is no object-oriented approach? During this period, you have studied one or several frameworks, and combined with your actual project experience, you have been able to form your own framework in your mind. This framework is the most suitable your. And you can apply this framework to actual development to improve your development efficiency.
If when you first write code, there is someone who can constrain you to write code according to OOP ideas, then you will meet a noble person. When bad coding habits are formed, it is not easy to change them.
2. Database capabilities
If you use PHP to do projects, mysql is the most used, followed by pgsql. Because both of them are free. Haha, take mysql as an example
1. Understand stage: know what mysql is, be able to write some simple sql statements, design simple tables, and know how to use database management tools (such as: phpmyadmin)
2. Familiarity stage, know how to write efficient SQL statements, understand the principles of indexing, know how to create indexes, be able to write some stored procedures, triggers, etc., and be able to analyze and test the database through various means, such as using mysqlslap To conduct stress testing, analyze SQL statements through explain, and analyze which SQL statements really affect the operation of mysql by turning on slow query. You can use dbdesigner4 and mysql workbench to design the database, and you can query and analyze mysql environment variables in the command state. , to analyze the running status of mysql, etc.
3. Very familiar stage, very familiar with the principles of various storage engines, knowing how to optimize the storage engine by modifying the configuration file, knowing how to optimize the maximum number of connections to the database, and knowing how to optimize the I/O of mysql oBottleneck: To meet the needs of the project, add a storage engine or plug-in to the MySQL database, know how to build a database cluster, and monitor the running status of the database, etc.
Three, html, css capabilities
PHP is a scripting language. Most of the time we use PHP to make websites. Since it is a website, it must be inseparable from HTML and CSS.
1. Understanding stage: know what html tags are for, be able to write some html independently through the Internet and manuals, know what css is, and be able to write some simple styles in html, etc.
2. In the familiarization stage, you can use css to design some simple layouts, you can write css into separate files, and you are familiar with the grammatical rules of css, as well as inheritance, etc.
3. Be familiar with the stage, be able to design good CSS, and manage these CSS files well to minimize redundant code. Know how to write code that is conducive to search engine searches, such as title, h1, and h2 with relatively high weight. wait
For PHP programmers, you are not required to design a page, but if you are given a page, you must know how to modify the CSS file, not to mention HTML, which you must master.
4. js capability
If the user experience is improved, it is an important sign that a website can retain people. This requires JS
1. Understand the stage, understand the basic syntax of JS, know how to debug these programs, and be able to write some simple functions, etc.
2. In the familiarization stage, you are already familiar with the syntax, functions, regular expressions, etc. of JS. You can use JS to write some special effects, and you find that writing special effects in JS is a tiring thing. You start to try jquery, prototype, and get familiar with them. I have some understanding of the basic syntax of jquery and prototype. I am personally opposed to not learning JS and starting directly with JS frameworks such as jquery and prototype.
3. Very familiar with the stage. With the help of the framework, you can write code skillfully using OOP ideas instead of accumulating functions one by one. You can skillfully use jquery, ajax of prototype, or some ajax frameworks on the Internet, such as (ajaxrequest) , no longer directly write the active control. Able to use network resources to complete various special effects.
For large companies, there are usually js programmers, but small companies basically do not have them. They either leave it to programmers or artists to do it. Artists are generally not programmers and have no programming foundation, so it is more difficult to learn JS, but it is easier to learn jquery, because the way css controls html is basically the same as the way jquery controls html (css and jquery are the same ), so many companies leave special effects to artists.
5. Apache and other capabilities
Personally, I think that up to the table of contents, most people use apache when running PHP. Some time ago, many websites were arguing about how good NGINX is and how it is 10 times better than apache. I think it is better to try it myself. Take apache as an example
1. In the understanding stage, whether under Linux or Windows, you can install and configure Apache, and know how to add PHP modules. If the interviewer asks you why Apache can interpret PHP code, how would you answer? Understand the basic configuration of apache and be able to solve problems encountered during startup, etc.
2. Familiar stage, know how to add new modules to apache, how to perform url rewriting, anti-leeching, IP restrictions, etc.
3. Very familiar with the stage, know how to use apache to cache images, be able to use apache for load balancing, and know how to use the ab command to perform pressure, analyze logs through tools, optimize apache through analysis, and know how to build multiple Virtual host; have practical experience in common modules of apahce, etc.
Monitoring and maintenance of apache is usually done by operation and maintenance personnel or project managers. Personally, I think it is best to understand it, because this way you will not be easily fooled, and it is also very necessary for your future transformation.
Six, linux system
Why do you need to master the linux system? Most websites written in PHP run under Linux or FreeBSD. It is quite beneficial to master the Linux system for your future development. I would like to take this opportunity to thank my friend Wang Yang, who brought me into the Linux world. After entering, I discovered that the world here is very exciting. Now I basically don’t use Windows. Occasionally I will enter it when playing games. Under Linux , don’t worry about poisoning, there are very few viruses under Linux, and don’t worry, XX and XXX will scan your hard drive. Ha ha
1. In the familiarization stage, you will be able to install the Linux system and be proficient in using common commands of the system, etc.
2. In the application phase, under the Linux system, you can install and configure some necessary tools for web projects such as apache, php, mysql, svn, memcache, squid, lvs, etc., and you can analyze their status through logs. You must have some understanding of shells and be able to write some simple shell scripts, etc.
7. Ability to communicate
This point is very important, and is ignored by more and more people. In fact, being a programmer is not good at all. You spend the most time dealing with computers. Maybe it is because of this. When communicating, it is more laborious, and it is possible that My brain is constrained by the rigor of the procedures. What I say is too professional and may not be understood by others. Therefore, I usually communicate more with others, especially non-technical people, and think about problems from the other person's perspective. In this case, I think it will be much easier to communicate.
The above introduces the 7 abilities that you should have when developing PHP, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.