The .NET Framework
Microsoft .NET supports a Common Type Specification (CTS) that lets you 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 .NET Framework sits on top of the operating system, which can be any modern flavor of Windows,[1] and consists of multiple components. Currently, the .NET Framework contains:
[1] Because of the Common Language Runtime architecture, in theory the operating system can be any OS, including Unix.
- An expanding list of official languages (e.g., C#, VB.NET, 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 more fully breaks down the .NET Framework into its system architectural components.
Figure 1-1. .NET Framework architecture
The CLR executes your program; it activates objects, performs security checks on your code, lays your objects 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 applications based on Windows Forms, Web Forms, or web services. Collectively, these classes are known as the Framework Class Library (FCL). With more than 5,000 classes, the FCL facilitates rapid development of applications for either the desktop or the Web.
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.
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 together are referred to as ADO.NET. Some classes are optimized for Microsoft SQL Server relational database, and some are generic classes that interact with OLE DB-compliant databases. The .NET Framework also supports classes that let you manipulate XML data and perform XML searching and translations. The data handling aspects of the .NET Framework are covered in Chapter 19.
Going beyond the framework base classes and the data and XML classes (and to some extent, building on their technology) are yet another tier of classes geared toward three different technologies:
Windows Forms
Allows the development of Windows desktop applications with rich and flexible user interfaces. These 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.
Web services
Allows the development of applications that provide method calls over the Internet.
To learn more about Web Forms and web services, please see Programming ASP.NET, Second Edition, by Jesse Liberty and Dan Hurwitz (O'Reilly).