Sunteți pe pagina 1din 59

2008

.Net Framework
Investigation of .Net Framework

Amir saman Memaripour


Iran University of Science and Technology

][.NET FRAMEWORK

P age |2


.Net : 4 .......................................................................................................................................
)5 ........................................................................................................................ .Net Framework : (1
1-1 5 ......................................................................................................................
2-1 8 .............................................................................................................. .Net
3-1 15 ...............................................................................................
4-1 15 ...................................................................................................................
)17...................................................................................... CLR (Common Language Runtime) : (2
1-2 17 .....................................................................................................................
2-2 19 ......................................................................................................
3-2 19 .................................................................................................................
20 .................................................................................. CTS (Common Type System) 4-2
21 .................................................................... CLS (Common Language Specification) 5-2
6-2 21 ...........................................................................................................
7-2 23 .........................................................................................................
24 ......................................................................................... Just in time compilation 8-2
9-2 )( 24 .........................................................................................
10-2 27 .................................................................................................
11-2 27 ............................................................................................................
)28.............................................................................................. FCL(Framework Class Library) : (3
1-3 28 .....................................................................................................................

][.NET FRAMEWORK

P age |3

29 ...................................................................................................................... BCL 2-3


3-3 30 ...............................................................................................................
) : (4 32........................................................................................................... .Net
32 .................................................................................................................. VS.Net 1-4
2-4 33 .................................................................................................................
3-4 36 ........................................................................................ .Net Framework
4-4 38 ................................................................................................................. .Net
) .Net Framework : (5 41.................................................................................................. J2EE
1-5 41 ...........................................................................................
CLR 2-5 44 ...................................................................................................... JVM
Database & Web 3-5 J2EE 46 ............................................................................... .NET
4-5 47 .....................................................................
5-5 .Net Java/J2EE 49 ....................................................
57................................................................................................................................................. Bibliography

P age |4

[.NET FRAMEWORK]

.Net :

][.NET FRAMEWORK

P age |5

).Net Framework : (1

1-1
.Net Framework 1-1-1
.Net .
. .Net
.
Microsoft .Net .
.Net .
.Net ) 1(
XML .
.Net Framework 2
Desktop 3 .
.
4DNA 5COM COM .

.

Platform
Computing Platform
3
Traditional desktop application platform
4
Distributed interNet Applications Architecture
5
Component Object Model
2

][.NET FRAMEWORK

P age |6

.Net

6 . Application
.Net .
.Net
. .Net .
.Net .
2-1-1 .Net
.Net .
.Net .Net
.Net . .Net
.
DCOM 7 .
TCP/IP 8 9 .
.
10 11
.

Enterprise Applications
Firewall
8
Port
9
Stateful connection
10
Portal
7

][.NET FRAMEWORK

P age |7

.Net .
XML
XML :
.1
.2
12

.3
.4
3-1-1 .Net

.Net .
.Net
. .Net J2EE .Net
.
13 14
.Net . .Net
.Net
.

11

Interface
Powerful distributed applications
13
Web based applications
14
Web services
12

][.NET FRAMEWORK

P age |8



.
. .Net
.

2-1 .Net

.Net .
.Net Framework 15 .
Windows NT Windows 2000 Windows XP Windows Vista .Net Framework .Net

. Windows NT .Net 16
17 .
.Net ) (
Mono Project DotGNU Portable.NET .
.Net Linux .

15

Operating System
Client
17
Server
16

][.NET FRAMEWORK

P age |9

.Net

Mono Project :
.1 Framework CLR C# Class Library 18 .
.2 :
FreeBSD Unix Linux (JIT Compiler for X86) Windows
SPARC S390 ) PowerPC (19
.3 :

ADO.NET XML

Open Source
Hardware architecture

18
19

][.NET FRAMEWORK

P a g e | 10

) 20 (

ASP.NET


.4 .Net 21 Linux

mono myapp.exe :

.5 .Net

mcs myapp.cs :

.6 exe .
DotGNU Portable.NET .Net
FreeBSD NetBSD Solaris Windows GNU/Linux MacOS .
.Net Framework .Net .
) ( .
.
CLR 1-2-1

22
23 ... .
FCL 2-2-1

20

Windows Forms
Portable
22
Common Language Runtime
23
Thread management
21

][.NET FRAMEWORK

P a g e | 11

24 .
.
ADO.Net .
DAL 3-2-1

25 FCL .
26 27
XML . ADO.NET XML .

.
28 XML .

24

Framework Class Library


Data access level
26
Relational data base
27
Disconnected data model
28
Namespace
25

[.NET
.NET FRAMEWORK
]FRAMEWORK

P a g e | 12

XML

ASP.Net & Windows Forms 4-2-1

FCL
. 29
30 . ASP.Net
31 ) (ASP 3.0
. ASP.Net
.

29

Web based user interface


Windows GUI
31
Active server pages
30

][.NET FRAMEWORK

P a g e | 13

ASP.Net .Net
.

32

.
. 33
34
ASP.Net .
.
35 Visual Basic .
:
(Component based & Event driven) 36

ActiveX

Unicode

VB Delphi MFC

API GDI+

32

Cached
Server Controls
34
Event driven execution model
35
Visual Application development
36
Rapid application development
33

][.NET FRAMEWORK

P a g e | 14

PLs 5-2-1

.Net .Net .
.Net .Net J2EE
.
. J# C# C++ VB Jscript .
37 Python Perl Oberon ML Haskell Eiffel Pascal COBOL APL
Scheme Smalltalk .Net .
.Net 38 Cross Language Referencing .
39 Object System
API .
.Net .
Pascal

Visual Basic

C#

SmallTalk

Jscript

Oberon

C++

Scheme

Perl

Mercury

Python

APL

COBOL

Eiffel

Haskell

Oz

ML

Objective Caml

Ada

37

Third-parties
Exception handling
39
Built in
38

][.NET FRAMEWORK

3-1

P a g e | 15

40

HP Microsoft 2000 CLI C#


. 2001 ECMA . 2003 ISO
.
Microsoft CLI C# ECMA
ISO . .Net
MRL41 .
ADO.Net Windows Forms ASP.Net
.
Microsoft 2007 .Net Framework Class Library MRL

.
.

4-1
.Net .
. .Net Framework .

Standardization and licensing


Microsoft reference license

40
41

P a g e | 16

[.NET FRAMEWORK]

2002/01/05

1.0.3705.0

1.0

2003/04/01

1.1.4322.573

1.1

2005/11/07

2.0.50727.42

2.0

2006/11/06

3.0.4506.30

3.0

2007/11/09

3.5.21022.8

3.5

[.NET
.NET FRAMEWORK
]FRAMEWORK

P a g e | 17

)CLR (Common Language Runtime) : (2

.Net Framework .
.
.
.
1-2
.Net )( CLR FCL
. .Net CLR . .Net

3 )(CLR

CLR 42 .Net
CLI

43

44

45

( .
) .Net (C# .Net .

42

Virtual machine
Common language infrastructure
44
Byte code
45
MS Intermediate Language
43

][.NET FRAMEWORK

P a g e | 18

46 47 . .Net
48 .
.Net .Net
.
CLR :
49

.1

50

.2
51

.3

52

.4

.5 53

54

55

.6

.7
.8 ) (
CLI
.

46

Just in time compiler


System native code
48
Interpret
49
Cross language
50
Role based security
51
Object lifetime management
52
Garbage collection
53
Debugging
54
Profiling
55
Multiple versioning
47

][.NET FRAMEWORK

P a g e | 19

2-2
.
.
.
.Net .Net
. .Net
. .
.Net .
. .Net

.
56 57 .Net
.
3-2
.Net
.
.
.
.Net :
.Net .
Common Type System
Common Language Specification

56
57

][.NET FRAMEWORK

P a g e | 20

CLR .
.
58 .
Hello world C#
.
)(.method private hidebysig static void Main
cil managed
{
.entrypoint
// Code size
)11 (0xb
.maxstack
8
IL_0000:
ldstr
!Hello, world
IL_0005:
call
void
)[mscorlib]System.Console::WriteLine(string
IL_000a:
ret
} // end of method HelloWorld::Main

CTS (Common Type System) 4-2

.Net CTS .
.Net . CTS
:
.Net 59 .

60

C# VB .

58

Assembly
Primitive data types
60
Integer data type
59

][.NET FRAMEWORK

P a g e | 21

61 .Net
.
62 63 .
CTS .

CLS (Common Language Specification) 5-2


.Net CLS .
. :
CLS .Net.
.
CLS ECMA .

6-2

64

.Net .
65 CLR
.

61

Module
Stack
63
Heap
64
Managed code
65
Meta data
62

][.NET FRAMEWORK

P a g e | 22

.Net .
.

.Net 66 CLR
.

. .

Target code

66

[.NET
.NET FRAMEWORK
]FRAMEWORK

P a g e | 23

7-2
.Net :
. .

.Net

.Net
. .Net
.
.

][.NET FRAMEWORK

P a g e | 24

Just in time compilation 8-2

.
. .
.
.
... .
JIT Compiler
.
. CLR
.
CLR
.

9-2 )(

.Net .
.
.
. Java

][.NET FRAMEWORK

P a g e | 25

C++
.

.
.

.
. .Net
.
CLR .
o 67 68 .
o Garbage Collector
.
.
o .
o .
o .
.

Buffer
Managed heap

67
68

][.NET FRAMEWORK

P a g e | 26

1-9-2


. .Net
. 69
.
.
. 70
71
.

.
.Net GC . 0
1
2 ... .

.

69

Memory marking
Static objects
71
Current scope
70

][.NET FRAMEWORK

P a g e | 27

10-2
CIL CLR .
72 CLR .

11-2
CLR . .Net Compact Framework
Xbox 360 73 Net60 Symbian
Silverlight . .
Mono development platform dotGNU .

Dynamic Language Runtime


Portable devices

72
73

[.NET
.NET FRAMEWORK
]FRAMEWORK

P a g e | 28

)FCL(Framework Class Library) : (3

.Net .
.Net
CLR .

1-3

.
74 .
.
...
.
.

Component based application development

74

][.NET FRAMEWORK

P a g e | 29

BCL 2-3

FCL
. .Net
.Net . BCL :

Array List Hash Table ...


...
BCL .

[.NET
.NET FRAMEWORK
]FRAMEWORK

P a g e | 30

BCL

3-3
.Net . .Net
.

.
.
.Net
.
.Net .

P a g e | 31

[.NET FRAMEWORK]

System

System.Media

System.CodeDom

System.Messaging

System.Collections

System.Net

System.ComponentModel

System.Reflection

System.Configuration

System.Resources

System.Data

System.Runtime

System.Deployment

System.Security

System.Diagnostics

System.ServiceProcess

System.DirectoryServices

System.Text

System.Drawing

System.Threading

System.EnterpriseServices

System.Timers

System.Globalization

System.Transactions

System.IO

System.Web

System.Linq

System.Windows.Forms

System.Linq.Expressions

System.Xml

System.Management

[.NET
.NET FRAMEWORK
]FRAMEWORK

P a g e | 32

) : (4 .Net

VS.Net 1-4

.Net
XML ... Visual Studio.Net .
75 .

.Net .
.Net

76

VS.Net .Net .

77 . C#
C++ VB.Net J#
.

.Net

.Net ASP.Net
. ADO.Net XML
.
.

75

)Integrated Development Environment (IDE


Command Line
77
Unmanaged code
76

][.NET FRAMEWORK

P a g e | 33

:

o
o
o
o
o
o
.

2-4
.Net .
.
.
78
. .
DNA EXE DLL .Net
.

Portable executable file

78

][.NET FRAMEWORK

P a g e | 34

DLL .
DLL .
.
79 .
80GAC .
GAC .
ASSEMBLY
.
.
CLR .
.
.
.
. .
. .
metadata 81.

.

79

Private assembly
Global Assembly Cache
81
Self describing
80

][.NET FRAMEWORK

P a g e | 35

1-2-4
CLR .
DNA COM registry .
COM 82IIS .
83 .
:

84

85 86
. .

82

Internet Information Services


Copy
84
Assembly Manifest
85
Details
86
Header
83

][.NET FRAMEWORK

P a g e | 36

.
. .
><major version>.<minor version>.<build number>.<revision

.
87 .
3-4 .Net Framework


.Net .
.
.
88 .Net .
.

Security permission
Tree map

87
88

][.NET FRAMEWORK

10

P a g e | 37

.Net

][.NET FRAMEWORK

P a g e | 38

4-4 .Net


.
.
.
XML SOAP
HTTP .
.

][.NET FRAMEWORK

11

.Net Vision

P a g e | 39

P a g e | 40

[.NET FRAMEWORK]

.Net Vision - MS Implementation

12

][.NET FRAMEWORK

P a g e | 41

) .Net Framework : (5 J2EE

.Net
.
J2EE .
.

1-5
J2EE

.Net Framework
. .Net
Mono Linux

.
.
.
.

][.NET FRAMEWORK

P a g e | 42

13 .Net J2EE

.Net J2EE :
.
.
.
.
.
.Net
)Intermediate Language (IL

Concept / Feature

J2EE
Byte Code

Interpreted and
Intermediate Code

[.NET FRAMEWORK]

P a g e | 43

Runtime Environment

JVM with HotSpot Compiler

Common Language
Runtime (CLR) with Just in
Time (JIT) Compiler

Memory Management

JVM Managed Heap with

CLR Managed Heap with

Garbage Collection

Garbage Collection

Foundation Classes

Java Base Classes

.Net Base Classes

Packaging and

Java Archives (.jar files)

.Net Assemblies (.dll or .exe

Deployment

files)

Legacy Code Integration JNI

Managed/Unmanaged Code

Interface/Design

Object-Oriented

Component-Oriented

AOP

.NET Component Services

Philosophy

Interception

. 2
.
. .
Component/Technology
Web Services

J2EE
JAXP, JAXR, JAX-RPX, SAAJ

.Net
.NET Web Services

P a g e | 44

[.NET FRAMEWORK]

Web Presentation

JSP, JSF, Servlet

ASP.NET

Business Components

EJB

ObjectSpaces, ADO.NET

Distributed Invocation

RMI/IIOP, SOAP, CORBA

.NET Remoting, SOAP,

and Computing
Messaging

DCOM
JMS, JavaMail

Microsoft Message Queuing


(MSMQ), BizTalk, .NET
Passport

EIS Connectivity

JCA

.NET Enterprise Services

Transactions

JTA/JTS, XA

.NET Enterprise Services


(Com+, DTC)

Database Connectivity

JDBC

ADO.NET, SQL Server

XML Parser

JAXP, Others

Built-in (System.XML)

Security

J2EE Security, JAAS

.NET Security, ASP.NET


Security


.
.
JVM CLR 2-5

JVM CLR
.
.

][.NET FRAMEWORK

P a g e | 45

:
JVM CLR .
CLR ) (
JVM ) (Java .
JVM CLR JIT Compilation
. .
JVM CLR .
CLR
JVM .
. CLR
JVM .
.
JVM .
(Assemblies) CLR (JAR files) JVM
.
...

][.NET FRAMEWORK

P a g e | 46

CLR JVM .
JVM

CLR

Metadata Bytecode

Database & Web 3-5 J2EE .NET

2 DataSet ResultSet
ADO.NET . XML JDBC
JDBC . 89 ADO.NET 90
DataSet 91.
92 93 .
Syntax
.

89

Connection oriented
)Non Connected (offline
91
In-Memory Database Cache
92
Server Side Pages
93
Pre compile
90

][.NET FRAMEWORK

P a g e | 47

.NET
J2EE . J2EE
.
J2EE .
4-5
94
.
.

2 .
DLAPI .
.1 DLAPI DLAPI .
.2 DLAPI .
. 10 .
EJB .
.
.3 . 95
96 97
. .
94

Data Layer API


Service-Oriented
96
Model driven
97
Organized object models
95

][.NET FRAMEWORK

P a g e | 48

.4 .
.5 .
.
.6 DLAPI .
DLAPI .7 98
.
.
.8 99 DLAPI .
.
.
.9 100 .
101 102 .

103 .
.
J2EE .Net
. ADO.NET
DLAPI . .

98

Core data layer


Industrial grade data source
100
Complex distributed deployment configurations
101
Database server
102
Data center
103
Data source
99

][.NET FRAMEWORK

P a g e | 49

ObjectSpace

104

.

.
5-5 .Net Java/J2EE
.
2
. 2
.NET J2EE .
2 .
.NET

J2EE
SWING, AWT

Windows.Forms,
Web.Forms

System.Net : Connection,

Java.net : Sockets, URL,

HttpWebRequest,

105

System.Collections :

Java.util : Lists, Maps, Sets,

ArrayList, BitArray, Maps,

Trees, Vectors

Queue, List, Stack

J2EE .NET :

)Object Relation (O-R


Container

104
105

][.NET FRAMEWORK

Bean

P a g e | 50

106

107 JVMPI JPDA

.NET J2EE .
:

108

XML109


.NET 2
.
.NET
.NET Windows .
.NET
.
.
.
2 .
.

106

Entity Beans
Public Profiling APIs
108
Server side controls
109
Serialization to XML
107

][.NET FRAMEWORK

.NET

J2EE

VB.net C#


****

**
Java .

P a g e | 51

110

Java
**

***

Mainframe
.
Java

****


JVM .
C# VB J#


****

111

****

**

***

***

***

**

****

VB/Com

1993

.
VB

Scalability
Reliability

110
111

][.NET FRAMEWORK

P a g e | 52

112

JVM
*

*****

%51

%56

2 :
.NET .
.NET .
J2EE .
.NET .
J2EE .

2 .
.
:
o
o
o
o

Open standards

112

][.NET FRAMEWORK

P a g e | 53

o
2
.

14 .NET - J2EE

][.NET FRAMEWORK

15 .NET - J2EE

P a g e | 54

][.NET FRAMEWORK

16 .NET - J2EE

17 .Net - J2EE
18 .NET - J2EE

Throughput

P a g e | 55

P a g e | 56

[.NET FRAMEWORK]

19 .Net J2EE - Failure rate

P a g e | 57

[.NET FRAMEWORK]

Bibliography
.Net Framework. (n.d.). Retrieved from Wikipedia: http://en.wikipedia.org/wiki/.NET_Framework
.NET Framework Programming. (n.d.). Retrieved from Microsoft MSDN: http://msdn.microsoft.com/enus/library/w0x726c2.aspx
A Comparative overview of C#. (n.d.). Retrieved from GENAMICS / Developer:
http://genamics.com/developer/csharp_comparative_part3.htm
Base Class Library. (n.d.). Retrieved from Wikipedia: http://en.wikipedia.org/wiki/.NET_Framework
C# vs C++ as a choice for development. (n.d.). Retrieved from GameDev.Net:
http://www.gamedev.net/community/forums/topic.asp?topic_id=392585&PageSize=25&WhichPage=3
C++ or C#. (n.d.). Retrieved from GameDev.Net:
http://www.gamedev.net/community/forums/topic.asp?topic_id=390553&PageSize=25&WhichPage=2
Chappell, D. (n.d.). Comparing .Net and Java. Retrieved from My Plick:
http://www.myplick.com/view/afZKCnJuG9C/Java-vs.-.Net
Class Library. (n.d.). Retrieved from Microsoft MSDN: http://msdn.microsoft.com/enus/library/w0x726c2.aspx
Common Language Infrastructure. (n.d.). Retrieved from Wikipedia:
http://en.wikipedia.org/wiki/.NET_Framework
Common Language Runtime. (n.d.). Retrieved from Wikipedia:
http://en.wikipedia.org/wiki/.NET_Framework
Comparison of the Java and .Net Platforms. (n.d.). Retrieved from Wikipedia:
http://en.wikipedia.org/wiki/.NET_Framework
Edmon. (n.d.). J2EE vs. .Net - Framework Components Compared. Retrieved from Toolbox for IT:
http://it.toolbox.com/blogs/web2-place/j2ee-vs-net-framework-components-compared-11472
Framework Class Library. (n.d.). Retrieved from Wikipedia:
http://en.wikipedia.org/wiki/.NET_Framework
General Reference. (n.d.). Retrieved from Microsoft MSDN: http://msdn.microsoft.com/enus/library/w0x726c2.aspx
Introduction to the .NET Framework. (n.d.). Retrieved from DEV Hood:
http://www.devhood.com/training_modules/dist-a/Intro.NET/?module_id=1
Java vs. .NET. (n.d.). Retrieved from My PClick: http://www.myplick.com/view/afZKCnJuG9C/Java-vs..Net

P a g e | 58

[.NET FRAMEWORK]

Joseph J. Sarna Jr. The Microsoft .NET Framework.


Managed C# versus Unmanaged C++. (n.d.). Retrieved from C# Help:
http://www.csharphelp.com/archives2/archive458.html
Microsoft .NET Framework - What is it? (n.d.). Retrieved from http://www.tech-pro.net/netframework.html
Microsoft .NET Framework 3.0 provides breakthrough in the development process. (n.d.). Retrieved from
PRLog: http://www.prlog.org/10015974-microsoft-net-framework-3-0-provides-breakthrough-in-thedevelopment-process.html
Mono. (n.d.). .NET Framework Architecture - Mono. Retrieved from http://www.monoproject.com/.NET_Framework_Architecture
Nakov, S. (n.d.). Microsoft .NET Framework - Overview. Retrieved from http://www.nakov.com
Overview. (n.d.). Retrieved from Microsoft MSDN: http://msdn.microsoft.com/enus/library/w0x726c2.aspx
Pinpin, J. (n.d.). Is the .NET Framework Ready to Challenge Java and J2EE? Retrieved from Progress
Software: http://www.progress.com/realtime/docs/technology/caching_resources/dot_net_ex.pdf
Platform Invocation Services. (n.d.). Retrieved from Wikipedia:
http://en.wikipedia.org/wiki/.NET_Framework
Robert Powell, Richard Weeks. (2002). C# and the .NET Framework (The C++ Perspective). SAMS.
Smacchia, P. (n.d.). Number of Types in the .NET Framework. Retrieved from CodeBetter.Com:
http://codebetter.com/blogs/patricksmacchia/archive/2008/03/18/number-of-types-in-the-netframework.aspx
Suess, M. (n.d.). C++ vs. C# - a Checklist from a C++ Programmers Point of View. Retrieved from Thinking
Parallel: http://www.thinkingparallel.com/2007/03/06/c-vs-c-a-checklist-from-a-c-programmers-pointof-view/
Suresh Ramachandran, Duke Energy. (n.d.). Microsoft .Net vs. J2EE. Retrieved from My Plick:
http://www.myplick.com/view/afZKCnJuG9C/Java-vs.-.Net
The .NET Framework. (n.d.). Retrieved from Wiley Media:
http://media.wiley.com/product_data/excerpt/98/07645482/0764548298.pdf
Thomsen, B. (n.d.). Java vs. .Net. Retrieved from My Plick:
http://www.myplick.com/view/afZKCnJuG9C/Java-vs.-.Net
Tools. (n.d.). Retrieved from Microsoft MSDN: http://msdn.microsoft.com/en-us/library/w0x726c2.aspx

P a g e | 59

[.NET FRAMEWORK]

Voelte, M. (2002). Comparing J2EE with .NET. Retrieved from My Plick:


http://www.myplick.com/view/afZKCnJuG9C/Java-vs.-.Net

S-ar putea să vă placă și