Chapter 1: Introduction to ASP.NET 2.0 1
A Little Bit of History 2The Goals of ASP.NET 2.0 2 Developer productivity 3 Administration and management 6 Performance and scalability 7 Device-specific code generation 8Additional New Features of ASP.NET 2.0 9 New developer infrastructures 9 New compilation system 15 Additions to the page Framework 15 New Objects for Accessing Data 18 New Server Controls 18a New IDE for building ASP.NET 2.0 Pages 19Summary 21
Introduction to ASP.NET 2.0The evolution of ASP.NET continues The progression from Active Server Pages 3.0 to ASP.NET 1.0was revolutionary, to say the least -! And I am here to tell you that the evolution from ASP.NET1.0 /1.1 To ASP.NET 2.0 is Just as Exciting and Dramatic.
The introduction of ASP.NET 1.0 changed the Web programming model, but ASP.NET 2.0 is just asrevolutionary in the area of productivity. The primary goal of ASP.NET 2.0 is to enable you tobuild powerful, secure, and dynamic applications using the least possible amount of code. Thisbook focuses on the astounding new capabilities that are built into ASP.NET 2.0.In writing this book, I assume that you are already familiar with ASP.NET 1.0 or 1.1.I do not cover the basic functionality of ASP .NET Provided by Those Releases.
This book focuses on the Beta 1 release of ASP.NET 2.0. A beta release is a software release thatcomes out prior to the final release of the product (the final release is often referred to as the RTMor Release to Manufacturer version). Software companies sometimes release products early as betasin hopes that the programming community will demand the features and capabilities that therelease offers. The vendors also hope that the beta version will reveal any bugs in the productprior to the release of the RTM version. Therefore, be aware that you might encounter errors orbugs as you code your applications in the ASP.NET 2.0 beta release. Also be aware that themethod or parameter names might change between the beta version and the RTM version. youmay have to rework any ASP.NET applications built using the ASP .NET 2.0 Beta when the RTMVERSION IS Released. A Beta, HoWever, Gives You An outstanding Opportunity To Gain Early Insightinto the Direction A New Technology Is Going and To Get Up To speed on its use, even before it isreleased.A Little Bit of HistoryASP.NET 2.0 has its roots in an older Web technology from Microsoft, which was called Active ServerPages -. or ASP for short ASP was a quick and easy way to develop Web pages. ASP pages consisted ofa single page that contained a mix of languages. The power of ASP was that you could use VBScript orJScript code instructions in the pages that would then be executed on the Web server prior to the pagebeing sent to the end user's Web Browser. this Was An Easy Way To Create Dynamic Web Pages That Couldbe Customized Based on Parameters Dichated by The Developer.
ASP 2.0 and 3.0 were quite popular because this technology made it relatively straightforward and easyto create Web pages. Also, ASP 2.0 and 3.0 appeared in the late '90s, just as the dotcom era was born.During this time, a mountain of new Web . pages and portals were developed ASP was one of the leadingtechnologies that individuals and companies used to build them In fact, even today, you can still find alot of .asp pages on the Internet -. including some of Microsoft's own Web pages.But even . at the time of the final release of Active Server Pages, in late 1998, Microsoft employees MarcAnders and Scott Guthrie had other ideas Their ideas generated what they called XSP (which was anacronym with no meaning) - a new way of creating Web applications in an object-oriented mannerinstead of the interpreted manner of ASP 3.0. They showed their idea to many different groups withinMicrosoft, and it was quite well received. In the summer of 2000, the beta of what then was called ASP was released at Microsoft's Professional Developers Conference where the attendees eagerly startedworking with it When the technology became available (with the final release of the .NET Framework1.0), it was renamed ASP.NET -. receiving the .NET moniker that most of Microsoft's new productswere Receiving at what time.
In the summer of 2000, and throughout the entire beta program for ASP , this outstanding new technologycreated excitement. At this point, the entire .NET Framework was rather immature. The code for theentire Framework came on a single CD. No IDE came with it to enable development of ASP pages Tocreate your pages and code-behind classes, you had to use Microsoft's Notepad and the command-linecompilers contained on the CD I am happy to say that even today -.. in ASP.NET 2.0 - you can stilluse this simple approach to code your applications if you want Just working with the first ASP.NET beta was exciting;! it is no different with the beta this time around.Nothing is better than getting your hands on a new technology and seeing what is possible ......................
The Goals of ASP.NET 2.0ASP.NET 2.0 is a major release of the product and is a built-in part of the .NET Framework 2.0. Thisrelease of the Framework is code-named Whidbey. You might hear others referring to this release ASP.NET 2.0 HERALDS A New WAVE OF Developments That Should Eliminateany of The Remaining Barriers To Adopting this New Way of Coding Web Applications.
When the ASP.NET team started working on ASP.NET 2.0, it had specific goals to achieve. These goalsfocused around developer productivity, administration and management, performance and scalability, and the capability to target any device. They were completely achieved with this milestone ProductRelease. The Next Sections Take A Look at Each of these Goals.
Developer productivityMuch of the focus of ASP.NET 2.0 is on productivity Huge productivity gains were made in going fromASP 3.0 to ASP.NET -. Could there possibly be much more left to gain One goal the development team had for ASP.NET 2.0 was? to eliminate much of the intense coding thatASP.NET required and to make ASP.NET tasks easier. The ASP.NET team developing ASP.NET 2.0 hadthe goal of reducing by two-thirds the number of lines of code required for an ASP.NET Application! ItsuCceedededed in this Release, And You Will Find IT Literally Amazing How Quickly You Create An Applicationin ASP.NET.
The new developer productivity capabilities are the focus of much of the book, so you can find exampleson almost every page. But first, take a look at the older technology. In Listing 1-1, you use ASP.NET 1.0to build a table IN A Web Page That Includes Simple Paging of The Data.
Listing 1-1: Showing Data IN A DataGrid Server Control with Paging Enabled (VB Only)
<% @ Page language = "vb" autoeventwireup = "true"%> <% @ import name "%> <% @ import name"%> system.data.sqlclient "%>