The RTE (Run Time Environment) of an .NET Application

Components of CLR
The RTE (Run Time Environment) of an .NET Application 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.

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

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:
• This is programmer’s 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.
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.
The RTE (Run Time Environment) of an .NET Application