Notes
Slide Show
Outline
1
 
2
Introduction to the
Microsoft .NET Framework
  • Andrew Scott
    Computing Department
    Lancaster University, UK
3
Overview
  • Microsoft .NET Framework
  • .NET Compact Framework
  • Framework Namespace
  • Common Language Runtime
  • .NET Type System
  • Metadata
  • Just In Time Compilation
  • Assemblies
  • Evidence Based Security
  • Multi-Generational Garbage Collection
4
Microsoft .NET Framework
  • Inbuilt object-based type system


  • Multi-language
    • Language neutral platform
    • Cross language inheritance

  • Zero impact install


  • Side by side execution
    • Multiple versions of components can co-exist
      • Even in same application
5
Microsoft .NET
  • Make distributed applications as easy to develop as desktop applications
    • Client-Server systems
    • Web based applications
    • Mobile applications

  • Adopt many research ideas from last few years
    • Commercial realisation

  • Rationalise Microsoft’s development tools


  • Develop once, run anywhere…
6
.NET Compact Framework
  • Reduced footprint implementation


  • Few assumptions about device
    • Screen size, colour depth, etc.
    • Touch screen, Keypad, …
    • RAM, Flash, ROM
    • Floating point
    • File system
    • Threading
    • etc.
7
Concept Realisation
8
Microsoft .NET Framework
9
.NET Framework Namespace
10
Common Language Runtime
  • Provides common type system
    • Consumer languages
    • Extender languages

  • Robust and secure execution environment
    • Verifies type safety
    • Code access security
    • Exception handling

  • Provides access to host resources
11
.NET Primitive Types
12
.NET Primitive Types
13
.NET Primitive Types
14
.NET Primitive Types
  • All languages adopt framework types
    • So… a string is a string
      whatever the language

  • Unified type system
    • Everything is an object
15
.NET Type System
  • Reference types
    • Classes
    • Interfaces
    • Arrays
    • Delegates
  • Value types
    • Primitives
    • Enumerators
    • Structures
16
Metadata
  • All .NET objects carry metadata
    • Object name
    • Method names and parameters
    • Variables names and types

  • Reflection
    • Object construction
    • Method invocation
    • Access to public data in object
17
Just In Time Compilation
18
Just In Time Compilation
19
Just In Time Compilation
20
Just In Time Compilation
21
Assemblies
  • Each assembly contains


    • All IL code, Metadata and Attributes


    • Manifest
      • List of files
      • Public and private resources
      • Dependencies (other assemblies)
      • Security permissions and requirements


    • Public key
22
Evidence Based Security
  • Source of code and invoking user
  • Works with chains of components
23
Evidence Based Security
  • Source of code and invoking user
  • Works with chains of components
24
Evidence
  • Where did the assembly come from?
    • Site
    • URL
    • Directory
    • Zone (My Computer, Intranet, Internet, …)

  • What is the name of the assembly?


  • Who signed and published assembly?
    • Public Key based digital signatures
25
Garbage Collection
  • Ensures no memory leaks


  • Multi-generational, mark and compact
    • Fundamental to .NET Framework
      …and not individual languages
    • Self tuning


  • Sweep typically takes ~1ms
26
Multi-Generational
Garbage Collection
27
Multi-Generational
Garbage Collection
28
Multi-Generational
Garbage Collection
29
Multi-Generational
Garbage Collection
30
Multi-Generational
Garbage Collection
31
Multi-Generational
Garbage Collection
32
Multi-Generational
Garbage Collection
33
Multi-Generational
Garbage Collection
34
Garbage Collector
  • Special provision for
    • Servers v Workstations
    • Multi-processor systems
    • Multi-threaded applications

  • Can be influenced by applications
    • But not generally recommended