Title: 'NET Framework Highlights
1.NET Framework Highlights
- A look at the .NET SDK
- by Donal Lafferty, DSG TCD.
- Donal.Lafferty_at_cs.tcd.ie
- Monday, 14 May 2001
2.NET Framework Highlights
- Source
- Brad Merrill
- Outline
- .NET Framework SDK Architecture
- Common Language Runtime Goals
- Extensive Meta Data support
- Deployment Strategy
- Execution-time Environment
3.NET Blueprint (Graphically)
Open Internet Protocols SOAP, SCL, DISCO HTTP,
SMTP, XML, WAP, XSD
Visual Studio.NET
Your Internal Services
Your Application and Web Service
Orchestration
.NET Enterprise Servers
.NET Framework
OtherApplications Using Your Service
Operations
Building Block Services
Windows CE, ME, 2000, .NET
End-UserClients
Public Web Services
4.NET Framework
Orchestration
.NET Enterprise Servers
Building Block Services
.NET Framework
Windows (CE, ME, 2000, and .NET)
5Common Language Runtime
Frameworks
Base Classes
Common Language Runtime
Security
ExecutionSupport
IL to native code compilers
GC, stack walk, code manager
Class loader and layout
6CLR Elements
- Two phase compile process
- Security
- Evidence based security
- Stack Walk
- GC
- Class Loader
- Class Layout
7CLR Elements
- Execution Support
- Threading Model
- safe points
- Foreground / background
- priorities
- apartment threading model
- Exception Handling
- Streamlining error handling
8Outline
- .NET Framework SDK Architecture
- Common Language Runtime Goals
- Extensive Meta Data support
- Deployment Strategy
- Execution-time Environment
9CLR Goals
- Non-stated
- Simplify development
- Ease deployment
- Global Assembly Cache
- Side-by-side execution
- Security
- Improve server-side development facilities
- Asynchronous messaging
- Thread pool
- Automatic memory management
10CLR Goals
- Improve Web App Dev Model
- WinForms UI for client side development
- Any process allowed to host runtime
- ASP.NET for server-side dynamic content
- converge programming models
- Previously architecture was adhoc
- .NET supplies structured architecture.
- Allows smooth transition
11CLR Goals
- Support multilanguage application development
- Previously different languages only had limited
interoperability - Common type system
- Common Language Specification
- About 15 languages available
12Outline
- .NET Framework SDK Architecture
- Common Language Runtime Goals
- Extensive Meta Data support
- Deployment Strategy
- Execution-time Environment
13Extensive Meta Data support
- Previously
- DLLs used headers files to describe the interface
- COM Objects supplied type library
- Now
- Generated automatically
- Convertible to other formats
- XML, COM type libraries
14Extensive Meta Data support
- Description of deployment unit (assembly)
- Identity name, version, culture, public key
- What types are exported
- What other assemblies it depends on
- Security permissions needed to run
- Ex. unsafe code needs to be fully trusted.
- Description of types implemented
- Custom attributes
- User-defined
- Compiler-defined
- Ex. Conditional
- Framework-defined
15Metadata Creation And Use
Reflection
Source Code
Serialization (e.g. SOAP)
Designers
Compiler
Other Compiler
Debugger
Metadata (and code)
Profiler
Type Browser
Proxy Generator
Schema Generator
XML encoding (SDL or SUDS)
16Extensive Meta Data support
- Uses
- For cross-language data type import
- Emit metadata with output code
- Describe types defined and used
- Record external assemblies referenced
- Record version information
- Control Visual Studios Designer behavior
- Designer extensibility
- Web methods marked by custom attribute
- Type viewer
17Outline
- .NET Framework SDK Architecture
- Common Language Runtime Goals
- Extensive Meta Data support
- Deployment Strategy
- Execution-time Environment
18Deployment Strategy
- Assemblies
- Unit of deployment
- Versioning
- Security boundary
- Mediate type import and export
19Deployment Strategy
- Applications
- Applications are configurable units
- Assemblies are located based on
- Applications can have private versions of
assemblies - Private version preferred over shared
20Outline
- .NET Framework SDK Architecture
- Common Language Runtime Goals
- Extensive Meta Data support
- Deployment Strategy
- Execution-time Environment
21Execution Model
VB
VC
Iguana
Script
IL
NativeCode
Install timeCode Gen
Common Language Runtime
Econo-JITCompiler
Standard JITCompiler
Not in V1
NativeCode
22The Process Model
Shared class dataand native code
Thread
App.Domain(class dataandnative code)
App.Domain
Process
23Runtime Control Flow
Assembly
ClassLoader
First reference to type
IL to nativecode compiler
ExecutionSupport
ManagedNativeCode
First call to method
CodeManagers
CPU
SecuritySystem
24Execution-time Environment
- Data management
- Layout Provided by Runtime
- Usually automatic
- Metadata can specify
- Order
- Packing
- Explicit layout
- Lifetime Managed by Runtime (GC)
- Mark and Compact
- Generations optimization
- Stops the world (all threads in AppDomain)