Introduction to ASP. NET and JSP Technologies

Source: Internet
Author: User
Tags what is asp

JSP is a network programming language released by SUN, which is hard to learn (recognized on the Internet) and runs across platforms. high Security and fast operation efficiency. it is widely used by enterprise-level companies and banking and financial institutions.

ASP. in a sense, it should be an ASP version upgrade, but it is not completely upgraded from ASP. NET is launched by Microsoft to resist the rapid development of SUN's JSP on the network ,. many people are learning about the NET architecture, mainly because the development efficiency is relatively high. however, it is still running on the WIN platform and cannot be cross-platform.

JSP Introduction

Jsp is a dynamic web page Technical Standard promoted by Sun Microsystems and jointly established by many companies. Its website is http://www.paioft.com/products/jsp. This technology provides a simple and fast way to create a Web page that displays dynamically generated content. JSP technology is designed to make it easier and faster to Construct Web-based applications that work with various Web servers, application servers, browsers, and development tools. JSP specification is the result of extensive cooperation among Web servers, application servers, transaction systems, and development tool vendors. Adding Java program snippets (Scriptlet) and JSP tags to traditional webpage Html files (* htm, *. html) constitutes a JSP webpage (*. jsp ). When the Web server encounters a request to access the JSP webpage, it first executes the program fragment and then returns the execution result to the customer in HTML format. Program snippets can operate databases, redirect webpages, and send emails. This is the function required to build a dynamic website. All program operations are performed on the server, and the results are only obtained after the network is uploaded to the client. The client has the lowest requirements on the client browser and can implement no Plugin, no ActiveX, and no Java Applet, no Frame.

JSP Technology accelerates the development of dynamic web pages in multiple aspects:

1. Separate content generation and display

With JSP technology, Web page developers can use HTML or XML tags to design and format the final page. The dynamic content on the page is generated using JSP identifiers or small scripts according to the request, such as requesting account information or the price of a specific bottle of wine ). The logic of the generated content is encapsulated in the identifiers and JavaBeans components and bundled in small scripts. All scripts run on the server. If the core logic is encapsulated in identifiers and Beans, other people, such as Web administrators and page designers, can edit and use JSP pages without affecting content generation. On the server side, the JSP Engine interprets JSP identifiers and small scripts to generate the requested content, for example, accessing the JavaBeans component, using the JDBCTM technology to access the database, or including files ), and the results are sent back to the browser in the form of HTML or XML) pages. This helps the author protect his own code and ensure the full availability of any HTML-based Web browser.

2. Emphasize reusable components

The vast majority of JSP pages depend on reusable, cross-platform components JavaBeans or Enterprise JavaBeansTM components) to execute more complex processing required by applications. Developers can share and exchange components that perform common operations, or make these components used by more users or customer groups. The Component-Based Approach accelerates the overall development process and balances various organizations in their development efforts with their existing skills and optimization results.

3. Simplified page development with logo

Web page developers are not all programmers familiar with the scripting language. The assumerver Page technology encapsulates many functions that are required for dynamic content generation in easy-to-use and JSP-related XML identifiers. The standard JSP mark can access and instantiate the JavaBeans component, set or retrieve component attributes, download the Applet, and execute functions that are more difficult to encode and consume in other ways.

Through the development of a custom identification library, JSP technology can be expanded. In the future, third-party developers and others can create their own identification libraries for common functions. This allows Web page developers to work with familiar tools and components that execute specific functions like identifiers.

JSP technology can easily be integrated into a variety of application architectures to take advantage of existing tools and techniques and extend to support enterprise-level distributed applications. As part of the Java technology family and the Java 2 Enterprise Edition architecture), JSP technology can support highly complex Web-based applications.

Because 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 advantages of Java technology, including robust storage management and security. As part of the Java platform, JSP features the Java programming language "one-time writing, running everywhere. As more and more vendors add JSP support to their products, you can use the servers and tools you select. Changing tools or servers does not affect the current application. When integrated with Java 2 platform, Enterprise Edition (J2EE), and Enterprise JavaBean technology, JSP pages provide Enterprise-level scalability and performance, this is required for deploying Web-based applications in Virtual Enterprises.

4. Technical Analysis

Microsoft's ASP technology is also a dynamic web page development technology. JSP and ASP are very similar in form. ASP programmers can recognize <%> and <% = %> at a glance. However, further exploration will reveal many differences, including the following three main points:

1) JSP is more efficient and secure
ASP is stored as the source code and run as an interpreter. The Source Code must be interpreted for each ASP Web page call, which is inefficient. In addition, the IIS vulnerability has exposed many website source programs, including the websites developed by the author using ASP before. All ASP programs have been downloaded. JSP is compiled into byte code before execution. bytecode is interpreted and executed by Java Virtual Machine (Java Virtual Machine), which is more efficient than source code interpretation; the server also has the bytecode Cache mechanism, which can improve the access efficiency of bytecode. The first time you call a JSP page, it may be a little slow because it is compiled into a Cache, and it will be much faster in the future. At the same time, JSP Source programs are unlikely to be downloaded, especially the JavaBean program can be placed in a non-External directory.

2) more convenient JSP components (Component)
ASP expands complex functions through COM, such as file uploading, sending emails, and separating business processing or complex computing into independent Reusable Modules. JSP implements the same function expansion through JavaBean. In terms of development, the development of COM is far more complex and complex than that of JavaBean. Learning ASP is not difficult, but learning to develop COM is not easy. JavaBean is much simpler. From the above examples, we can see that it is very convenient to develop JavaBean. In terms of maintenance, COM must be registered on the server. If the COM program is modified, it must be re-registered, or even shut down and restarted. JavaBean does not need to be registered and can be placed in the directory contained in CLASSPATH. If the JavaBean has been modified, JSWDK and Tomcat still need to be shut down and re-run but not shut down), but developers have promised not to shut down the server in future versions. In addition, JavaBean is fully OOP. You can easily create a set of reusable object libraries for different service processing functions, such as user permission control and automatic email reply.

3) the JSP adaptation platform is wider
ASP currently only applies to NT and IIS. Although there are ChiliSoft plug-ins in Unix to support ASP, ASP itself has limited functions and must be expanded through the combination of ASP + COM. It is very difficult to implement COM in Unix.

ASP. NET

1. What is ASP.net?

ASP.net is a general language-based program architecture that can be used by a Web server to build powerful Web applications. ASP.net provides many advantages over the current Web development model.

1) significantly improved execution efficiency

ASP.net runs a general-language-based program on the server. Unlike the previous ASP instant interpreter program, the program is compiled at the first run of the server. This execution effect is certainly much better than one interpretation.

2) World-class tool support

The ASP.net architecture can be developed using the latest Visual Studio.net Development Environment developed by Microsoft. WYSIWYGWhat You See Is What You Get. These are only a small part of the support for powerful ASP.net software.

3) robustness and adaptability

Because ASP.net is a program compiled and run based on a common language, it is powerful and adaptive, it can run on almost all Web application software developers. So far, I only know that it can only be used on Windows 2000 Server ). The basic library, messaging mechanism, and data interface processing of common languages can be seamlessly integrated into ASP.net Web applications. ASP.net is also language-independent language independent. Therefore, you can select a language that best suits you to write your program, or write your program in many languages, currently, a combination of C # C ++ and Java is supported.), VB, and Jscript. In the future, the ability to work collaboratively in multiple programming languages will protect your current COM +-based programs and be fully transplanted to ASP.net.

4) simplicity and learning

ASP.net is very simple to run some common tasks such as form submission client authentication, distribution system and website configuration. For example, the ASP.net page architecture allows you to create your own user interface, so that it is different from the common VB-Like interface. In addition, the simplified development of common languages makes it easy to combine code into software, just like assembling a computer.

5) Efficient manageability

ASP.net uses a character-based and hierarchical configuration system to simplify the configuration of your server environment and applications. Because the configuration information is saved in simple text, new settings may not need to be enabled by the local administrator tool. This philosophical concept, called "Zero Local Administration", makes application-based development of Asp.net more specific and fast. To install an ASP.net application on a server system, you only need to simply copy some required files without restarting the system. Everything is so simple.

6) multi-processor Environment Reliability

ASP.net has been deliberately designed as a development tool for multi-processor. It uses special seamless connection technology in a multi-processor environment, which will greatly improve the running speed. Even if your current ASP.net application is developed for a processor, in the future, the performance of your multi-processor can be improved without any changes, but the current ASP does not.

7) customization and scalability

In ASP.net design, website developers can define their own "plug-in" modules in their own code. This is different from the original inclusion relationship. ASP.net can add components defined by itself. The development of website programs has never been so simple.

8) Security

Based on the Windows Authentication Technology and the configuration of each application, you can ensure that your original application is absolutely safe. However, the Asp experience tells us that M $ is always prone to bugs because we cannot be so confident)

2. Main content of this tutorial
◆ ASP.net syntax
◆ The ASP.net syntax may be familiar to the old ASP programmers, but there are also some new things. The Quick Start tutorial will talk about them in detail.
◆ Structure and features of ASP.net
◆ Introduces all the features of ASP.net. It is a world-class application software that ASP developers can write interactively, with less time and effort than before.

Best Practice

It is easier to develop by referencing some exercise questions and how to avoid potential mistakes that are easy to make in program development.

For those people

If you have never developed a website program, this is not suitable for you. You should have at least some HTML language and simple Web development terms. You do not need previous ASP development experience, but certainly have better experience), but you must understand the concept of interactive Web program development, including the concepts of forms, scripts, and data interfaces.

  1. How to Use JDBC code in JSP web pages to connect to MySQL
  2. Delete cookies in ASP. NET
  3. Introduction to ASP. NET Provider
  4. ASP. NET Virtual File System
  5. Using Microsoft JDBC to connect to a database in JSP

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.