Home  >  Article  >  Backend Development  >  What is the difference between jsp, php and asp?

What is the difference between jsp, php and asp?

青灯夜游
青灯夜游Original
2020-07-18 12:02:095143browse

Differences: 1. The containers are different. ASP is generally IIS, JSP is generally an execution container that complies with JEE specifications, and PHP is of course its official interpreter; 2. ASP’s dynamic code languages ​​are mainly C# and VB. JSP is Java, and PHP is of course a customized PHP language; 3. PHP is completely free.

What is the difference between jsp, php and asp?

The difference between jsp, php, and asp

1. Ease of learning

asp>php>jsp, jsp is the hardest to learn

2. Operation efficiency

jsp>php>asp jsp is the most efficient, and the efficiency of compiled PHP is not lower than jsp

3. Current widespread application:

asp>php>jsp

4. Development efficiency

asp>php>jsp, if PHP is used Template technology makes PHP more efficient when developing large sites.

5. Free

php is completely free.

6. In terms of external form,

  • containers are different. ASP is generally IIS, JSP is generally an execution container that conforms to JEE specifications, and PHP is of course its official interpreter. .

  • The languages ​​are different. ASP’s dynamic code languages ​​are mainly C# and VB, JSP is Java, and PHP is of course a customized PHP language

Extended information:

PHP

PHP (HypertextPreprocessor) is a scripting language embedded in HTML pages. It borrows a lot of syntax from C and Perl languages, and combines it with PHP's own features to enable Web developers to quickly write dynamically generated pages.

PHP is a completely free open source product that does not cost money. Apache and MYSQL are also free and open source. They are very popular abroad. When used together, PHP and MYSQL can quickly build a good dynamic website system. , so most foreign host systems are equipped with free APACHE + PHP + MYSQL. It is generally believed that the execution efficiency of this combination is higher than that of IIS+ASP+ACCESS, and the use of the latter requires additional payment to Microsoft.

PHP's syntax is very similar to Perl, but PHP contains far more functions than Perl. PHP does not have a namespace, so you must work hard to avoid module name conflicts when programming. Although an open source language requires simple syntax and rich functions, the inherent flaws in PHP's internal structure make PHP unsuitable for writing websites larger than small and medium-sized amateur websites.

Successful cases of PHP development:

MediaWiki-the famous Wikipedia (Wiki) program. It is incredible that such a huge entry can be supported by only PHP + MYSQL.

WordPress—a well-known blog system that is not inferior to MovableType in terms of functionality. Many users have transferred from MovableType to WordPress.

Conclusion: PHP syntax is simple, very easy to learn and use, and is very conducive to the rapid development of various customized websites with different functions. Due to PHP's structural flaws, the development and maintenance of PHP on complex large-scale projects are difficult. more difficult.

ASP

ASP (ActiveServerPages) is a scripting language that comes with Microsoft's Windows IIS system, which can be used to execute dynamic Web service applications. The syntax of ASP is very similar to Visual BASIC. People who have learned VB can get started quickly. ASP is also the easiest to learn development language among these scripting languages. But ASP is also the only one among these languages ​​that cannot support cross-platform well.

Because the ASP script language is very simple, its code is also simple and easy to understand. Combined with HTML code, the website application can be quickly completed.

ASP is extremely popular in China, because most of them use pirated Windows and pirated SQL Server, and ASP+COM+SQLServer is actually a good combination, and its performance is not inferior to PHP MYSQL, especially Windows systems Both SQL Server and SQL Server have graphical interfaces, which are easier to maintain than APACHE and MYSQL. Therefore, it is also a good choice for countries that do not pay attention to intellectual property rights.

However, just because ASP is very simple, the functions that can be accomplished simply by using ASP are also limited. Fortunately, COM (ComponentObjectModel) technology has saved ASP. Microsoft has provided COM/DCOM technology, which has greatly broadened the scope of ASP. The scope of application of ASP makes ASP almost infinitely scalable.

Conclusion: Like PHP, ASP is simple and easy to maintain, and is very suitable for small website applications. Through DCOM and MTS technology, ASP can even complete small-scale enterprise applications, but the fatal disadvantage of ASP is that it does not support cross-platform application. Platform systems are very difficult to develop and maintain in large-scale projects.

JSP

JSP (JavaServerPages) is a dynamic web page technology launched by Sun. JSP technology uses Java language as the scripting language, and people who are familiar with JAVA language can get started quickly.

Although JSP itself is also a scripting language, it is essentially different from PHP and ASP. Both PHP and ASP are interpreted and executed by language engines, while JSP code is compiled into Servlets and executed by the Java virtual machine. This compilation operation only occurs on the first request for a JSP page. Therefore, it is generally believed that the execution efficiency of JSP is higher than that of PHP and ASP.

JSP is a server-side scripting language. The biggest advantage is that development efficiency is high. JSP can use JavaBeans or EJB (EnterpriseJavaBeans) to perform more complex processing required by the application. However, this website architecture is The business rule code and page code are mixed together, which is not conducive to maintenance. Therefore, it is not suitable for the requirements of large-scale applications. It is replaced by a Web architecture based on MVC.

The core idea of ​​MVC is to divide the application into three parts: model, view and controller. The model refers to the application's data and the operations on this data; the view refers to the user interface; and the controller is responsible for synchronization between the user interface and program data.

Through the MVC Web architecture, the coupling relationship between various parts can be weakened and the business logic processing can be separated from the page and data. In this way, when the code of one module changes, it does not affect the other modules. Normal operation, so the MVC-based Web architecture is more suitable for the trend of large-scale application development.

Therefore, many foreign large-scale enterprise systems and business systems use the above MVC architecture, which can support highly complex large-scale Web-based applications.

Recommended tutorial: "php tutorial"

The above is the detailed content of What is the difference between jsp, php and asp?. 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