Home  >  Article  >  Backend Development  >  What is the difference between web and php

What is the difference between web and php

WBOY
WBOYOriginal
2021-12-27 10:16:354274browse

The difference between web and php: 1. PHP is mainly used for back-end processing of data and operation of adding, deleting, modifying and checking data, while the web front-end is used to display the interface and data to users; 2. PHP runs and interprets on the server , the web front-end is mainly solved by the browser; 3. PHP should consider efficiency and security, while the web front-end should pay more attention to operability and beauty.

What is the difference between web and php

The operating environment of this tutorial: Windows 10 system, PHP version 7.1, DELL G3 computer.

What is the difference between web and php

One backend and one frontend, this is the biggest difference. If you want to be more detailed, you can say this:

  • 1. The functions are different. PHP is mainly used for back-end data processing and data manipulation, adding, deleting, modifying and checking. The html, js, css, etc. included in the web front end are used to display the interface and data to the user.

  • 2. The syntax is different, and the running environment or location is different. PHP is run and interpreted on the server, and the front-end is mainly solved by the browser.

  • 3. There are different aspects to consider. PHP needs to consider efficiency and security more, while the front-end needs to pay more attention to operability and beauty.

The difference between PHP development and web front-end development

  • 1. Different business application scenarios

Web front-end development mainly refers to traditional PC-side web development. Pages are mainly run in PC-side browsers. Pages developed in PHP are mainly run on mobile phones. Intuitively, you will feel that the PC page is larger and the mobile page is smaller. However, according to development experience, a large page does not mean that the written code is complicated, and a small page does not mean that the development is simple. The difficulty or ease mainly depends on Specific business needs.

  • 2. The use of new technologies is different

Since the mobile terminal is mainly based on the webkit kernel, support for new technologies such as HTML5 is more Good, so new technologies can be used on a wider scale; PC development requires compatibility with older versions of browsers such as IE in many scenarios. Due to browser compatibility considerations, the use of new technologies is restricted in some cases.

  • 3. Page adaptability is different

Traditional PC-side page development generally chooses to set a fixed width for the page, with both sides There is a blank space, but the mobile page has a much smaller mobile screen than the PC, so it is generally chosen to display as much content as possible on the mobile screen. This requires the mobile page to be able to fully adapt to mobile phones of various screen sizes and Make the most of it.

  • 4. Page performance is different

The network conditions on the PC side are generally relatively stable, and they are all connected to the network through network cables or Wi-Fi; however, The mobile side is more complicated. In addition to Wi-Fi, there are also 2G, 3G, 4G, and even switching between several different network connections often occurs.

The challenge that unstable network connections bring to page performance is that the page resources on the mobile side should not be too large, otherwise the page will be inaccessible under poor network conditions, seriously affecting the user experience.

  • 5. Different frame selections

Due to the instability of the mobile network, when we select the mobile page frame, Generally, only small and beautiful frameworks are considered. For example, zepto.js only has 9.6K after compression, which can meet the needs of general business. If you want to build a more complex single-page application, you can choose a framework like vue.js. , powerful, but the volume is only over 20K after compression.

The web side has a relatively large range of choices, and some heavier frameworks can also be considered based on project needs. For example, the ancient but huge ext.js is still active in some enterprises with its many UI components. In the background management system project.

If you are interested, you can click on "PHP Video Tutorial" to learn more about PHP knowledge.

The above is the detailed content of What is the difference between web and php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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