The .NET Framework


ASP.NET inherits its programming model from the .NET Framework. This new application development platform brings together the best object-oriented features from languages such as C++ and Java, along with the ease and simplicity of development associated with languages such as Microsoft Visual Basic. The .NET Framework features a run-time execution environment and a rich class library built on top of that.

Figure 1-1 shows the pieces of the .NET Framework and how they build on each other.

Figure 1-1. A logical view of the .NET Framework

graphics/f01hn01.jpg

The Common Language Runtime

The common language runtime (CLR) forms the foundation of the .NET Framework by providing a run-time execution environment. Applications and components developed to run in this environment are referred to as managed applications and components. They are referred to as managed because the CLR manages the execution of code in these applications and components and provides a number of services that simplify their development and deployment.

The CLR takes care of a number of low-level plumbing details. One of the most important features in the CLR is its automatic memory management and garbage collection functionality. This feature allows you to focus on implementing your component's behavior by making it almost unnecessary for you to worry about memory management “ and memory allocation “ related programming errors. This feature also enables components to easily interact with one another because they all share a common memory management scheme.

The CLR allows you to express the functionality of your component with a well-designed, simple, and intuitive API or object model via constructs such as properties, methods , and events that you can declaratively describe by using metadata attributes. These concepts are discussed in detail in Chapter 3, "Component Programming Overview."

Another important feature of the CLR is that once you have implemented your component, the CLR automatically makes it available for use in one or more applications without any extra registration requirements. The assembly containing the component can be versioned and deployed in a side-by-side manner. In other words, the CLR enables multiple versions of your component to coexist. This allows you to develop and deploy future versions of your component without inadvertently breaking any existing applications that rely on the exact behavior of the current version of your component.

Finally, the CLR provides true language interoperability. Your component can be developed, consumed, and inherited from in any .NET programming language, such as C#, Visual Basic .NET, Microsoft JScript .NET, and Microsoft Visual J#. This enables you to develop your component in the language you prefer, without arbitrarily imposing your language choice on your component's consumers.

The .NET Framework Class Library

The .NET Framework class library builds on top of the CLR (as shown in Figure 1-1) and provides a rich hierarchy of classes covering a wide variety of application and component development scenarios in a consistent and intuitive manner. This class library truly makes component-based programming a reality by providing a common substrate and API that can be shared by all components and applications. This extensive class library can be divided into multiple parts , as Figure 1-1 shows. Each logical part is associated with a set of related name ­spaces used to create a logical and hierarchical grouping of classes in a class library based on their common purpose, functionality, or targeted technology.

The Base Class Library (BCL) encompasses a number of commonly used namespaces, such as System , System.Collections , and System.Diagnostics . It provides basic functionality that is useful in all applications and components, including the basic primitive types ( Int32 , String , and Boolean ) and commonly used data structures (such as Array , Stack , and Hashtable ). The BCL also contains features such as network connectivity, protocol implementations , file and stream I/O classes, multithreading, text processing, regular expressions, globalization support, and reflection. Various higher-level class libraries are built on top of this foundation.

The ADO.NET layer in Figure 1-1 represents the data access functionality built into the .NET Framework as part of the System.Data namespace and its subnamespaces. ADO.NET provides the ability to operate on disconnected or offline caches of relational data. The data access layer also enables access to a variety of database engines. In particular, it provides very high-performance connectivity to Microsoft SQL Server.

The XML layer in Figure 1-1 is a counterpart of the ADO.NET layer and includes the classes in the System.Xml namespace and its subnamespaces. This XML layer enables efficient access to XML data, both structured and unstructured. In addition, it provides an implementation of various industry standards, such as Extensible Stylesheet Language Transformations (XSLT), XML Path Language (XPath), and XML schemas. This layer also gives you the ability to serialize objects to and from XML format.

The GDI+ layer in Figure 1-1 represents the object-oriented drawing and painting functionality provided by the System.Drawing namespace and its subnamespaces. The graphics capabilities of GDI+ include rendering primitive objects, vector art, and typography (formatted text). Furthermore, GDI+ enables the use and creation of image files in various formats, including JPEG, GIF, BMP, and TIFF.

The component model layer consists of classes in the System.ComponentModel and System.ComponentModel.Design namespaces. It provides the architecture that turns classes into components that can be designed, customized, serialized, and deserialized in a design-time tool such as Microsoft Visual Studio .NET. In addition, this layer enables different application development technologies to share similar component creation and usage techniques as well as design-time features.

The topmost layers in Figure 1-1 represent the application development technologies. The .NET Framework enables the development of graphical Win32 client applications and server applications. Windows Forms, which is implemented in the System.Windows.Forms namespace, enables the development of applications targeting the Win32 platform. ASP.NET and Web Forms, implemented in the System.Web namespace and its subnamespaces, enable the development of Web applications and XML Web services.

The next section lets you take a deeper look at ASP.NET, the portion of the .NET Framework that this book directly addresses.



Developing Microsoft ASP. NET Server Controls and Components
Developing Microsoft ASP.NET Server Controls and Components (Pro-Developer)
ISBN: 0735615829
EAN: 2147483647
Year: 2005
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net