ASP, JSP, PHP three technical comparisons

xiaoxiao2021-03-06  41

Currently, the most commonly used three dynamic web languages ​​include ASP (Active Server Pages), Javaserver Pages, PHP (Hypertext Preprocessor).

Conclude

ASP full name Active Server Pages, is a development environment of a web server, which utilizes it to generate and perform dynamic, interactive, high-performance web service applications. ASP uses scripting language Vbscript (Java Script) as its own development language.

PHP is an embedded scripting language cross-platform server-side. It borrows the syntax of C, Java and Perl, and couples PHP's own characteristics, so that web developers can quickly write up dynamic generating pages. It supports the vast majority of databases. Another point, PHP is completely free, don't spend money, you can freely download from the official site (http://www.php.net). And you can get the source code unrestricted, and you can even add the features you need.

JSP is a new generation of websites launched by Sun, Sun Company has a new fruit from the Java application and Java Applet, using the extraordinary attainments of yourself, and has new fruits from Java applications and Java Applets, JAVA Server Page. JSP can complete powerful site programs with the support of Serverlet and JavaBean.

The three provide a mixing of some kind of program code in the HTML code, and the ability to execute program code is explained by the language engine. However, the JSP code is compiled into a servlet and interpreted by the Java virtual machine, which occurs only when the JSP page is requested. In ASP, PHP, JSP environments, HTML code is mainly responsible for describing the display style of information, and the program code is used to describe processing logic. Ordinary HTML pages only depend on the web server, while ASP, PHP, JSP page requires additional language engine analysis and execution program code. The execution result of the program code is rejected into the HTML code and then sent together to the browser. ASP, PHP, JSP is both technologies for web servers, and client browsers do not need any additional software support.

Technical Features: ASP: 1. Use VBScript, JScript, etc. Simple and easy-to-understand scripting language, combine HTML code to quickly complete the application of the website. 2. No compile is compiled, easy to write, can be executed directly on the server side. 3. Use a normal text editor, such as Windows notepad, you can edit design. 4. Unrelated to the browser (Browser Independence), the client can browse the web content designed by the Active Server Pages as designed by using a browser that can perform an HTML code. The scripting languages ​​(VBScript, JScript) used by Active ServerPages are executed on the web server side, and the client's browser does not need to perform these scripting languages. 5.active Server Pages can be compatible with any ActiveX Scripting language. In addition to the use of VB Script or JScript language, other scripting languages ​​provided by third parties are used by PLUG-IN, such as REXX, Perl, TCL, etc. The script engine is an COM (Component Object Model) object for handling the script. 6. Use the server-side script to generate the client's script. 7. ActiveX Server Components has unlimited expansibility. You can use Visual Basic, Java, Visual C , COBOL and other programming languages ​​to write the ActiveX Server Component you need.

PHP: 1 Database Connection PHP can be compiled into a function that is connected to many databases. PHP and MySQL are now an excellent group combination. You can also write the peripheral function to indirect access to the database. By this way When you replace the database, you can easily modify the encoding to adapt to this change. PHPLIB is the most commonly used group of base libraries that provide general transactions. However, the database interface provided by PHP supports each other, such as the interface of Oracle, MySQL, Sybase, is different from each other. This is also a weakness of PHP. JSP: 1. Separate the generation and display of the content Use JSP technology, and web page developers can use HTML or XML identity to design and format the final page. Use the JSP ID or the small script to generate dynamic content on the page. The logic generated by the content is packaged in the identification and JavaBeans group, and bundled in a small script, all scripts executed on the server. If the core logic is encapsulated in the identity and beans, then other people, such as web managers and page designers, can edit and use the JSP page without affecting the generation of content. On the server side, the JSP engine explains the JSP ID, generates the requested content (for example, by accessing the JavaBeans group component, using the JDBC technology to access the database), and send the result in the form of an HTML (or XML) page back to the browser . This helps the author to protect your code, and guarantee any HTML-based web browser full availability.

2. Emphasize that the large number of JSP pages that can be reused groups depends on a reusable and cross-platform component (such as JavaBeans or Enterprise JavaBeans) to perform more complex processing required by the application. Developers are able to share and exchange components that perform normal operations or make these components for more users or user groups. Component-based methods accelerate the overall development process and make various group organizations balance in their existing skills and optimization results.

3. Adopting Simplified page Development Web page developers will not be a programming staff who are familiar with scripting languages. JavaServer Page technology has a number of functions that are used in ease of use, dynamic content is generated in the XML identity associated with JSP. Standard JSP Identifies to access and instantiate the JavaBeans component, set, or retrieve group component properties, download applets, and how to perform other methods is more difficult to encode and time consuming. JSP technology can be extended by developing customized logo depots. In the future, third-party developers and other personnel can establish their own logo for common functions. This allows web page developers to operate using familiar tools and components that perform specific functions like identifiers. JSP technology is easy to integrate into a variety of application architecture to utilize existing tools and techniques, and extend to support enterprise-class distributed applications. As part of the Java technical family, as well as a member of Java 2ee, JSP technology supports highly complex web-based applications. Since the built-in scripting language of the JSP page is based on the Java programming language, and all JSP pages are compiled into Java Servlet, the JSP page has all the benefits of Java technology, including robust storage management and security. As part of the Java platform, JSP has the characteristics of the Java programming language "once written, execution". As more and more suppliers add JSP support to their products, you can use your own servers and tools, modifying tools, or servers, do not affect current applications.

Applications: ASP is the dynamic web language developed by Microsoft, which inherits the consistent tradition of Microsoft products, can only be performed on Microsoft's server products, IIS (Internet Information Server) (Windows NT), and PWS (Personal Web Server) (Windows 98) )on. Under UNIX, there is also a component of Chilisoft to support the ASP, but the ability of the ASP itself is limited, and must be expanded through the group combination of ASP COM. It is very difficult to implement the COM under Unix. PHP3 can be performed normally on Windows, UNIX, Linux web servers, but also supports IIS, Apache, etc., when the user replaces the platform, there is no need to change the php3 code, you can use it.

JSP is similar to PHP3, almost performed on all platforms. Such as WIN NT, Linux, UNIX. The JSP can be supported by an additional server, such as JRUN or ServleTexec, in NT. Well-known web server Apache has been able to support JSP. Since Apache is widely used in NT, UNIX, and Linux, JSP has a wider range of execution platforms. Although the NT operating system now accounts for a large market share, the advantages of UNIX in the server are still very large, and the new rise Linux is not small. Migrating from one platform to another platform, JSP and Javabean do not even recompile because Java bytecodes are standard with platform-independent.

Performance Comparison: Some people have done their tests, doing back ring performance testing and accessing Oracle database testing for these three languages. In the cycle performance test, JSP only ended the round of 20000 * 20,000 in four seconds. ASP, PHP test is 2000 * 2000 loop (less orders), but use 63 seconds and 84 seconds, respectively. (Refer to PHPLIB). In the database test, the three are 1000 internal INSERT, UPDATE, SELECT, and DELETE: JSP for Oracle 8, respectively, and PHP takes 69 seconds, and ASP takes 73 seconds.

Prospect analysis: The current domestic PHP and ASP applications are widely used. JSP is a less than a new technology. However, in foreign countries, JSP is already a popular technology, especially the website of e-commerce, and use JSP. PHP's website such as Sina.com, China, etc., but because some of the shortcomings exist in PHP itself, it is not suitable for large-scale e-commerce sites, while more suitable for small business sites. First, PHP lacks scale support. Second, lack of multi-layer structural support. For large load sites, the solution is only one: distribution calculation. The database, the application logic layer, indicates that the logic layer is separated from each other, and the same layer can also be separated from the flow, and the group forms a two-dimensional array. And PHP lacks this support. There is also a point mentioned above, the database interface provided by PHP does not unify, which makes it not suitable for e-commerce.

ASP and JSP do not have the above defects, ASP can get ActiveX size support through Microsoft WindowsD COM / DCOM, access to structural support through DCOM and Transcation Server; JSP can get scale support through Sun Java Java Class and EJB, through EJB / CORBA and Many vendors' Application Server obtains structural support. Among the three, JSP should be the trend of future development. Some large e-commerce solution providers in the world use JSP / servlet. Compared to IBM's E-Business, its core is a Web Sphere with JSP / Servlet. They are all supported by CGI. But after October last year, it launched Enfinity, an e-commerce Application Server using JSP / Servlet, and the reprovice no longer develops traditional software. In short, ASP, PHP, and JSP have a considerable number of supporters, which can also be seen that all of them have. Friends who are learning or using dynamic pages can choose a language suitable for yourself according to the characteristics of the three. Transfer from: http://www.blog.edu.cn/more.asp?name=ntu&id=52982

转载请注明原文地址:https://www.9cbs.com/read-53180.html

New Post(0)