Escolar Documentos
Profissional Documentos
Cultura Documentos
NET
. . - ,
. -.
compiler-compiler ( ,
)
yacc,
bison,
( ) (JAG, Clarion)
Hybrid compiler-interpreter
(plumbing) :
,
, , ...
Unmanaged code
Intel /
Windows
binary
file
intel
source
code
OS X
PowerPC
binary
file
PowerPC
binary
file
Intel / Linux
intel
Compile
Managed code
Intel /
Windows
VM
platform
independent
source
code
intermediate
code
OS X
PowerPC
VM
VM
Intel / Linux
Compile
compiler
binary
executable
Execute
Unmanaged code
source
code
compiler
Execute
binary
executable
intermediate
code
interpreter or
JIT compiler
Managed code
10
Unmanaged Code
,
(type checking), , .
11
Managed Code
sandboxed environment.
Garbage Collection, type checking, exception
handling, bounds checking .
intermediate code
().
12
.NET
Windows Windows API
XML
web
/
web
SOAP, WSDL, UDDI
13
...
14
, CLR
(Common Language Runtime)
Intermediate Language (IL)
Managed code
Common Runtime Environment
Request for existing
features, such as opening a
file, mediated by CLR
New CLR-only
features, such as
garbage collection
Intermediate
Language (IL)
Win32 OS
15
16
.NET
XML,
, ...
,
,
17
.NET?
.NET
.
,
,
Microsoft
18
Application
COM
.
,
.
.NET
.NET
Common Language Runtime (CLR)
CLR
().
1.
2.
Microsoft
Intermediate Language (IL).
IL
CLR
22
CLR
23
IL
24
.NET
Microsoft NGWS
2000
:
1.0 (2002),
1.1 (2003),
2.0 (2005),
3.0 (2006),
3.5 (2007),
4.0 (2010)
4.5 (2012)
4.5.1 (2013)
25
.NET
26
.NET
Common
(.NET
Framework)
(ASP.NET)
27
.NET
garbage collection,
-
JVM
28
source
code
compiler
code
metadata
Execution
Execute
JIT compiler
29
Assembly
.NET
Assembly = IL code + Metadata
Metadata
Assembly
:
-
-
-
- ...
Assembly
Manifest
Metadata
IL code
Resources
30
Start
Windows
Examines
Executable File
Header
Windows
or CLR?
Windows
Execute
End
JIT Compile
Method
No
CLR
Run CLR
No
Method
Already
JITted?
Load Assembly
Yes
Yes
No
Execute
Method
More code
to execute?
Yes
Assembly
in
Memory?
31
CLR
JIT
working set
AOT (ahead-of-time) compilation
Native Image Generator (Ngen.exe)
-
( )
32
CLR Features
Feature
Description
Debugging
Exception management
Execution management
Garbage collection
Interop
Security
Thread management
Type loading
Type safety
33
( )
Windows
Forms
Windows Presentation Foundation
ASP.NET
ADO.NET
Windows Workflow, and
Windows Communication Foundation
34
:
file
I/O
Networking
text management, and
diagnostics
CLR :
built-in
types
exception handling
security, and
threading
35
COM Marshaler
Type Checker
Exception Manager
Security Engine
Debug Engine
IL to Native
Compilers
Code
Manager
Class Loader
Garbage
Collector
CLR
Platform independence
Performance improvement
Language interoperability
Support for object orientation and
interfaces
Distinct Value and reference Types
Strong data Typing
37
(type) =
( )
38
CLR
( )
.
..
Common Type System (CTS).
FCL. int C#
Integer VB.NET
.NET System.Int32.
39
40
CTS
41
CLR
Security
Role-based
security
Code-based security
Private/shared assemblies
Parallel Programming
42
CLR ,
-
20
Simplified Deployment ( )
-
assembly (no
registration required)
Zero-impact install
.NET COM
43
Fortran
Phalanger (PHP)
APL
IronPython
Python
C++
IronRuby
RPG
C#
J#
Silverfrost FTN95
COBOL
Jscript
Scheme
Component Pascal
LSharp (Lisp)
SmallScript (S#)
Delphi
Mercury
Smalltalk
Delta Forth
Mondrian
TMT Pascal
Eiffel.NET
Oberon
VB.NET
F#
Perl
Zonnon
44
C++
C#
JScript
COM+ Services
Visual Studio.NET
ASP.NET
ASP.NET
.NET
46
47
ADO.NET
48
49
50
WinForms .NET
3.0
GUI XAML
Windows Forms, Windows Presentation
Foundation (WPF)
,
Windows desktop
Josh Smith (2007-09-05). "WPF vs. Windows Forms".
http://joshsmithonwpf.wordpress.com/: Josh Smith on WPF. Retrieved 2011-08-25.
"WPF is not intended to replace Windows Forms. [...] WinForms is still alive and well,
and will continue to be enhanced and supported by Microsoft for years to come.
51
.NET API
Windows Communication Foundation
(WCF)
Windows Workflow Foundation (WF)
.NET
Language Integrated Query (LINQ)
()
52
.NET
Microsoft's .NET Micro Framework
.NET
embedded
53
.NET
.NET on Linux
MONO runtime engine for Linux
Linux
.NET
iOS
Andrioid
54
http://www.mono-project.com/Main_Page
Mono is a software platform designed to allow developers to easily create cross platform applications. Sponsored by
Xamarin, Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C#
and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community
is helping position Mono to become the leading choice for development of Linux applications.
55
.NET
(native)
-
(SIMD,
CUDA)
,
Windows.
56
http://en.wikipedia.org/wiki/.NET_Framework
http://www.midnightbeach.com/dotNetArchitecture.2002.html
http://midnightprogrammer.net/file.axd?file=2009%2F9%2FMicrosoft
+.NET+Framework+4.0+Architecture.pdf
http://www.codeguru.com/csharp/sample_chapter/article.php/c8245
http://msdn.microsoft.com/enus/library/ff361664%28v=vs.110%29.aspx
http://www.codeproject.com/Articles/1825/The-Common-LanguageRuntime-CLR-and-Java-Runtime-E
57
58