.NET Framework Architecture
Class Library
The class library provides a comprehensive set of facilities for application development. Primarily written in C#, it can be used by any language, thanks to the Common Language Specification.
A set of reusable objects which may be used within the context of a framework
but may also be used as stand-alone objects. The .NET Framework class library is
a library of classes interfaces and value types that are included in the
Windows Software Development Kit (SDK). This library provides access to system
functionality and is designed to be the foundation on which .NET Framework
applications components and controls are built.
The class library is structured into Namespaces, and deployed in shared libraries known as Assemblies. When we speak of the .NET framework , we are primarily referring to this class library.
Namespaces
Namespaces are a mechanism for logically grouping similar classes into a hierarchical structure. This prevents naming conflicts. The structure is implemented using dot-separated words. The top level namespace for most of the .NET framework is System. Under the System namespace you'll find the following:
• System.IO
• System.Net
• System.Net.Sockets
• System.Reflection
• System.Threading
• ...and many others.
Assemblies
Assemblies are the physical packaging of the class libraries. An assembly can also be composed of several files. These are .dll files, but don't confuse them with Win32 shared libraries. Examples are
• mscorlib.dll
• System.dll
• System.Data.dll
• Accessibility.dll
Common Language Infrastructure
More commonly known as the Common Language Runtime. This runtime is used to execute the compiled .NET application. To run your application, you must invoke the runtime with the relevant parameters.
Common Language Specification
It defines the interface to the CLI, such as conventions like the underlying types for Enum.
Managed and Unmanaged Code
Managed code runs in the Common Language Runtime. The runtime offers a wide variety of services to your running code. In the usual course of events, it first loads and verifies the assembly to make sure the IL is okay. Then, just in time, as methods are called, the runtime arranges for them to be compiled to machine code suitable for the machine the assembly is running on, and caches this machine code to be used the next time the method is called. (This is called Just In Time, or JIT compiling);
It compiled directly to machine code that ran on the machine where you compiled it—and on other machines as long as they had the same chip, or nearly the same. It didn't get services such as security or memory management from an invisible runtime; it got them from the operating system. And importantly, it got them from the operating system explicitly, by asking for them, usually by calling an API provided in the Windows SDK.


No comments:
Post a Comment