Three technical comparisons of ASP, JSP and PHP

Source: Internet
Author: User
Tags php and mysql

Three technical comparisons of ASP, JSP and PHP

Currently, the three most commonly used dynamic web languages are ASP (Active Server pages), JSP (JavaServer pages), PHP (hypertext preprocessor).
Introduction
ASP full name Active Server Pages, a Web server-side development environment, leverages it to generate and execute dynamic, interactive, high-performance Web service applications. The ASP uses scripting language VBScript (Java script) as its own development language.
PHP is a cross-platform, server-side, embedded scripting language. It borrows heavily from the syntax of the C,java and Perl languages and is coupled with PHP's own features, allowing web developers to quickly write dynamically generated pages. It supports most of the current databases. Also, PHP is completely free of charge and you can download it freely from the official PHP site (http://www.php.net). And you can gain unrestricted access to the source code, and even add the features you need.
JSP is Sun's new generation of web development language, Sun Company with its extraordinary attainments in Java, Java from Java applications and Java applets, there is a fresh fruit, is the Jsp,java Server Page. JSP can complete powerful site program with the support of Serverlet and JavaBean.
All three provide the ability to mix some kind of program code in HTML code, and the language engine to interpret the code of the Execution program. However, the JSP code is compiled into a servlet and interpreted by the Java virtual machine, which occurs only on the first request to the JSP page. In ASP, PHP, JSP environment, the HTML code is mainly responsible for describing the information display style, and the program code is used to describe the processing logic. Ordinary HTML pages rely only on Web servers, while ASP, PHP, JSP pages require additional language engine parsing and executing program code. The execution results of the program code are re-embedded in the HTML code and then sent together to the browser. ASP, PHP, JSP are Web server-oriented technology, the client browser does not require any additional software support.

Method/Step
  • ASP:
    1. Use simple, easy-to-understand scripting languages like VBScript, JScript, and HTML code to quickly complete your website's applications.
    2. No compile compilation, easy to write, can be executed directly on the server side.
    3. Use a normal text editor, such as Notepad in Windows, to edit the design.
    4. Browser-Independent (Browser independence), clients can browse the Web page content that is designed by active Server pages as long as they are using an executable HTML-code browser. The scripting language used by Active serverpages (VBScript, Jscript) is performed on the Web server side, and the client's browser does not need to be able to execute these scripting languages.
    5.Active Server pages can be compatible with any ActiveX scripting language. In addition to being designed with VB script or JScript language, other scripting languages provided by third parties, such as REXX, Perl, and Tcl, are used in a plug-in manner. The scripting engine is a COM (Component object Model) object that handles scripting.
    6. You can use the server-side script to generate the client's scripts.
    7. The ActiveX server components are infinitely extensible. You can use the visual Basic, Java, Visual C + +, COBOL, and other programming languages to write the ActiveX Server Component you need.

  • PHP:
    1 & #8226; database connections
    PHP can be compiled into functions that are connected to many databases. PHP and MySQL are now a great combination of groups. You can also write your own peripheral functions to indirectly access the database. With this approach, you can easily change the encoding to accommodate such changes when you replace the database you are using. Phplib is the most common set of base libraries that can provide general transaction needs. But PHP provides a database interface to support each other, such as the Oracle, Mysql,sybase interface, the other is not the same. This is also a weakness of PHP.

  • JSP:
    1 & #8226; Separating the production and display of content
    using JSP technology, Web page developers can use HTML or XML identifiers to design and format the final page. Use a JSP logo or a little foot to generate dynamic content on the page. The logic that produces the content is encapsulated in the identity and JavaBeans group components, and bundled in a small script, all scripts are executed on the server side. If the core logic is encapsulated in identities and beans, other people, such as web administrators and page designers, can edit and use JSP pages without affecting the creation of content. On the server side, the JSP engine interprets the JSP identity, producing the requested content (for example, accessing the database by accessing the JavaBeans cluster component, using JDBC Technology), and sending the result back to the browser as an HTML (or XML) page. This helps the author protect his code while guaranteeing full availability of any HTML-based web browser.
    2& #8226; Emphasizing reusable group components
    Most JSP pages rely on reusable and cross-platform components such as JavaBeans or Enterprise JavaBeans to perform the more complex processing required by the application. Developers can share and Exchange components that perform common operations, or make these components available to more users or user groups. The component-based approach accelerates the overall development process and enables the various groups to be balanced in their existing skills and development efforts to optimize results.

  • 3& #8226; Developing

     

    Web page developers are not all program designers who are familiar with the scripting language using identity simplification pages. JavaServer page Technology encapsulates a number of features that are required for dynamic content generation in an easy-to-use JSP-related XML identity. Standard JSP identities can access and instantiate JavaBeans components, set or retrieve group component properties, download applets, and perform functions that are more difficult to encode and time-consuming than other methods.
    JSP technology can be extended by developing a custom identity library. In the future, third-party developers and other people can build their own identity libraries for common functions. This enables Web page developers to work with familiar tools and artifacts that perform specific functions like identities. The
    JSP technology is easily integrated into a variety of application architectures to leverage existing tools and techniques and scale to distributed applications that support enterprise-wide. As part of a family of Java technologies and a member of Java 2EE, JSP technology can support highly complex web-based applications.
    because the built-in scripting language for JSP pages is based on the Java programming language, all JSP pages are compiled into Java servlet,jsp pages with all the benefits of Java technology, including robust storage management and security.
    As part of the Java platform, JSP has the Java programming language "write once, execute Everywhere" feature. As more and more vendors add JSP support to their products, you can use the servers and tools you choose, and modifying tools or servers does not affect your current applications.

     

  • Application scope
    ASP is a dynamic Web language developed by Microsoft and also inherits the tradition of Microsoft products that can only be performed on Microsoft's server products, IIS (Internet Information Server) (Windows NT) and PWS (Personal Web Server) (Windows 98). UNIX also has Chilisoft components to support ASP, but the function of the ASP itself is limited, it must be extended by the asp+com of the group combination, UNIX under the COM implementation is very difficult.
    PHP3 can be performed normally on Windows,unix,linux Web servers, and also supports generic Web servers such as Iis,apache, which can be used without changing the PHP3 code when the user changes the platform. The
    JSP is similar to PHP3 and can be executed on almost all platforms. such as Win Nt,linux,unix. Under NT, IIS can support JSP through an additional server, such as JRun or servletexec. The well-known web server Apache has been able to support JSP. Because Apache is widely used on NT, UNIX and Linux, JSP has a wider execution platform. Although the NT operating system now occupies a large market share, but the advantages of UNIX in the server is still very large, and the new rise of Linux is not small. Porting from one platform to another, JSPs and JavaBean don't even have to be recompiled, because Java bytecode is standard and platform agnostic.

  • Performance comparison
    Tests were conducted on these three languages for loop performance testing and access to Oracle database testing.
    in a cyclic performance test, the JSP ended the 20000*20000 loop with only an astonishing four seconds. And the ASP, PHP test is the 2000*2000 cycle (a few orders of magnitude), but took 63 seconds and 84 seconds respectively. (Refer to Phplib).
    in the database test, the three 1000 times for Oracle 8 Insert,update,select and delete:jsp takes 13 seconds, PHP takes 69 seconds, and ASP takes 73 seconds.

  • Prospect Analysis  
    At present, PHP and ASP are the most widely used in China. And JSP is a relatively new technology, the domestic adoption of less. However, in foreign countries, JSP is a relatively popular technology, especially e-commerce Web site, more use of JSP.
    PHP web site such as Sina (Sina), the Chinese (chinaren), but because of the shortcomings of PHP itself, making it unsuitable for large-scale e-commerce sites, and more suitable for some small business sites. First, PHP lacks scale support. Second, the lack of multi-layered structure support. For heavy duty sites, there is only one solution: distribution calculations. The database, the application logic layer, the presentation logic layer are separated from each other, and the same layer can be separated according to traffic, and the group is composed of two-dimensional arrays. and PHP lacks this support. Also mentioned above, PHP provides a database interface support is not uniform, which makes it unsuitable for use in e-commerce.
    ASP and JSP do not have the above flaw, ASP can obtain the ActiveX scale support through the com/dcom of Microsoft WINDOWSD, obtain the structure support through DCOM and transcation server; JSP can be through the sun Java Java class and EJB are supported by scale and supported by Ejb/corba and application servers from many vendors.
    Of the three, JSP should be the trend of future development. Some of the world's largest e-commerce solution providers use Jsp/servlet. The most famous e-business, such as IBM, is the core of the Jsp/servlet Web Sphere. They are all supported by CGI. But last October it launched the enfinity, an e-commerce application Server that uses Jsp/servlet, and claims to no longer develop traditional software.
    In short, asp,php,jsp all have a considerable number of supporters, which can also be seen in three strengths. Friends who are learning or using dynamic pages can choose a language that suits them according to the characteristics of the three.

    END

Three technical comparisons of ASP, JSP and PHP

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.