You are on page 1of 23

Microsoft .

NET Framework
Minn Swe
Introduction

 What is .NET framework?


 Software platform developed by Microsoft

 In other words:

• An enhanced framework for developing both web-based and


windows-based applications
• .NET is not a language (Runtime and a library for writing and
executing programs written in any .NET compliant language)
Introduction

.NET Application

.NET Framework

Operating System + Hardware


Architecture

 The .NET Framework includes two major


components :

 The Common Language Runtime (CLR)

 The Class Libraries (CL)


Architecture

 Common Language Runtime (CLR)

 CLR works like a virtual machine in Java

 It manages and executes code written in .NET languages (VB,C#,J#,etc…).

 All .NET languages must obey the rules and standards imposed by CLR.
Examples:
• Object declaration, creation and use
• Data types,language libraries
• Error and exception handling
Architecture
 Class Libraries

 They are collection of classes for various purposes

 Classes of same nature are combined as the Name Spaces


Architecture

Assembly

CL Class Loader

JIT
CLR

Machine Code

7
Architecture

VB VC++ VC# JScript …

Common Language Specification

Visual Studio.NET
ASP.NET: Web Services Windows
and Web Forms Forms

ADO.NET: Data and XML

Base Class Library

Common Language Runtime


Windows and Web application on .NET
framework

 Windows Forms
 Framework for Building Rich Clients
– RAD (Rapid Application Development)
– Rich set of controls
– Data aware
– ActiveX® Support
– Licensing
– Accessibility
– Printing support
– Unicode support
– UI inheritance
Windows and Web application on .NET
framework

 ASP.NET

 ASP.NET,the platform services that allow to program Web


Applications and Web Services in any .NET language

 ASP.NET Uses .NET languages to generate HTML pages. HTML


page is targeted to the capabilities of the requesting Browser

 ASP.NET “Program” is compiled into a .NET class and cached the


first time it is called. All subsequent calls use the cached version.
Data Access Portion

 ADO.NET (Data and XML)

 New objects (e.g., DataSets)

 Separates connected / disconnected issues

 Great support for XML


.NET goals

 .NET is the result of many influences…

OOP
JVM

GUI .NET Web

component-
based design n-tier design
.NET goals

 .NET features :

 Multi-language support
 Automatic resource management
 Type safety
 Elimination of DLL hell
 Componet based
.NET goals

 Multi-language support

 The .NET platform supports many programming languages. A


new compiler must be implemented for each language.
 Programmers do not need to be retrained in a completely new
language in order to gain the benefits of .NET.
.NET goals

 Intermediate Language (IL)


• .NET languages are not compiled to machine code. They are compiled to an
Intermediate Language (IL).

• CLR accepts the IL code and recompiles it to machine code. The


recompilation is just-in-time (JIT) meaning it is done as soon as a function or
subroutine is called.

• The JIT code stays in memory for subsequent calls. In cases where there is
not enough memory it is discarded thus making JIT process interpretive.
.NET goals

 Compilation in .NET

Code in another
Code in VB.NET Code in C#
.NET Language

Appropriate
VB.NET compiler C# compiler
Compiler

IL(Intermediate
Language) code

CLR just-in-time
execution
.NET goals

 .NET supports VB, C#, C++, J#, etc.

code.vb code.cs code.js ...

Development Tools CL

app.exe
.NET goals

 Automatic resource management

 No need to allocate memory

 No need to deallocate memory


• Garbage collector

 The runtime automatically handles object layout and manages


references to objects, releasing them when they are no longer
being used. This automatic memory management resolves the two
most common application errors, memory leaks and invalid
memory references.
.NET goals

 Type safety

 Every data structure in all .NET supported languages has the same
layout.

 This means that some code can consume types and instances
declared in other languages.
.NET goals

 Elimination of DLL hell

 Maintaining a Windows PC is a chore, because applications are quite


complex. They consist of many files, registry entries, shortcuts, and so on
 Different applications can share certain DLL,and installing a new
application can overwrite a DLL an existing application depends on,
possibly breaking an old application (“DLL hell”).
 Removing an application is complex and is often imperfectly done.
.NET goals

 Component-based

 Many motivations:
• team programming
• multi-language development (I like VB, you like
C#)
• code reuse (e.g. across different .EXEs)
• independent updating (update just component X)
Summary

 .NET architecture is:


 multi-language
 cross-platform
 based on the CLR, FCL, and JIT technology

 Application designs are typically multi-tier

 Application designs yield component-based development


 .NET components are packaged as assemblies
Thank You

You might also like