Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 38

Session 1

Introduction to .Net Framework

1
Argenda

CLR Versions
and
Incremental .
NET Side By side
Framework Execution
Compilation
Stack
Model

What is .NET
and
Important
components
Brief
History

2
Evoluation

Functional
Scripting
Declarative
Object
Oriented
Procedural
Assembly
Machine

3
What is .Net?
A software framework
Integrate presentation technologies, component technologies and
data technologies on a single platform
Enable users to develop internet applications as easily as they do on
desktop systems.

4
Origins of .NET Technology

Phase I OLE Interprocess


Early 1990s Technology Communication

Phase II COM Interprocess


Early 1995s Technology Communication

Phase III Intersite


.NET
Late 1990s Communication
Technology

5
OLE Technology

Object Linking and Embedding Technology


To embed documents from one application into another application
To enable one application to manipulate objects located in another
application

6
OLE Technology

Application A Application B

Linking
O1 O1

Embedding
O2
O2

• Changing to O1 in Application B effects O1 in Application A


• Editing O2 in Application A will lunch Application B 7
COM Technology

Component Object Model (COM)


Software built using COM is referred to as componentware
Program is broken into a number of independent components where
each one offers a particular service. Each component can be
developed and tested independently and then integrated it into the
main system.
Provide a standard binary mechanism for inter-module
communication.

8
COM Technology

Component Component Component


1 2 3

Main Application

9
COM Technology

Benefits
Reduce the overall complexity of software
Enable distributed development across multiple organizations
or departments
Enhance software maintainability

10
COM Technology

Benefits
Reduce the overall complexity of software
Enable distributed development across multiple organizations
or departments
Enhance software maintainability

11
.NET Technology

Third-generation component model


A new level of inter-operability
Inter-module communication mechanism is replaced by an
intermediate language called Microsoft Intermediate Language
(MSIL) or IL.

12
.NET Technology

C# Component VB.NETComponen C++ Component3


1 t2

MSIL

Main Application

13
Why .NET?

Code
Reusability Platform
Independence

14
Goals of .NET
1. To unify desktop and Web programming

Desktop Programming Web Programming


- ASP (not object-
- Object-oriented oriented)
- Compiled (C/ C++, - Interpreted (VBScript,
Fortran, …) Javascript, PHP,…)
- Class Library - Special Library

Desktop and Web Programming


- Object-oriented (ASP.NET)
- Compiled (C/ C++, VB.net, Fortran, …)
- Uniform Class Library

15
Goals of .NET

2. Interoperability between programming languages

Binary compatibility
Million lines of code in between more than 20
C#, Fortran, VB, etc… languages (C, C#,
Very limited VB.net, Java, Eiffel,
interoperability Fortran, Cobol, ML,
etc…

16
Goals of .NET

3. Web services: distributed application on the internet

B to B application
Email, Web browser without a Web browser

17
Goals of .NET

4. Simpler dynamic web pages

ASP.NET (clear
ASP (a mixture of HTML separation of HTML and
and Javascript or scriptcode
VBscript

18
Available Languages in .Net Application

VC+
VB.NET F#
+.NET

Third
JavaScript
Party

19
Types of Application Developed

Console Windows Client/Desktop Server/Web Smart De


Win Store Apps
Applications Services Applications Applications Applicati

ASP.NET
Win Forms
Web Forms

ASP.NET
WPF MVC

XML Web
Services

WCF
Services

20
.NET
Framewor
k 21
Is
.NET Framework: two Main Components
Is run-time
run-time environment
.NET Apps
Apps
environment to to execute
execute

Code
Code Execution
Execution
Exception
Exception Handling
Handling Framew
Resource
Resource Management
Management
Garbage
Garbage Collection
Collection ork Class
Code
Code Access
Just
Access Security
Security Library
Just In
In Time
Time Compilation
Compilation
Language
Language Interoperability
Interoperability
Application
Application Isolation
Isolation

.NET
Framewor Common
• Library of tested, reusable code that developers
can use in own kapplications
Languag
• Consists
Consists of
of classes,
classes, interfaces,
interfaces, and
and structures,
structures, e
delegates etc.
• Categorized using Namespaces
Runtime

22
.Net Framework Class Libraries
System.Web System.Windows.Forms
Services UI Form Button
Description HtmlControls MessageBox ListControl
Discovery WebControls
Protocols System.Drawing
Caching Security Drawing2D Printing
Configuration SessionState Imaging Text

System.Data System.Xml
OLEDB SQL XSLT Serialization
Design SQLTypes XPath

System
Collections IO Security Runtime
Configuration Net ServiceProcess InteropServices
Diagnostics Reflection Text Remoting
Globalization Resources Threading Serialization

23
Classic Vs .Net Compilation

C# Source Code Using FCL


Classes
C Source Code C# Compiler

C Compiler Assembly [CIL]

JIT
Machine Code
OS
Executed by OS CLR
Machine Code
FCL Assemblies
Executed by CLR
OS

24
.NET Architecture
•• Common
Common Intermediate
Intermediate Language
Language
•• Earlier
Earlier called
called Microsoft
Microsoft Intermediate
Intermediate Language
Language or
or Meta Information
MSIL or
MSIL or IL IL
••Optional
Also
Also referred
referred as Managed Code Assembly
•• Optional part as Managed Code
part
Manifest
••Details
•• •• Is
Details
an object-oriented
IsInformation
anof
object-oriented
of external
external
Information
assembly
assembly
resources
about all if
types
resources
about all types
language
language
if used
used
used
used in
in source
source code
code
•• Advantages
Advantages Type
•• Platform
Platform Independence
Independence Metadata
•• Language
Language Independence
Independence
•• Consist of Resources
of Meta-information
•• Information
Consist Meta-information
Information about and
and CIL
about assembly
assemblyCIL
•• Basic Building blocks
•• Assembly
Basic Building of .NET
blocks name Framework
of .NET Framework
Assembly name
•• Self
Self Descriptive
•• Assembly
Descriptive
Assembly Version
Version
•• Two Types
Two Types •• Security
Security Key
Key
•• Private
•• References
PrivateReferences to
to other
other assemblies
assemblies used
used
•• Public
Public CIL

Assembly
Platform Independent
Production Platform
Development Platform
Assembly
Assembly // PE
PE

•• Resources C# Source Code


required
Resources
L Class Ref required to
to develop
develop and
and execute
execute the
the applications
applications
•• Typically (Uses ref
Typically includes of dlls from
includes aa hardware
hardware architecture
architecture and aa software
and CLR software framework
framework
FCL) FCL

Assembly Loader

C# Compiler
JIT

Assembly / PE (exe / dll)


Meta Machine Code
CIL Code
Information

.NET Framework
26
Platform Independent
F# / C+
C# Code +.NET/ Any
VB.NET Code CLS
compatible

VB.NET C# Compiler Lang


Compiler Compiler

CIL

JIT FCL
FCL
CLR

Native Code
NET
Framework
Revisited 28
FCL
•• Common
Common Language
Language Infrastructure
Infrastructure isis an
an
international
CLS works
works with
international
CLS with standard
the that
the CTS
standard thatto
CTS is the
ensure
tois basis
the basis
ensure
Common
Common Type System
System defines
defines the
for
for creating
language executionType
execution
interoperability
creating
language interoperability and
and development
development the
environments set
set in which languages and
The CLS
CLS isis aapredefined
environments
The set
in of
set minimum
which
of standards
languages
minimum and that
standards thatin
libraries work predefined
together data
data types
types
seamlessly. available
available in
all
all compilers
libraries worktargeting
compilers together.NET
targeting must
seamlessly.
.NET must support.
support.
IL
IL

Code
Code Access
Access Security
Security Applies
Applies the
the
Is run-time
Is run-time environment
environment to
to execute
execute .NET
permission
permission to to code,
code, based
based on source.NET
on source of
of code
code
Apps
Appsand
and other
other identities
identities
Commercial
Commercial
•• Compiles implementation
implementation
CIL to Machine of
of CLI
codeCLI by
by
Compiles
Microsoft CIL to Machine code
Microsoft
•• compiles
compiles portion
portion ofof code
code as
as it
it is
is called.
called.
Code
Code
And Execution
Execution
cached
••And cachedcollector
garbage
garbage collector manages the allocation
Exception
Exception Handlingmanages the allocation
Handling
and
and release
release
Resource of
of memory
memory for
Management for your
your
Resource Management
application.
application.
Garbage Collection
Garbage Collection
•• Code
Reclaims
Reclaims unreferenced
unreferenced or dead objects
Code Access
Access Security or dead objects
Security
and
andIn clears their memory.
Just
Just Inclears
Timetheir
Time memory.
Compilation
Compilation
Language
Language Interoperability
Interoperability
Application
Application Isolation
Isolation

CA G
CLR JIT CLS CTS
S C
29
FCL
Library
Library of
of tested,
tested, reusable
reusable code
code that
that developers
developers can
can
Provides
Provides architecture
architecture to
to develop
develop web
web applications
applications
use in
in own
useand own applications
applications
and web
web services. Subsets
Subsets are
services.interfaces,
areand structures,
Consists
Consists of
of classes,
classes, interfaces, and structures,
•• WebForms
WebForms
delegates
delegates etc.
etc.WebServices
•• XML
XML WebServices
Categorized
Categorized using
using Namespaces
Namespaces

Namespaces
Namespaces support
support the
the hierarchical
hierarchical
organization
organization of
of classes
classes and
and prevent
prevent type
type name
name
Provides
Provides architecture,
collisions
collisions architecture, library
library and
and controls
controls to
to WinForms ASP.NET
ASP.NET
WebForms / Web Services
develop
develop desktop
desktop applications.
applications. WinForms WebForms / Web Services

Set ADO.NET
Set of
of classes
classes to
to be
be used
used for
for database
database ADO.NET
communication
communication
200
Set
Set of
of common
common classes
classes need
need in
in various
various types
types of
of Base Framework Library 2.0
Base Framework Library
applications.
applications.
Typically
Typically classes
classes in
in System
System namespace.
namespace.
CA G
CLR JIT CLS CTS S G C
30
CLR C
presentation
presentation system
system for
for building
building Windows
Windows client
client
applications
applications with
with visually
visually stunning
stunning user
user experiences.
experiences. FCL
resolution-independent
resolution-independent and
and vector-based
vector-based rendering
rendering
engine
engine
Features:
Features: XAML,
XAML, 3D3D Graphics,
Graphics, Animation,
Animation, Media,
Media,
etc
etc

framework
framework forfor building
building service-oriented
service-oriented
applications.
applications.
Workflows
Workflows provide
provide aa way
way of
of describing
describing the
the
order
order of
of execution
execution and
and dependent
dependent WPF WCF WF CardSpace 2006
relationships
relationships between pieces of
between pieces of short-
short- or
or long-
long- 3.0
running
running work.
work.

ASP.NET
provides
provides aa standards-based
standards-based solution
solution for
for working
working
WinForms WebForms / Web Services
with and managing diverse digital identities.
with and managing diverse digital identities.
Discontinued
Discontinued from
from Feb
Feb 2011
2011
Microsoft
Microsoft is
is currently
currently working
working on
on aa ADO.NET
replacement
replacement called
called U-Prove
U-Prove

Base Framework Library


200
2.0

CA G
CLR JIT CLS CTS
S C
31
CLR
FCL
set
set of
of features
features introduced
introduced in
in Visual
Visual Studio
Studio 2008
2008
that
that extends
extends powerful
powerful query
query capabilities
capabilities to
to the
the
language syntax of C# and Visual Basic.
language syntax of C# and Visual Basic.
CLR, Other
LINQ
ASP.NET
Enhanceme 2007
3.5, AJAX
nts 3.5

New
New server
server controls
controls and
and ASP.NET
ASP.NET AJAX
AJAX WPF WCF WF 2006
3.0

ASP.NET
WinForms WebForms / Web Services
Enhancements
Enhancements in
in Common
Common Language
Language Runtime
Runtime
Enhancements
Enhancements in
in WPF,
WPF, WCF,
WCF, Networking,
Networking,
Windows
Windows Forms,
Forms, etc
etc ADO.NET

Base Framework Library 2005


2.0

CA G
CLR JIT CLS CTS
S C
32
CLR
FCL
2008
Entity Framework Dynamic Data 3.5sp
object-relational
1
object-relational mapper
mapper that
that enables
enables .NET
.NET
developers
developers to
to work
work with
with relational
relational data
data using
using LINQ
ASP.NET
CLR, Other
Enhanceme
2007
domain-specific
domain-specific objects.
objects. It
It eliminates
eliminates the
the need
need 3.5, AJAX
nts 3.5
for most of the data-access code that developers
for most of the data-access code that developers
usually
usually need
need toto write.
write. 2006
WPF WCF WF 3.0

ASP.NET
ASP.NET Dynamic
Dynamic Data
Data lets
lets you
you create
create ASP.NET
WinForms WebForms / Web Services
extensible
extensible data-driven
data-driven WebWeb applications
applications byby
inferring
inferring at
at run
run time
time the
the appearance
appearance andand
behavior
behavior of
of data
data entities
entities from
from the
the database
database
schema
schema and
and deriving
deriving UI
UI behavior
behavior from
from it.
it. ADO.NET

2005
Base Framework Library
2.0

CA G
CLR JIT CLS CTS
S C
33
CLR
FCL
Parallel
Parallel LINQ
LINQ (PLINQ)
(PLINQ) is
is aa parallel
parallel
implementation
implementation of
of LINQ
LINQ to
to Objects.
Objects. 2010
TPL PLINQ MVC PCL 4.0

Task Parallel
Parallel Library
•• powerful,
Task Library set
set APIs
patterns-based in
in the
APIsway the
to Entity Framework Dynamic Data
2008
powerful, patterns-based way to build
build 3.5sp
System.Threading
System.Threading
dynamic websites
dynamic websites and
and
System.Threading.Tasks
•• enables
System.Threading.Tasks
enables aa clean
namespaces
clean separation
namespaces
separation of
of concerns
concerns CLR, Other
1
Efficiently
•• gives
Efficiently use
gives full
full all
usecontrolthe available
all the available
control over
over markup
markup LINQ
ASP.NET
3.5, AJAX
Enhanceme 2007
processors
•• Provides
processors
Provides features
features that
that enable
enable fast
fast Test
Test Driven
Driven nts 3.5
Development
Development for for creating
creating sophisticated
sophisticated
applications
applications that use the latest web
that use the latest web WPF WCF WF 2006
3.0
standards.
standards.
ASP.NET
The
The Portable
Portable Class
Class Library
Library project
project enables
enables you
you to
to WinForms WebForms / Web Services
write
write and
and build
build managed
managed assemblies
assemblies that
that work
work on
on
more
more than
than one
one .NET
.NET Framework
Framework platform.
platform.
ADO.NET
2005
Base Framework Library 2.0

CA G
CLR JIT CLS CTS
S C
34
CLR
•• A
A Windows
Windows Store
Store app
app is
is aa new
new type
type of
of app
app
that
that is
is sold
sold in
in the
the Windows
Windows Store
Store and
and runs
runs on
on FCL
Windows
Windows 88 devices.
devices. Windows
HTML 5, / 2012
•• Microsoft
Microsoft Windows Metro
Windows Metro isis the
the clean,
clean, store Apps
CSS3/
JQuery
Web Socket 4.5
dynamic,
dynamic, and
and content-focused
content-focused UI UI in
in Windows
Windows
8.
8.
PLINQ TPL MVC PCL 2010
••
4.0
HTML5
HTML5 offers
offers new
new features
features (elements,
(elements, attributes,
attributes,
event
event handlers,
handlers, and
and APIs)
APIs) for
for easier
easier web
web Entity Framework Dynamic Data 2008
application development and more sophisticated
application development and more sophisticated 3.5sp1
form
form handling.
handling.
•• JQuery
JQuery is
is powerful
powerful JavaScript
JavaScript library
library LINQ
ASP.NET
CLR, Other
Enhanceme
2007
•• CSS
CSS is
is used
used to
to control
control the
the style
style and
and layout
layout of
of 3.5, AJAX
nts 3.5
Web
Web pages.
pages. CSS3
CSS3 is
is the
the latest
latest standard
standard for
for CSS
CSS
WPF WCF WF 2006
WebSocket
WebSocket establishes
establishes persistent
persistent connection
connection 3.0
between
between the client and the server and both
the client and the server and both ASP.NET
parties
parties can
can start
start sending
sending data
data at
at any
any time.
time. WinForms WebForms / Web Services

ADO.NET
2005
2.0
Base Framework Library

CA G
CLR JIT CLS CTS
S C
35
CLR
CLR Versions and SxS Execution
•• In-process
In-process side
side by
by side
side is
is the
the ability
ability to
to run
run multiple
multiple versions
versions of
of the
the CLR
CLR in
in aa single
single process.
process.
•• By
By default,
default, managed
managed COM
COM components
components runrun with
with the
the .NET
.NET Framework
Framework version
version they
they were
were built
built
with,
with, regardless
regardless of
of the
the .NET
.NET Framework
Framework version
version that
that is
is loaded
loaded for
for the
the process.
process.

Side By Side Execution Allows


multiple versions of the Framework to
be installed on a single system
FCL 3.5
FCL 4.5
FCL 3.0 FCL 4.0

FCL 2.0
FCL 1.0 FCL 1.1

CLR 1.0 CLR 1.1 CLR 2.0 CLR 4.0 CLR 4.5
2002 2003 2005 2010 2012
4.0 onwards Supports inproc SxS
36
The .NET Framework is an
execution and development
platform for building apps
for Windows, Windows
Phone, Windows Server, and
Windows Azure...
37
38

You might also like