Dot net frame work

[LEFT][COLOR=darkorchid]Over View of The Dot Net Frame Work

[COLOR=darkorchid]What is Dot Net Frame Work?

  • Dot Net is a managed Type-safe environment for application development and execution

How Dot Net Frame Work manage all aspect of your program?

  • Allocate memory for storage of data and instructions
  • Grants or denies the appropriate permissions to your application
  • Initiate and manage application execution
  • Manage the reallocation of memory from resources that are no longer need

What is the main component of Dot Net Frame Work?
Dot Net Frame Work consist of to main component

  • The Common Language Runtime {CLR}
  • Dot Net Frame Work {Base} Class Library {BCL}

What you can thought of about Common Language Runtime?
Common Language Runtime can be thought of as the environment that manages code execution because it provide core services such as

  • Code compilation
  • Memory allocation
  • Thread management
  • Garbage collection

How Common Language Runtime enforce strict Type-safe and ensures that code is extended in a safe environment?
Common Language Runtime doing this through Common Type System {CTS}

What is Dot Net Frame Work Base Class Library Provide?
Its provide collection of useful and reusable types and classes
That are designed to integrate with the common language runtime

Language and Dot Net Frame Work

Why the needed to design Dot Net Frame Work?
[COLOR=darkorchid]Because Design of Dot Net Frame Work ill support cross-language compatibility

What is meaning of cross-language compatibility?
Means that Dot Net Component {Textbox-Button-Label} can interact with each other no matter what supported language they written in.
Like when we are building an application by VB.NET which reference a Dynamic Link Library {DLL}which written in other language like C#

Why cross-language compatibility is possible in Dot Net?
Its possible because of Common Language Runtime which convert Dot Net application from the language it was written {VB.NET,C#,C++} to an intermediate language {Microsoft Intermediate Language - MSIL}

What is MSIL?
MSIL is low-level language that Common Language Runtime can read and understand it.

What is Common Language Specification {CLS}?
CLS defines the minimum standards to which Dot Net Language compilers must confirm .
which means that CLS ensures that the source code successfully compiled by Dot Net compilers can interoperate with Dot Net Frame Work

The Structure of Dot Net Frame Work application

What is the primary unit of Dot Net application?
[COLOR=darkorchid]Assembly is the primary unit of Dot Net application.

What is the Assembly?
Assembly is self-describing collection of Code, Recourses, Metadata.

What is the assembly manifest contain?
Assembly manifest contains information about what is contained within the assembly.

What is the assembly manifest provides?

  • Identify information such as assembly name, version number
  • List of all types exposed by the assembly
  • List of other assemblies required by the assembly
  • List of code access security instructions, including permissions required by the assembly and permissions to be denied the assembly.

Compilation and execution of Dot Net Application

What happened when execution of your program begin?
[COLOR=darkorchid]- Assembly loaded into memory

  • CLR examines the assembly manifest and determine the requirement to run the program

What is the requirement CLR need from assembly manifest?

  • Security permissions requested by the assembly

Why CLR need to know Security permissions from assembly manifest?
Because CLR compare it with system security policy which return with two cases

First one

  • System security policy not allow the requested permission which mean that the application will not be run.

Second one

  • System security policy allow the requested permission then CLR execute the code and create process for application to run and begin application execution.

What happened when execution begin?

  • First bit of code that needed to be executed is loaded into memory
  • Compile it to the native binary code from MSIL by Just In Time {JIT} compiler
  • Code executed and stored in memory as native binary code.

How Just In Time {JIT} Compiler work?

  • JIT Compiler compile first bit of code that needed to be executed
  • Store the compiled code in memory as native binary code
  • When program execution branches to code that has not run yet JIT compiler compiles the need code and store it as native binary code in memory.

The way that JIT compiler work increase the application performance because the only parts of program that are executed is compiled to native binary code and store in memory.[/color]


many thanxxxxxxxxx