Common Language Infrastructure CLI and Common Language Runtime CLR

111

Chapter 3. The .NET Framework

The .NET Framework is the next iteration of Microsofts platform for developing component-based software. It provides fundamental advances in runtime services for application software. It also supports development of applications that can be free of dependencies on hardware, operating system, and language compiler. This chapter provides an overview of the architecture of the .NET Framework and describes the base features found in the core of its class library.

3.1 Common Language Infrastructure CLI and Common Language Runtime CLR

At the heart of the .NET Framework is a new mechanism for loading and running programs and managing their interactions. This mechanism is described in the Common Language Infrastructure CLI, a specification for a runtime environment that allows software components to: • Pass data between each other without regard to the programming language in which each component is written • Execute on different operating systems and on different hardware platforms without having to recompile the high-level source code a low-level compilation still automatically occurs on the target platform, as will be discussed in this chapter Although the CLI specification was created by Microsoft, it has since been submitted to the ECMA standards organization ht t p: w w w .ecm a.ch , which now has responsibility and control over it. The CLI is just a specification—it has to be implemented in order to be useful. An implementation of the CLI is known as a Common Language Runtime CLR. Microsofts CLR implementation on the Windows platform is not under ECMAs control, but it is Microsofts intention that the CLR be a fully compliant implementation of the CLI. As of this writing, the CLI has not been implemented on non- Windows platforms, but Microsoft and others have announced intentions to do so. The CLI specifies how executable code is loaded, run, and managed. The portion of the CLR that performs the tasks of loading, running, and managing .NET applications is called the virtual execution system VES. Code run by the VES is called managed code . The CLI greatly expands upon concepts that exist in Microsofts Component Object Model COM. As its core feature, COM specifies how object interfaces are laid out in memory. Any component that can create and consume this layout can share data with other components that do the same. COM was a big step forward when it was introduced circa 1992, but it has its shortcomings. For example, in spite of its name, COM actually has no concept of an object—only object interfaces. Therefore, COM cant support passing native types from one component to another.

3.2 Common Type System CTS