JSP and Beyond

a pragmatic primer on building web-based solutions with Java technologies


Originally known as ASP+, ASP.NET is Microsoft’s next generation web platform. Version 1.0 was released to the public in 2002. From a development standpoint the Microsoft stack is unquestionably powerful. Developers often find the stack easiest to work with, thereby making it easier for companies to find developers who are familiar with the technology stack.

One of the somewhat unique distinctions of the ASP.NET technology is the concept of “controls”, or reusable building blocks that can easily be included into code to provide calendaring functionality, database results display, result set paging and more. Other technologies have similar features, but due to its native support control, use in development is quite popular. This model has so many benefits that the Java world has created something similar called JSF that uses “components” to provide a similar mechanism. JSF will be explored in the Next Steps chapter at the end of this book.

Controls also abstract the request and response elements of a web application. For instance, to retrieve the select value on a calendar, a code block like “Calendar.SelectedDate.Value” could be used instead of using the request object to obtain the value as more traditionally done (Request[“CalendarSelectedDate”]).

ASP.NET Hello World

<%@ Page language=”c#” Codebehind=”HelloWorld.aspx.cs” AutoEventWireup=”false” Inherits=”Sample.HelloWorld” %>
<form id=”frmHelloWorld” method=”post” runat=”server”>
Hello World!

Drawbacks of ASP.NET
ASP.NET is a powerful platform, but does have some limitations as noted below.

Platform – ASP.NET applications can only run on a Microsoft Internet Information Services web server on a Microsoft operating system. Projects like Mono.net from the open source community are developing solutions to expand the support that .NET can enjoy, but I have reservations about this being embraced in the business world.

MVC – Not perceived by all people as a drawback the ASP.NET model does not support a true MVC framework out-of-box. Due to the business logic for ASP.NET applications getting stored inside code-behind layer ASP.NET offers the business logic and presentation separation, but adds some constraints around how request routing can be handled.

Cost – The operating system, database, development tools and application server are only available commercially through Microsoft.