Compare ASP, JSP and ASP.NET

by lichen 7/16/2007 6:44:00 PM

ASP (Active Server Pages) was a revolution to web development when it was released by Microsoft in 1997. Since then, Sun has answered with a better tool in JSP. Microsoft answered to the Java challenge with ASP.NET in 2002. How do they compare to each other? I have done a survey and will anwer the question in a series of posts.

ASP allows server scripts and expression to be embedded in HTML. When it is desirable to seperate the code from the content, one would write the code in a COM object (usually written in VB6) and call the COM object from ASP page.

JSP (JavaServer Pages) has the following advantages over ASP:

  • ASP is interpreted while JSP is compiled - better performance.
  • In the Java world, one can develop Servlet and Servelet filter. In ASP world, one has to use C++ to write ISAPI Extension and ISAPI filter. ISAPI Extension and filter does not share session state with ASP. While the Servlet functinality is not essential, lack of filter is a limitation for ASP.
  • In Java world, one often seperate presentation and code with JSP/Java Bean, like the ASP/COM object combination. One limitation for the Java Bean is that it does not have context while the COM object can access the context. To access the context, one has to write custom JSP Tag. The capability of JSP does make custom components look like HTML.

ASP.Net was Microsoft's answer to JSP. ASP.NET not only has all the capability of JSP, it also represent a major productivity boost:

  • ASP.NET's HttpHandler and httpModule is equivalent to Servlet and servlet filter.
  • ASP.NET support custom controls, like the custom JSP tags.
  • ASP.NET supports a code behind model. This is a productivity boost compare to JSP/Java Bean. With JSP/Java Bean, one has to code the inputs once in the form and then again in the bean. One only create the controls once in ASP.NET pages and they are automatically accesible in code-behind.
  • ASP.NET support rich components (none-HTML, such as Grid and TreeView. These are usually DHTML controls manipulated by JavaScript with states saved in a hidden input control. ASP.NET has the viewstate framework for store and retrieve the property of controls. These rich controls can be accessed in the code-behind page transparently like any other control. JSP/Java bean are limisted simple HTML inputs. Therefore, it is much easier to develop feature rich page with ASP.NET than the JSP/Java bean approach.

In conclusion,  JSP is about half way between ASP and ASP.NET. It is perhaps not fair to compare ASP.NET and JSP since they are not really in the same generation. A better comparison to ASP.NET might be JSP/Struts or JSF.

Currently rated 3.0 by 2 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.Net | ASP.NET | Java

Post correlati

Comments are closed

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Pages

    Recent comments

    Authors

    Tags

      Disclaimer

      The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

      © Copyright 2010

      Sign in