Figure 1.1 shows an extremely simplified view of the architecture and relationships between elements of the .NET Framework. The CLR is the base on which all of the .NET Framework's other facilities are built. In particular, the CLR is responsible for addressing most of the "programming in the small" issues that have been identified with developing distributed systems. On top of the CLR is a Base Framework, a set of class libraries that can be used and shared by any .NET-aware language. The CLR and fundamental parts of the Base Framework are collectively known as the Common Language Infrastructure (CLI); the CLI has been standardized by ECMA. [2]
Figure 1.1. .NET Framework
Common Language RuntimeThe CLR is a core component of the .NET Framework. It consists of three main components :
On one level, the CLR may be considered to be the union of the features of many programming languages and architectures. It defines standard types, permits developers to define their own types, and allows developers to specify interfaces and methods for their types. The CLR allows compilers to store metadata with the user -defined types, enabling other languages to inspect, use, and extend these types. In addition, the CLR provides a safe and secure environment for program execution. It readily supports an object-oriented programming style characterized by classification, inheritance, and polymorphism. Similarly, the CLR can support non “object-oriented languages. If the CLR represents a superset of programming features, then it is clear that most ”if not all ”programming languages cannot support every facility in the CLR. An agreed minimum subset that almost all languages can support is defined in the Common Language Specification (CLS). The CLS is a set of rules that limits the type system and parts of the execution system to a certain group of the facilities provided by the CLR. The resulting feature set is designed to support interoperability between most programming languages. The CLS is, however, rich enough that nearly all meaningful libraries can be written using only CLS-compliant features. As a simple example demonstrating the relationship between the CLR's type system and the CLS, consider the integer types: The CLR supports both signed and unsigned integers, whereas CLS-compliant languages need to support only signed integers. Note that the CLS refers to only the publicly exposed aspects of a type; internally, a type can use any of the CLR's features while still remaining CLS compliant. Base FrameworkThe Base Framework provides a number of fundamental classes, of which every application will use a subset. These classes include Object , String , and Type :
These fundamental classes are described in detail in Chapters 2 “4. |