Framework
Framework
Framework
NET Framework
Architecture
• The code which runs under the CLR is called as Managed Code.
Execution In CLR
• The .NET Compiler will create MSIL while you run your program and JIT
(Just in Time compiler) will convert your Intermediate Language to
machine code (Native Code).
• It is also known as data access layer. With the help of this layer we can
access relational databases. it work with XML and provides the
Disconnected Data Model)
– Data Provider
Data Set
• It has a rich variety of windows controls and user interface support like
Textbox, Button, Checkbox, Etc.
• Using visual Studio.NET, we can simply design the GUI by dragging the
controls on a form.
• Web Forms are similar to Windows Forms in that they provide properties,
methods, and events for the controls that are placed onto them.
• If you use Microsoft Visual Studio® .NET, you will also get the familiar
drag-and-drop interface used to create your UI for your Web application
Web Services
Web services are the applications that run on a web server and
communicate with other application. It uses a series of XML based
communicating protocols that respond to different requests.
• Defines rules that languages must follow, which helps ensure that
objects written in different languages can interact with each other
Metadata
Assembly
– These assemblies are public so that other assembly can use it.
Managed Module
(MSIL and
Metadata ) Assembly
Manifest
Managed Module
(MSIL and
Metadata)
Multiple managed
module and
Resource File resource files are
compiled to produce
an assembly
15
Manifest
• It contains
• Version information
• Security information
Namespace
• The code which runs under the CLR is called as Managed Code.
Execution In CLR
• When the .NET program is compiled, the output of the compiler is not an
executable file but a file that constraints a special type of code is called
Microsoft intermediate, which is a low level set of instructions
understand by CLR.
• It’s the job of the CLR to translate this MSIL into native code when the
program is executed, making the program to run in any environment for
which the CLR is implemented. And that’s how the .NET framework
achieves Portability.
Purpose of CLR
• Base class library: It provides all the types that an application need at
runtime.
•
• Thread Support: Threads are managed under the Common Language
Runtime. Threading means parallel code execution. Threads are basically
• Type Checker
Type checker will verify types used in the application with CTS or CLS
standards supported by CLR, this provides type safety.
• Exception Manager:
it handles all the runtime Exception exceptions thrown by application
• Garbage Collector
Garbage Collector handles automatic memory management and it will
release memory of unused objects in an application, this provides
automatic memory management.
• Class Loader:
– As and when needed. it loads the classes into the system memory
CTS
Common Type System (CTS) describes the data types that can be used by
managed code. CTS define how these types are declared, used and managed in
the runtime.
In CTS, it deals with the data type. Here we have several languages and each
and every language has its own data type and 1 language data type cannot be
understandable by other languages but I can understand all the data types.
C# has int Data Type and VB.Net has Integer Data Type. Hence a variable
declared as int in C# or Integer in vb.net, finally after compilation, uses the
same structure Int32 from CTS
All the structures and classes available in CTS are common for all .NET
Languages and the purpose of these is to support language independence in
.NET. Hence it is called CTS.