Anda di halaman 1dari 5

The RTE (Run Time Environment) of an .

NET Application
Code in another .NET Language

Code in C#.NET

Code in VB.NET

C#.NET Compiler

VB.NET Compiler

Another Compiler

MSIL Code Common Language Run Time

Just-in Time Compiler

Native Machine Code

Execute

.NET 3.5 and Visual Studio 2008

Hour 6 - Page 1 of 5

Components of CLR
The CLR contains the following components. Security Manager / Code safety verifier JIT Compiler

Memory Manager
Garbage Collector

Exception Manager

1.

Security Manager / Code Safety Verifier


This is the initial and most component of CLR. Application security is much more important issues today. If you analyze this in-depth, we have 3 types of security support by

.NET Framework.

A. Evidence Based Security (EBS): This security feature is meant for protecting entire
assembly not to be accessed by un-authorized users.

The

Security

Manager

component

first

checks

privileges of the current user that the user is allowed to access the assembly or not, based on the evidence.

The evidence is nothing but the information about the


security permissions related to the assembly, that resides with in the assembly.

B. Code Access Security (CAS): This verifies whether the current user is allowed to
perform the actions written in the MSIL code.

For example, accessing the file system, event log,


printing, remote or network access etc.

.NET 3.5 and Visual Studio 2008

Hour 6 - Page 2 of 5

2.

JIT Compiler
As you seen in the diagram of RTE previously, the JIT compiler is The native code is directly understandable by the system hardware. responsible for compiling the MSIL code into the Native code.

3.

Memory Manager
The Memory Manager component of CLR, allocates necessary memory for the variables and objects that are to be used by the application.

4.

Garbage Collector
This component of CLR de-allocates or cleans-up the un-necessary

memory of the application, after usage automatically. Instead, in older languages such as C/C++ this kind of component is

not available so that the programmer should free-up the memory explicitly using some code.

5.

Exception Manager
An exception means Run time error. This component redirect the processor to execute the catch block or

finally block, whenever an exception is occurred at run time. We can learn how to write these catch and finally blocks in C#.NET and

VB.NET languages later.

Naming Convention 1. Namespace, Classes and Methods:


Each world in the name space should be started with upper case character. Ex: WebControls, Threading, OracleClient, InitializeComponent() etc.

2. Variables and objects:

.NET 3.5 and Visual Studio 2008

Hour 6 - Page 3 of 5

This is programmers choice. You can maintain all the characters in lower case (or) you can also maintain the naming convention recommended for namespaces. Ex: i, abc, Abc, AbcXyz etc.

.NET 3.5 and Visual Studio 2008

Hour 6 - Page 4 of 5

The .NET Framework Class Library (FCL) Architecture


The .NET Framework Class Library contains the following namespaces. Note: A namespace is a collection of few classes or namespaces. The inner namespaces, contained by another namespace is called as sub namespace. The most frequently used namespaces of FCL are listed here.

System

Window s

Web

Drawi ng

Dat a

Xml

Lin q

Threadi ng

IO

Tex t

Configurati on

Forms

UI

Printin g

OleD b

SqlClien t

OracleClie nt

HtmlContr ols

WebContro ls

.NET 3.5 and Visual Studio 2008

Hour 6 - Page 5 of 5

Anda mungkin juga menyukai