Comparison between JSP and ASP. PHP

Source: Internet
Author: User

Currently, the three most common dynamic web page languages are ASP (Active Server Pages), PHP (HyperText Preprocessor), and JSP (Java Server Pages ).

JSP and ASP can be embedded into HTML programs, but they are essentially different.

(1) WEB server support

Most common WEB servers, such as Apache, Netscape, and MicrosoftIIS, support JSP pages. Only Microsoft MicrosoftIIS and Personal Web Server support ASP.

(2) Support for the Platform

JSP is platform independent, as long as Java programs can run on the platform support JSP programs. The Windows platform supports ASP, but the dependency of ASP on the Win32 model makes it difficult to transplant it to other platforms.

(3) Component Model

JSP is built on reusable and cross-platform components, while ASP uses the Win32 COM component model.

(4) scripting language

JSP can use Java programming language or JavaScript as the scripting language, while ASP uses VBScript or Jscript as the scripting language.

(5) Security

JSP uses the Java security model, while ASP uses the WindowsNT security architecture.

(6) connection to the Access Database

JSP uses JDBC to establish a connection to the Access database, while ASP uses Data Acitve Object

(7) custom tags

JSP can be expanded using a custom tag library, but ASP does not have a custom tag library, and cannot be expanded.

(8) Efficiency

In the database test, JSP and ASP respectively execute 1000 Insert Update Delete operations in Oracle8. JSP takes 13 seconds, while ASP takes 73 seconds.

Comparison between JSP and PHP

JSP and PHP are both cross-platform languages that can be normally executed on Windows, UNIX, and Linux Web servers. They also support General WEB servers such as IIS and Apache. When you change the platform, you do not need to change the code. You can use it out of the box, but the two are essentially different.

(1) Applicability

JSP is suitable for large-scale e-commerce sites. It can be supported by SUN Java's Java Class and EJB, and structural support is obtained through EJB/CORBA and Application Server of many vendors, PHP lacks support of scale and multi-layer structure, and provides inconsistent Database Interface Support, making it more suitable for some small commercial sites.

(2) Database Access

JSP through JDBC technology to connect to the database, if a specific database without JDBC driver, only ODBC driver, Java can provide a JDBC-ODBC bridge to convert JDBC to ODBC call, PHP can be compiled into functions connected to multiple databases. It works perfectly with MySQL, and developers can write peripheral functions to indirectly access the database. However, the database interfaces they provide support different from each other, for example, they are different from those of Oracle, MySQL, and Sysbase.

(3) Efficiency

In the database test, JSP and ASP respectively execute 1000 Insert Update Delete operations in Oracle8. JSP takes 13 seconds, whereas PHP takes 69 seconds.

Among the three, JSP will be the trend of future development. Some of the world's major e-commerce solution providers use JSP/Servlet. For example, IBM's E-business uses the JSP/Servlet server WebSphere at the core.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.