Comparison between Asp.net and JSP

Source: Internet
Author: User

JSP (Java Server Pages) is a dynamic web page technical standard proposed by sunmicrosystems and jointly established by many companies. JSP technology is a bit similar to ASP technology, it is in the traditional web page HTML file (*. htm ,*. insert the Java program segment (scriptlet) and JSP tag in HTML to form a JSP file (*. JSP ). Web applications developed using JSP are cross-platform. They can run both on Linux and other operating systems.

 

ASP is a Microsoft technology. It is a server-side scripting technology that enables scripts embedded in web pages to be executed by Internet servers. Indicates the Active Server Pages (Dynamic Server Pages) that run on IIS
.

 

The two features: JSP:

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. use JSP identifiers or small scripts to generate dynamic content on the page. the logic of the generated content is encapsulated in the identification and JavaBeans group, and bundled in the small script. All the scripts are executed 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 the jsp id to generate the requested content (for example, accessing the database by accessing the JavaBeans group component and using JDBC technology), and uses HTML (or XML) as the result) the form of the page is sent back to the browser. this helps the author protect his own code and ensure the full availability of any HTML-based Web browser.

 

2. Reusable group parts

Most JSP pages depend on reusable and cross-platform components (such as JavaBeans or Enterprise JavaBeans) 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 user groups. the component-based method accelerates the overall development process and balances various group organizations with their existing skills and development efforts to optimize the results.

 

3. Simplified page development with logo

 

Web page developers are not all programmers familiar with scripting. the assumerver page technology encapsulates many functions that are easy to use and are required for dynamic content generation in JSP-related XML identifiers. standard JSP tags can be accessed and instantiated
The JavaBeans component allows you to set or retrieve group attributes, download the applet, and execute functions that are more difficult to encode and consume in other ways.

 

Because the built-in scripting language of JSP pages is based on the Java programming language, and all JSP pages are compiled into Java
Servlet and JSP pages have all the advantages of Java technology, including robust storage management and security.

 

As part of the Java platform, JSP has the characteristics of the Java programming language "one-time writing, execution everywhere. as more and more suppliers add JSP support to their products, you can use the servers and tools you have chosen. Modifying tools or servers does not affect the current applications.

 

ASP. NET

1. Enhanced performance. ASP. NET
The code of the compiled public Language Runtime Library run on the server. Unlike the interpreted predecessors, ASP. NET
Early binding, real-time compilation, local optimization, and out-of-box cache services are available. This is equivalent to significantly improving performance before writing code lines.

2. World-class tools support. asp. netframework
Supplemented a large number of toolboxes and designer. Wysiwyg in the integrated development environment of Visual Studio.
Editing, drag-and-drop server controls, and automatic deployment are only a few of the functions provided by this powerful tool.

3. Simplicity and manageability. ASP. NET
It makes it easy to execute common tasks, from simple form submission and client authentication to deployment and site configuration. in addition, the Public Language Runtime simplifies development by using managed code services (such as automatic reference counting and garbage collection. ASP. net
The text-based hierarchical configuration system simplifies the application of settings to the server environment and Web
Application. Because the configuration information is stored in plain text, you can apply new settings without the help of local management tools. This "Zero local management" philosophy is also extended
Deployment of ASP. NET Framework applications, even when compiling code is deployed or replaced.

4. scalability and availability. ASP. NET
The scalability was taken into account during the design, and the function specifically used to improve performance in the aggregation and multi-processor environments was added. In addition, the process was subjected to ASP. NET
The Runtime Library is closely monitored and managed so that new processes can be created when the process behavior is abnormal (leakage, deadlock) to help keep applications always available for processing requests.

5. customization and scalability. ASP. NET
With a well-designed structure, developers can "insert" code at the appropriate level. In fact, they can extend or replace the custom components they have compiled.
Any sub-component of the ASP. NET Runtime Library. It has never been easier to implement custom authentication or status services.

Application Scope

ASP is a dynamic web page language developed by Microsoft. It inherits the consistent tradition of Microsoft products and can only be executed on Microsoft Server products.
Server) (Windows NT) and PWS (Personal Web server) (Windows 98. there are also chilisoft components in UNIX to support ASP. However, Asp has limited functions and must be expanded through ASP + COM group combinations. It is very difficult to implement COM in UNIX.

JSP is similar to php3 and can be executed on almost all platforms. such As WinNT, Linux, and UNIX. in NT, IIS supports JSP through an additional server, such as JRun or ServletExec. apache, a well-known web server, supports JSP. apache is widely used in NT, UNIX, and Linux, so JSP has a wider execution platform. although the NT operating system has a large market share, the Unix advantage in the server is still very great, and the new Linux is not small. porting from one platform to another, JSP and JavaBean do not even need to be re-compiled, Because Java bytecode is standard and platform-independent.

 

ASP. NET is based on the Common Language Runtime Library, so the Web
Application developers can leverage the power and flexibility of the entire platform. NET Framework
Class Libraries, message processing, and data access solutions are available from the web
Seamless access. ASP. net is also independent of the language, so you can select the language that best suits the application, or split the application across multiple languages. in addition, the interoperability of the Public Language Runtime Library is ensured during migration
ASP. NET retains existing investment in com-based development.

 

 

Comparison between the two:

JSP (Java Server Page) and ASP (activeserver page) are both common dynamic web pages and can be embedded into HTML programs. However, they are essentially different, it is compared in the following aspects:

1. Web server support: most common Web servers such as Apache, Netscape, and Microsoft softiis support JSP pages. Only Microsoft
IIS and personal Web server support ASP.

2. platform support: JSP is platform independent. As long as it is a platform where general Java programs can run, JSP programs are supported. The Windows platform can support ASP well, but the dependency of ASP on Win32-based models makes it difficult to transplant to other platforms.

3. component Model: JSP is built on reusable and cross-platform components (such as JavaBeans, enterprises JavaBeans, and custom tag libraries, ASP uses the Win32-based COM component model.

4. scripting language: jsp can use Java programming language or Javascript as the scripting language, while ASP uses VBScript or JScript as the scripting language.

5. Security: JSP uses the Java security model, while ASP uses the security structure of Windows NT.

6. Connection to the Access Database: JSP uses JDBC to establish a connection with the Access database, while ASP uses dataactive for the Access Database
Objects.

7. Custom tags: jsp can be expanded using the custom tag library. asp cannot be expanded without the custom tag library in ASP.

Summary:

Every language has its own rationality. Java is not necessarily applicable to every place, and VB is not useless. If one language is not as good as the other language, this language will no longer exist, so what we need to do is to find out their similarities and differences and learn and use different languages under different circumstances.

Related Article

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.