.NET Framework Components

burgerraraSoftware and s/w Development

Nov 18, 2013 (3 years and 6 months ago)

79 views

.NET Framework Components

The .NET framework is a collection of classes and the platform that runs your applications.
The .NET framework is made up of a number of components.

Term

Description

Microsoft
Intermediate
Language
(MSIL)

All .NET programs compil
e to Microsoft Intermediate Language (MSIL) or
IL.
Remember these key points about IL:



C# programs are compiled to IL.



IL is similar to Java's byte code.



IL allows for language interoperability.



IL allows platform independence.

Common
Language
Runtime

(CLR)

The Common Language Runtime (CLR) executes IL code. The CLR is the
execution environment for all .NET applications.



The CLR is similar to the Java JVM (Java Virtual Machine).



The CLR provides a managed environment for code execution.

o

A managed en
vironment makes the code more secure by
protecting the code from doing things, such as illegal memory
access operations.

o

A managed environment manages memory for the program.

o

A managed environment adds additional runtime support not
available in native p
rograms, like garbage collection.



The CLR executes IL code.

o

Note:

The CLR uses a Just In Time compiler (JIT) to compile
MSIL code to native code. The JIT considerably improves the
performance and speed of .NET programs.
The JIT is the
reason .NET program
s are fast.



The CLR provides a host of services to .Net applications, including:

o

Input/Output support.

o

Multi threading support

Common Type
System (CTS)

In order to support language interoperability, the .Net framework contains a
Common Type System (CT
S). The CTS defines types that are common to all
.NET languages. For example, Int32 is a common type. In C# this type is
referred to by using the

int
keyword, while Visual Basic .Net uses the

integer
keyword.

.NET Library

The .NET class libraries are pre
-
written classes that provide a rich
assortment of pre
-
defined code.



All classes in the .NET libraries are organized into namespaces.



Most of the classes in the .NET library can be found in the
System

namespace.

Assembly

In .NET, an assembly is the small
est distributable unit.



Assemblies compile down to either a managed executable (.exe) or a
managed dll (.dll).



Assemblies contain the IL code pertaining to a dll or executable.



Assemblies have a resource file. This file contains resources such as
images
for the assembly to use.



Assemblies have Meta Data about the assembly.

o

Meta Data stores all of the necessary information to allow
other .Net assemblies to interact.

o

All of the information about an assembly available to the
compiler at compile time is ke
pt in the Meta Data.



This allows assemblies to use classes declared in other
assemblies.



This information can also be used by the programmer
at run time.