Dynamic Web scripting language

Source: Internet
Author: User

In ASP ,PHP,JSP Environment, theHTML 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.

Second, the technical characteristics:

(a) The technical characteristics of ASP:

1, using simple and easy-to-understand scripting language such as VBScript , JScript , combined with HTML code, you can quickly complete the application of the website.

2, without compile compilation, easy to write, can be directly executed on the server side.

3. Use an ordinary text editor, such as Windows Notepad, to edit the design.

4. Browser-Independent (Browser independence), clients can browse Active Server Pages as long as they are using an executable HTML -code Browser The content of the Web page designed. The scripting language (VBScript , Jscript) used by Active serverPages is executed on the WEB server side, 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 , Tcl , are used in a plug-in manner. such as The scripting engine is a COM (Component object Model) object that handles scripting.

6, the server-side script can be used to generate client scripts.

7. TheActiveX server components (ActiveX servers component) have unlimited extensibility. You can use programming languages such as visual Basic ,Java ,Visual C + + ,COBOL to write what you need ActiveX Server Component .

(b) Technical features of PHP:

1. Database connection

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. PHP Lib is the most common set of base libraries that can provide general transaction needs. But PHP provides a database interface that is not consistent with each other, such as the interface to Oracle, MySQL , and Sybase. This is also a weakness of PHP .

Three JSP the technical characteristics:

1, separation of the production and display of the 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-cluster components, and is bundled in a small script, and 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, theJSP engine interprets the JSP identity, producing the requested content (for example, by accessing the JavaBeanS-cluster component, 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 code while guaranteeing full availability of any HTML -based Web browser.

2. Emphasis on reusable group components

The vast majority of JSP pages rely on reusable and cross-platform components such asJavaBeans 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. Simplified page development with logo

Web page developers are not all program designers who are familiar with scripting languages. JavaServer Page technology encapsulates a number of features that are required for dynamic content generation in an easy-to-use, JSP -related XML identity. The standard JSP identifies the ability to access and instantiate JavaBean s components, set or retrieve group component properties, download applets, and perform functions that are more difficult to encode and time-consuming with other methods. The 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. JSP technology is easy to integrate into a variety of application architectures to leverage existing tools and techniques and scale to distributed applications that support enterprise-wide. As part of the Java Technology family, and as a member of the Java 2EE, JSP technology can support highly complex WEB-based The application of the . Because the built-in scripting language for the JSP page is based on the Java programming language, all JSP pages are compiled as Java The Servlet , JSP page has 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.

Three, the scope of application:

ASP is a Microsoft -Developed Dynamic Web language, but also inherits the 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) . Unix also has chilisoft components to support ASP, but the functionality of the ASP itself is limited and must be +com by ASP. Group to augment, and COM underUnix is very difficult to implement.

PHP3 works correctly on Windows,unix,linux Web servers, and also supports General Web Iis,apache such as server, when the user changes the platform, no need to change the PHP3 code, can be used.

JSP is similar to PHP3 and can be executed on almost any platform. such as Win Nt,linux,unix. Under NT, IIS can support JSPthrough 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.

Four, performance comparison:

Tests were conducted on these three languages for loop performance testing and access to Oracle database testing. In the cyclic performance test, theJSP 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, three of the Oracle 8 were 1000 times insert,update,select and delete: JSP takes 13 seconds,PHP takes 69 seconds, ASP needs 73 seconds.

(v), Outlook analysis:

Currently in the domestic PHP and ASP is the most widely used. and JSP is a relatively new technology, the domestic adoption of less. However, in foreign countries, JSP is already a popular technology, especially the e-commerce Web site, the use of JSP . Web sites that use PHP , such as Sina (Sina), Chinese (chinaren), etc., but because of the shortcomings of PHP itself, makes it unsuitable for large 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. PHP lacks this support. As mentioned above, PHP provides a non-uniform database interface, 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 Microsoft WindowsD com/dcom, Structure support is obtained through DCOM and transcation Server , andJSP can be supported by the Java class and EJB of Sun Java , through ejb/ CORBA and application Server of many vendors get structure support. Of the three,JSP should be the trend of future development. Some of the world's largest e-commerce solution providers use JSP/Servlet. Known as IBM's e-business, its core is the use of JSP/Servlet Web Sphere. They are all supported by CGI . But last October, it launched the enfinity, a JSP/Servlet -based e-commerce application Server , and claims to no longer develop traditional software.

In short, ASP,PHP,JSP Three have a considerable number of supporters, from this can also be seen three strengths. Friends who are learning or using dynamic pages can choose a language that suits them according to the characteristics of the three.

Dynamic Web scripting language

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.