.NET Framework and the Common Language Runtime

The .NET Framework is really the key highlight of the overall .NET platform. In a lot of ways, it is the genesis of a continuing series of platform changes occurring in the Microsoft technology platform.

Key components of .NET Framework are the following:

  1. Common Language Runtime — The Common Language Runtime, or CLR, as it is popularly known, is the most significant component of the .NET Framework. The CLR provides a runtime environment for the execution, security, and management of .NET applications and components. Highlights of the CLR are a common type system (CTS) that defines common data types that can be used by .NET programming languages, garbage collection for automated memory allocation and deallocation of memory (thereby reducing the number of developer-induced memory leaks), rich metadata that supports registryless deployment, and the notion of strongly named assemblies with a Global Assembly Cache (GAC) for eliminating DLL Hell. .NET applications and components are now compiled into an intermediate MSIL code that is then deployed into users’ workstations or servers. On execution, the MSIL code is converted into native platform executables by the JIT (Just In Time) compiler.
  2. .NET programming languages — .NET Framework supports four programming languages: the newly introduced Java-like C# object-oriented programming language; Visual Basic .NET, which is a major evolution from the Visual Basic language and provides full–blown, object-oriented features to the platform; Visual J#, which provides Java developers the capability to develop .NET applications; and Managed C++, which includes extensions to develop managed code in C++ and allows C++ developers to utilize the new CLR-based programming model. In addition, because the base CLR specification is available as an open standard, third-party developers can provide additional programming languages for the .NET platform.
  3. .NET Framework class library — A rich and elaborate class library that provides prebuilt common functionality to all .NET programming languages. This includes collections, basic input/output, reflection, regular expressions, multithreading, networking, XML, database connectivity (ADO.NET), .NET Remoting (a next generation of the DCOM distributed application deployment model), COM+ Enterprise Services (Transaction Management, Object Pooling, Just In Time Activation), and Message Queuing.
  4. ASP.NET — Microsoft Active Server Pages (ASP) introduced a new paradigm for the development of Web-based applications. Even though the ASP application programming model was a runaway success, it did have its own issues. A number of these were related to the intrinsic COM-based application deployment model; for instance, you weren’t able to update a COM component that was currently used by a Web application without stopping the Web server. Other issues were more directly related to ASP: the nonexistence of a scalable session management model, use of VBScript (a subset of a programming language) for application development, and no centralized authentication model. ASP.NET, also known as Web forms, truly builds on the success of ASP and attacks the specific issues faced by developers. For instance, ASP.NET applications can be developed in C#, Visual Basic .NET, or J#. ASP.NET introduces a scalable and configurable session-management model with true Web-farm support, a rich set of Web forms server controls that provides an easy-to-use event programming model for Web applications, a centralized XML-based configuration mechanism for key application facilities such as authentication mechanisms, and so on.
  5. Web services — The extensive set of XML/Web services support in almost all areas of the .NET is quite visible. Even the .NET Remoting programming model for distribution of components utilizes the Web services-based distribution mechanism. ADO.NET uses XML as a data-exchange layer between database connectivity providers. Web-services development in .NET is similar to another class with some extensions based on attributes. Deploying a Web service is as simple as copying a file (with the .asmx extension) into a Web directory, similar to deploying a Web application. All the necessary plumbing related to support of Web-services standards, including XML, SOAP, and WSDL, is done by the underlying framework. Consuming a Web service from another application or within the same application is also as simple as creating a proxy object, which makes invoking Web services similar to invoking a method on another class.
  6. Interoperability — Interoperability with existing COM/COM+ applications and components is probably one of the most important features of the .NET Framework. This is particularly important to a large pool of enterprise application and component developers, who have collectively invested many years of effort developing COM applications. Typically in these scenarios, you would like to expose key components of the existing applications to a next generation of .NET based applications or, in some cases, integrate some of the newer functionality in the .NET Framework—particularly .NET Web services—into your existing applications. .NET Framework supports tools that basically allow COM components to be “wrapped” as .NET components, and visa versa.