O'Reilly logo

Programming ASP .NET by Dan Hurwitz, Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. ASP.NET and the .NET Framework

Microsoft first announced ASP.NET (then called ASP+) and the .NET platform in July, 2000. .NET is, in essence, a new development framework that provides a fresh application programming interface to the services and APIs of classic Windows operating systems, especially Windows 2000, while bringing together a number of disparate technologies that emerged from Microsoft during the late 1990s. Among the latter are COM+ component services, a commitment to XML and object-oriented design, support for new web services protocols such as SOAP, WSDL, and UDDI, and a focus on the Internet, all integrated within the DNA architecture.

ASP.NET represents a significant enhancement to and extension of classic ASP. ASP programmers will be very pleased by how easy the transition to ASP.NET is, yet there is tremendous power and flexibility in the new development platform. ASP and ASP.NET applications can run side by side, allowing for easy migration of legacy applications.

This chapter introduces both ASP.NET and the .NET platform, notably the .NET Framework.

The .NET Framework

The .NET Framework sits on top of the operating system, which can be any flavor of Windows,[1] and consists of a number of components. Currently, the .NET Framework consists of:

  • Four official languages: C#, Visual Basic .NET, Managed C++, and JScript .NET.

  • The Common Language Runtime (CLR), an object-oriented platform for Windows and web development that all these languages share.

  • A number of related class libraries, collectively known as the Framework Class Library (FCL).

Figure 1-1 breaks down the .NET Framework into its system architectural components.

.NET Framework architecture

Figure 1-1. .NET Framework architecture

The Common Language Runtime (CLR) executes your program on your web server. The CLR activates objects, performs security checks on them, lays them out in memory, executes them, and handles garbage collection.

In Figure 1-1, the layer on top of the CLR is a set of framework base classes, followed by an additional layer of data and XML classes, plus another layer of classes intended for web services and forms, and Windows forms. Collectively, these classes are known as the Framework Class Library (FCL). With more than 5,000 classes, the FCL facilitates rapid development of ASP.NET applications. This same class library is used for desktop applications as well.

Microsoft .NET supports a Common Language Specification (CLS) that allows you to choose the syntax with which you are most comfortable. You can write classes in C# and derive from them in VB.NET. You can throw an exception in VB.NET and catch it in a C# class. Suddenly the choice of language is a personal preference rather than a limiting factor in your application’s development.

The set of framework base classes support rudimentary input and output, string manipulation, security management, network communication, thread management, text manipulation, reflection, and collections functionality, etc.

Above the base class level are classes that support data management and XML manipulation. The data classes support persistent management of data that is maintained on backend databases. These classes include the Structured Query Language (SQL) classes to let you manipulate persistent data stores through a standard SQL interface. Additionally, a set of classes called ADO.NET allows you to manipulate persistent data. There are classes optimized for the Microsoft SQL Server relational database, and there are generic classes for interacting with OLE DB compliant databases. The .NET Framework also supports a number of classes to let you manipulate XML data and perform XML searching and translations. The data handling aspects of the .NET Framework are covered in Chapter 8 through 13.

Extending the framework base classes and the data and XML classes is yet another tier of classes, an applications level. This tier of classes is geared towards three different technologies:

Windows Forms

Allows the development of Windows desktop applications with rich and flexible user interfaces. These “traditional” desktop applications can interact with other computers on the local network or over the Internet through the use of web services.

Web Forms

Allows the development of robust, scalable web pages and web sites. Server controls enable many new features, such as validation, event-driven programmatic manipulation of the web pages, state maintenance, and more. Web forms are covered in detail in Chapter 6.

Web Services

Allows the development of applications that provide method calls over the Internet. Web services include a number of classes that support the development of lightweight distributed components, which will work even in the face of firewalls and NAT software. Because web services employ standard HTTP and SOAP as underlying communications protocols, these components support plug-and-play across cyberspace. Web services are covered specifically in Chapter 15, Chapter 16, and Chapter 17.



[1] Because of the architecture of the Common Language Runtime, the operating system can be potentially any flavor of Unix or any other operating system.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required