Home Backend Development PHP Tutorial 7 abilities that you should have when developing PHP

7 abilities that you should have when developing PHP

Aug 08, 2016 am 09:33 AM
apache linux mysql nbsp php

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.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP: Handling Databases and Server-Side Logic PHP: Handling Databases and Server-Side Logic Apr 15, 2025 am 12:15 AM

PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

Detailed explanation of docker principle Detailed explanation of docker principle Apr 14, 2025 pm 11:57 PM

Docker uses Linux kernel features to provide an efficient and isolated application running environment. Its working principle is as follows: 1. The mirror is used as a read-only template, which contains everything you need to run the application; 2. The Union File System (UnionFS) stacks multiple file systems, only storing the differences, saving space and speeding up; 3. The daemon manages the mirrors and containers, and the client uses them for interaction; 4. Namespaces and cgroups implement container isolation and resource limitations; 5. Multiple network modes support container interconnection. Only by understanding these core concepts can you better utilize Docker.

PHP and Python: Code Examples and Comparison PHP and Python: Code Examples and Comparison Apr 15, 2025 am 12:07 AM

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP's Purpose: Building Dynamic Websites PHP's Purpose: Building Dynamic Websites Apr 15, 2025 am 12:18 AM

PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

How to use docker desktop How to use docker desktop Apr 15, 2025 am 11:45 AM

How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

How to call docker lnmp How to call docker lnmp Apr 15, 2025 am 11:15 AM

Docker LNMP container call steps: Run the container: docker run -d --name lnmp-container -p 80:80 -p 443:443 lnmp-stack to get the container IP: docker inspect lnmp-container | grep IPAddress access website: http://<Container IP>/index.phpSSH access: docker exec -it lnmp-container bash access MySQL: mysql -u roo

vscode cannot install extension vscode cannot install extension Apr 15, 2025 pm 07:18 PM

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

Choosing Between NGINX and Apache: The Right Fit for Your Needs Choosing Between NGINX and Apache: The Right Fit for Your Needs Apr 15, 2025 am 12:04 AM

NGINX and Apache have their own advantages and disadvantages and are suitable for different scenarios. 1.NGINX is suitable for high concurrency and low resource consumption scenarios. 2. Apache is suitable for scenarios where complex configurations and rich modules are required. By comparing their core features, performance differences, and best practices, you can help you choose the server software that best suits your needs.

See all articles