Net Framework - Google Code

basiliskcanoeSoftware and s/w Development

Nov 2, 2013 (3 years and 9 months ago)

57 views

creating competitive advantage

Copyright ©2003 Virtusa Corporation

Introduction to

.Net Framework

Ruwan Wijesinghe


Trainer

Virtusa Corporation


creating competitive advantage

Copyright ©2003 Virtusa Corporation

.Net Framework


Provide
consistent object oriented programming environment

for
local
,
internet distributed

and
remote codes

written in
multiple
languages.


Minimize software
deployment and versioning problems


Provide
safe execution environment

for code created by
unknown

or
semi
-
trusted parties
.


Eliminate
performance problems

of
scripted and interpreted
environments
.


Uses the
standard protocols

to enable
integration

with any
other
type of application.

creating competitive advantage

Copyright ©2003 Virtusa Corporation

.Net Framework

Common Language Runtime

Just In Time

Compiler

Garbage

Collection

Assembly

Loader

Interpretability

with

Unmanaged Code

.Net Class Library

ASP.NET

creating competitive advantage

Copyright ©2003 Virtusa Corporation

Common Language Runtime (CLR)


Just In Time Compilation

When a call to a method of a class is made, JIT compiler checks if that method is
already compiled. If so use it. Else, compile it, save in a temporary location and use it.


Thread Management


Memory Management

Memory allocation and Garbage Collection


Type Safety Verifications

Guarantees that a type will not access memory that is not allocated to it.


Code Access Security Implementation.

Give different access rights to code originate from different locations
.


Other System Services

Remoting, Interoperability with unmanaged code, etc.


creating competitive advantage

Copyright ©2003 Virtusa Corporation

.Net Framework Class Library


Represent Base Data Types


Data Access (ADO.NET)


Perform IO operations


Load types and access information about loaded types


Invoke Security


XML Handling


Console Applications


Windows Applications


Windows Forms and Controls


Graphics


Web Applications


Web Services


Windows Services


Etc.

creating competitive advantage

Copyright ©2003 Virtusa Corporation

Runtime Hosts

CLR

IIS

ASP.NET

IS
-
API

Windows Shell

Internet Explorer

creating competitive advantage

Copyright ©2003 Virtusa Corporation

Assemblies


Contain MIL code


Forms a Security Boundary


Forms Type Boundary


Forms Reference Scope Boundary


Forms Version Boundary


Forms a deployment Unit


Enables Side
-
by
-
Side execution

More that one version of the same code is
executed at the same time.

MIL Code

Resources

(Images, Icons, etc.)

Assembly Meta
-
Data

Type Meta
-
Data

creating competitive advantage

Copyright ©2003 Virtusa Corporation

Assembly Header


Assembly Name


Culture


Gives the culture of the assembly, if it contains culture specific
resources


Strong Name Information


Contains the digital signature to uniquely identify the assembly


List of Files in the Assembly


When the assembly contains multiple files that file information


Type Reference Information


A list of types in the assembly and the files where the meta data


about the types can be found.


Information on Dependent Assemblies


List of assemblies on which the types of this assembly depends on.

creating competitive advantage

Copyright ©2003 Virtusa Corporation

Global Assembly Cache (GAC)


Used to store shared assemblies


Only the assemblies with a strong name (signed using a digital signature)
can be stored here.


Strong name guaranties that


The assembly name is unique


The assembly has not been changed after it has been signed


All the versions are coming from the same vender.


Located in Windows
\
assembly folder


Eliminate registration and versioning problems
.


creating competitive advantage

Copyright ©2003 Virtusa Corporation

Common Language Specifications




Common Type System (CTS)


Ensure all types uses the common base types


Ensure all types defines their meta
-
data in a same format.


Other specifications (see MSDN)




CLS guaranties the cross
-
language interpretability.


It also enables the JIT compiler to do Type Safety Verification.


A code that has not been verified for type safety will be allowed to
execute, only if the administrator grants a special permission for
that.


creating competitive advantage

Copyright ©2003 Virtusa Corporation

Application Domains


Historically applications are isolated using process boundaries.


Process boundaries define a unique memory addressing space for each process.


However shifting between processes reduce the performance of multi
-
tasking
applications.


Due to the verification for type safety, .Net Applications do not need process
boundaries to ensure isolation.


Therefore Application Domains are used in .Net Framework to provide
application isolation.



Isolation is important to


ensure a fault in one application will not affect the others.


stop any application without affecting others.


provide security boundary for applications.