The document provides an overview of the .NET Framework, which is a development framework that provides a runtime environment and base class libraries. It discusses key aspects of the .NET Framework including its multi-language support through a common runtime engine, comprehensive base class libraries, and two-phase compilation process that first compiles code to CIL and then JIT compiles to machine code. The Common Language Runtime (CLR) is responsible for executing and managing code and types, while the Common Type System (CTS) and Common Language Specification (CLS) enable cross-language integration and interoperability.
4. .NET Framework
• It is framework for building software systems.
• .Net Framework provides Runtime Environment and Comprehensive
Base Class libraries(BCL).
• The run time layer is called Common Language Runtime(CLR).
5. Key Features
1. Multi-language Support:
Various languages(C#, F#, Visual Basic etc.) can be used to create .NET
Application
2. Single runtime engine:
Various languages follow fixed standard and they all run on single engine.
3. Comprehensive Base Class Libraries:
.Net Framework has predefined set of libraries through which you can build
code libraries, console(terminal) applications, graphical desktop applications,
web applications etc.
6. Key Features (Contd..)
1. Language Integration
There is cross language inheritance (You can write class in C# and extend it on
Visual Basic), cross language debugging and cross language exception handling.
2. Simple Deployment
3. Interoperability with existing code
.NET Framwork is backward-compatible and even can comingle with
COM(Component Object Model) based Softwares.
7. Compilation
• Two Phase Compilation
First Phase: CIL Generation from .NET Aware Compilers
Last Phase: Machine Code from JIT Compiler.
Figure 1 : First Phase Compilation
CIL
Jitter
Machine code
Figure 2 : Second Phase Compilation
8. Compilation
• Code Written in .NET Aware Language(C#, VB etc.) are compiled by
.NET Aware Compiler(C Sharp Compiler, Visual Basic Compiler etc.)
and .Net Binary blob is created.
• .Net binary blob is also termed as Assembly and it contains Common
Immediate Language(CIL)* and Metadata.
• JIT** compilers compile CIL codes to platform specific instructions.
• In this way compilation of .Net Code is done
* CIL is also termed as MicroSoft Intermediate Language(MSIL) or just Intermediate
Language (IL).
**Just In Time (JIT) or Jitters compiles IL into Machine code on the fly.
9. Common Language System(CLS)
• CLS says how computer programs can be turned to CIL.
• It is agreement among language designers and class library designers
to use common subset of basic feature that all languages have to
follow.
• Multi Language Support is possible due to CLS.
10. Common Type System (CTS)
• Types are Classes, Delegates, Enumeration, Structures and Interface
• CTS is formal specification that documents how types are declared,
used and managed.
• CTS provides Object Oriented Model and it also provides a library
primitive data type.
• It helps to enable cross language integration, type safety and high
performance code execution.
11. Common Language Runtime
• It’s a collection of services that are required to execute a given
compiled unit of code.
• It is responsible for resolving location of assembly and finding the
requested type within binary by reading contained metadata
• It loads custom assemblies, creates custom types, interacts with types
contained in .NET Base Class Libraries