Elements
of the .NET Framework
The .NET
Framework consists of three key elements:-
Components
of the .NET Framework
- Common Language Runtime
- .NET Class Library
- Unifying components
Common Language
Runtime
The Common Language Runtime(CLR) is a layer between an application and the operating system it executes on. The CLR simplifies an application's design and reduces the amount of code developers need to write because it provides a variety of execution services that include memory management, thread management, component lifetime management, and default error handling. The key benefit of the CLR is that it transparently provides these execution services to all applications, regardless of what programming language they're written in and without any additional effort on the part of the developer. The CLR is also responsible for compiling code just before it executes. Instead of producing a binary representation of your code, as traditional compilers do, .NET compilers produce a representation of your code in a language common to the .NET Framework: Microsoft Intermediate Language (MSIL), often referred to as IL. When your code executes for the first time, the CLR invokes a special compiler called a Just In Time(JIT) compiler, which transforms the IL into executable instructions that are specific to the type and model of your system's processor. Because all .NET languages have the same compiled representation, they all have similar performance characteristics. This means that a program written in Visual Basic .NET can perform as well as the same program written in Visual C++ .NET.
Common
Type System
The Common Type System
(CTS) is a component of the CLR and provides a common set of data types, each
having a common set of behaviors. In Visual Basic, for example, the String data
type maps to the CTS System.String class. Therefore, if a Jscript .NET client
needs to communicate with a component implemented in VB .NET, the client
doesn't have to do any additional work to exchange information because it's
using a type common to both JScript .NET and VB .NET. The CTS eliminates
many interoperability problems that exist outside .NET.
ASP.NET programming languages take
advantage of the CTS by enabling developers to use their language's built-in
data types — the .NET compilers convert the native data types' into their
equivalent CTS types at compile time. Developers can also use CTS types
directly in their code.
ASP.NET Class
Library
In an earlier section,
"Consistent programming models across programming languages, "the .NET
Class Library was described as containing hundreds of classes that model the system
and services it provides. To make the .NET Class Library easier to work with
and understand, it's divided into namespaces. The root namespace of the .NET
Class Library's called System, and it contains core classes and data types,
such as Int32, Object, Array, and Console. Secondary namespaces reside within
the System namespace.
0 comments
Post a Comment