As you could probably tell from the cover, we are bringing you early, in-depth coverage of ASP.NET 2.0, the Web components of the next version of the Microsoft .NET Framework. ASP.NET 2.0 was unveiled at the October 2003 Microsoft PDC, but until now has had limited availability. Basically, if you went to the PDC and brought the DVDs home, you had an early copy of the release. At press time, however, all the technology we cover in this issue is available to MSDN Universal subscribers; a larger distribution is scheduled for Tech•Ed this May.
So why have we chosen to devote an entire issue to the features of ASP.NET 2.0 this month? The answer is simple—it's really cool. You'll see what we mean as you read the articles we've gathered, but for those of you who are new to the world of ASP.NET, it might be informative to take a look at the evolution of Windows-based Web development over the years.
ISAPI was the first API offered by Microsoft for programmatically handling Internet traffic, both HTTP-based and otherwise. The interface was relatively basic, offering little more than a wrapper around what some coders were familiar with in CGI (Common Gateway Interface) libraries. You could get basic session data, and that was about it. You had to write modules that were, frankly, kind of annoying and picky. It often felt like you were patching bits together and keeping your fingers crossed. Debugging was a bear—and not one of those friendly circus bears who balance a ball on their nose. We're talking the kind that you see on the nature specials, where the salmon jumps out of the water and right into the bear's mouth. And that salmon is your DLL.
Compared with ISAPI, ASP (Active Server Pages) represented a great leap forward. Though ASP was really implemented as an ISAPI DLL, its purpose was to take the grunge work out of going to the Web. ASP let you interlace your HTML pages with script code—VBScript or JavaScript—and create useful output. This approach grew in popularity, spawning dozens of dedicated user groups and community sites. Of course, there were still some issues with ASP code, like its tendency to lead the developer towards hard-to-read spaghetti code that could quickly become hopelessly interwoven with display elements.
The first preview edition of ASP.NET 1.0 hit the streets in 2000. It had a couple of huge advantages over ASP—server-side programming could be separated from HTML, and the .NET Framework could be easily accessed from code. Well before it was officially released in 2002, thousands of sites were using ASP.NET for production code; since then, ASP.NET has become so popular that its adoption has recently overtaken that of Java servlets (JSP pages), according to NetCraft.
So where is there to go from 1.0? ASP.NET 2.0 represents a further enhancement of the technology in a number of areas. In fact, it's built upon several pillars: security, data, personalization, master pages, and so on. Each pillar has been created as a way to make it significantly easier for coders to create powerful Web sites by using well-tested patterns, so they don't have to reinvent the wheel each time.
The enhancements around ASP.NET 2.0 security provide good task encapsulation. In ASP.NET 1.0, if you wanted security, you had to build it yourself. And you know what's a really bad idea? Homebrewed security schemes. You remember when you were in grade school and your dad gave you a haircut in the kitchen? With the newspaper spread out under the chair? And it looked crooked as heck and you had to wear a Mets cap to school for the next three weeks? Well, maybe that's our own personal painful memory, but the lessons we learned in the kitchen chair can be applied to ASP.NET and security: let the guys who do it for a living give you the basics and you'll be much happier with the results.
The point we're trying to make here is that ASP.NET 2.0 provides ready-made security modules. If you want to add authentication services, you can just snap in a component and all the hard work is done for you. The same logic suffuses the other new elements of ASP.NET 2.0. Data is easier than ever. Creating page templates has gone from a do-it-yourself project to a feature that's supported in the Visual Studio 2005 page designer.
In short, we've had a lot of fun playing with the ASP.NET 2.0 bits, and we hope you do too.
Thanks to the following Microsoft technical experts: Scott Berry, Catherine Brooker, Christopher Brumme, Claudio Caldato, Pablo Castro, Michael Fanning, Jonathan Keljo, Ronald Laeremans, Gerrard Lindsay, Ivan Medvedev, Michael Murray, Stefan Schackow, Dan Vallejo, and Jeffrey Van Gogh. Special thanks to Rob Howard and the ASP.NET team.