Recommended: A free simple chat room source code chat.html The following is the referenced content: <html> <head><title>Chat</title></head> <frameset rows=*,100> &
At present, the three most commonly used dynamic web languages are ASP (Active Server Pages), JSP (JavaServer Pages), and PHP (Hypertext Preprocessor).
Introduction
ASP full name Active Server Pages is a WEB server-side development environment that can generate and execute dynamic, interactive, and high-performance WEB service applications. ASP uses the scripting language VBScript (Java script) as its development language.
PHP is a cross-platform server-side embedded scripting language. It borrows a lot of syntax from C, Java and Perl languages, and couples PHP's own features, allowing WEB developers to quickly write dynamically generated pages. It supports most databases at present. Another point is that PHP is completely free and you don’t have to spend money. You can download it freely from the official PHP site (http://www.php.net). And you can get the source code without restrictions, and you can even add the features you need from it.
JSP is a new generation of website development language launched by Sun. Sun has taken advantage of its extraordinary achievements in Java to bring Java from Java applications and Java Applets to new fruits, namely JSP and Java Server Page. JSP can complete powerful site programs with the support of Serverlets and JavaBeans. All three provide the ability to mix some program code in HTML code and interpret and execute program code by the language engine. But the JSP code is compiled into a servlet and is interpreted and executed by a Java virtual machine. This compilation operation only occurs on the first request to the JSP page. In ASP, PHP, and JSP environments, HTML code is mainly responsible for describing the display style of information, while program code is used to describe processing logic. Ordinary HTML pages only rely on the web server, while ASP, PHP, and JSP pages require additional language engine analysis and execution program code. The execution results of the program code are re-embedded into the HTML code and sent to the browser together. ASP, PHP, and JSP are all web server-oriented technologies, and client browsers do not require any additional software support.
Technical Features
ASP:
1. Use simple and easy-to-understand scripting languages such as VBScript and JScript, combined with HTML code to quickly complete the website's application.
2. No compile is required, it is easy to write and can be executed directly on the server side.
3. Use a normal text editor, such as Windows Notepad, to edit and design.
4. Browser Independence is not related to the browser. The client can browse the web page content designed by Active Server Pages as long as it uses a browser that can execute HTML code. The scripting languages (VBScript and Jscript) used by Active ServerPages are all executed 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 using VB Script or JScript languages, other scripting languages provided by third parties can also be used through plug-in, such as REXX, Perl, Tcl, etc. The script engine is a COM (Component Object Model) object that handles script programs.
6. Server-side scripts can be used to generate client-side scripts.
7. ActiveX Server Components (ActiveX Server Components) have unlimited scalability. 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 functions that have connections to many databases. PHP and MySQL are the best group combinations now. You can also write peripheral functions yourself to indirectly access the database. In this way, when you change the database you are using, you can easily modify the encoding to accommodate such changes. PHPLIB is the most commonly used series of base libraries that can provide general transactions. However, the database interfaces provided by PHP support are not unified, such as Oracle, MySQL, and Sybase interfaces, which are different from each other. This is also a weakness of PHP.
JSP:
1? Separate the generation and display of content
Using JSP technology, web page developers can use HTML or XML logos to design and format the final page. Use JSP identifiers or small scripts to generate dynamic content on the page. The logic that generates content is encapsulated in the identity and JavaBeans group components and is bundled in small scripts, all scripts executed on the server side. If the core logic is encapsulated in the logo and beans, others, such as web administrators and page designers, can edit and use JSP pages without affecting the production of content. On the server side, the JSP engine interprets the JSP identity, generates the requested content (for example, accessing JavaBeans group components, using JDBC technology to access the database), and sends the result back to the browser as an HTML (or XML) page. This helps the author protect his own code while ensuring full availability of any HTML-based web browser. 2? Emphasize reusable group components
Most JSP pages rely on reusable and cross-platform components (such as JavaBeans or Enterprise JavaBeans) to perform more complex processing required by the application. Developers can share and exchange components that perform ordinary operations, or make these components use by more users or user groups. The component-based approach accelerates the overall development process and balances the development efforts of various groups in their existing skills and optimization results. 3?Use logos to simplify page development
Web page developers are not all programmers who are familiar with scripting languages. JavaServer Page technology encapsulates many features that are required to generate dynamic content in easy-to-use, JSP-related XML identifiers. Standard JSP identifiers can access and instantiate JavaBeans components, set or retrieve group component properties, download Applets, and execute functions that are more difficult to encode and time consuming using other methods. By developing a customized identification library, JSP technology can be extended. In the future, third-party developers and others can establish their own identity databases for common features. This enables web page developers to work with familiar tools and components that perform specific functions as if they were identified. JSP technology is easily integrated into a variety of application architectures to leverage existing tools and techniques and extend to support enterprise-level distributed applications. As part of the Java technology family and a member of Java 2EE, JSP technology is able to support highly complex web-based applications. Since the built-in scripting language of JSP pages is based on the Java programming language, and all JSP pages are compiled into Java Servlets, JSP pages have all the benefits of Java technology, including robust storage management and security.
As part of the Java platform, JSP has the characteristics of writing the Java programming language at one time and executing it everywhere. As more and more vendors add JSP support to their products, you can use the servers and tools of your choice, modifying the tool or server does not affect your current application.
Application scope ASP is a dynamic web language developed by Microsoft. It also inherits the consistent tradition of Microsoft products and can only be executed on Microsoft's server products, IIS (Internet Information Server) (windows NT) and PWS (Personal Web Server) (windows 98). There are also ChiliSoft components to support ASP under Unix, but the functions of ASP itself are limited and must be expanded through the ASP+COM group combination. It is very difficult to implement COM under Unix. PHP3 can be executed normally on Windows, Unix, and Linux web servers, and also supports general web servers such as IIS and Apache. When users change the platform, they do not need to change the PHP3 code, and they can be used immediately.
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. Apache, a well-known web server, is already able to support JSP. Because Apache is widely used in NT, Unix and Linux, JSP has a wider execution platform. Although the NT operating system now accounts for a large market share, Unix still has a great advantage in servers, and the newly emerging Linux is even more influential. From one platform to another, JSP and JavaBeans don't even need to be recompiled, because Java bytecode is standard and platform-independent. Performance comparison
Someone has done experiments, and they conducted loop performance tests and access Oracle database tests for these three languages.
In the loop performance test, JSP ended the 20000*20000 loop in just a surprising four seconds. ASP and PHP tests the 2000*2000 cycle (one order of magnitude less), but it took 63 seconds and 84 seconds respectively. (Refer to PHPLIB).
In the database test, the three performed Insert, Update, Select and Delete on Oracle 8 1000 times: JSP takes 13 seconds, PHP takes 69 seconds, and ASP takes 73 seconds.
Prospect Analysis
Currently, PHP and ASP are the most widely used in the country. Because JSP is a newer technology, it is less used in China. However, in foreign countries, JSP is already a relatively popular technology, especially e-commerce websites, which mostly use JSP.
Websites that use PHP are such as Sina, Chinaren, etc., but due to some shortcomings of PHP itself, it is not suitable for large e-commerce sites, but more suitable for small commercial sites. First, PHP lacks scale support. Secondly, there is a lack of multi-layer structure support. For high-load sites, there is only one solution: distributed computing. The database, application logic layer, and representation logic layer are separated from each other, and the same layer can also be separated according to traffic, forming a two-dimensional array. PHP lacks this support. There is also the point mentioned above that the database interface provided by PHP is not unified, which makes it unsuitable for use in e-commerce. ASP and JSP do not have the above defects. ASP can obtain ActiveX scale support through COM/DCOM of Microsoft Windowsd, and structural support through DCOM and Transcation Server; JSP can obtain scale support through SUN Java's Java Class and EJB, and structural support through EJB/CORBA and Application Server of many manufacturers. Among the three, JSP should be the future development trend. Some of the world's largest e-commerce solution providers use JSP/Servlets. The most famous one is IBM's E-business, whose core is the Web Sphere using JSP/Servlet. They are all powered by CGI. But after October last year it launched Enfinity, an e-commerce Application Server that uses JSP/Servlets, and claims to no longer develop traditional software. In short, ASP, PHP, and JSP have a considerable number of supporters, and it can be seen that the three have their own strengths. Friends who are studying or using dynamic pages can choose a language that suits them according to the characteristics of the three.
Share: Comparison of several ways to open a record set First define conn.asp <% dim objConn dim strConn strConn = Provider=Microsoft.Jet.OLEDB.4.0;Data Source= & chr(34) & Server