Title: An Overview of the Microsoft 'NET Framework
1An Overviewof theMicrosoft .NETFramework
(c) Allan C. Milne School of Computing Creative
Technologies University of Abertay Dundee
Last updated 26th July 2006
2Agenda
- What is .NET?
- Architecture overview
- Components of .NET
- Some concepts
3So what is .NET ?
- A software development platform
- An execution model framework
- An operating infrastructure
- A framework for distributed systems using
ubiquitous XML web services - The biggest change in a Microsoft platform since
NT replaced DOS
4Some Changes with .NET
- Instruction code formats
- Compilers
- Code loading and execution models
- Type security systems
- Object model
- Class libraries
- Languages
- Metadata
5The .NET Framework is
- A single programming architecture
- Fundamentally object-oriented
- A standard base class library
- Language independent
- Simple to deploy
- Internet enabled
- A single development environment
6The .NET Framework
- web forms
- web services
- mobile devices
ASP.NET Windows forms
ADO.NET and XML
Data access
Base class library
Common to all languages
Common Language Runtime (CLR)
7Common Language Runtime (CLR)
- Manages supports the
- execution of code in the common Intermediate
Language (IL) - assembly concept
- IL code with access security type checking
- JIT compiler from IL to native code
- object management
- memory management garbage collection
- unified type system
8.NET Framework Components
Visual Basic
C
C
JScript
more
Common Intermediate Language (IL)
9Managed Code
- Execution of IL code is managed at run-time by
the CLR - Memory allocation de-allocation
- Code access security
- Type checking
- JIT compilation to native code
- Thus the CLR exposes a virtual machine to the
programmer
10Unified Type System
- Type system applies to IL and therefore to all
source languages - All types are objects (implicit boxing)
- No variant types
- Unicode characters 1 String type
- Type safe
- CLR verification of IL
- no unsafe casting
- array bounds checking
11Assemblies
- Self-contained, self-describing unit of execution
deployment - Executables (.exe) or libraries (.dll)
- Private assemblies can be anywhere
- Shared assemblies are installed in the Global
Assembly Cache (GAC) - Contains IL code, metadata resources
- Metadata is contained in the manifest
12Assembly Manifest
- Facilitates code execution, class reflection
assembly interaction - Identity versioning
- References file lists
- Expected types
- Fields, methods, properties events of types
- Expected resources
- Security permissions
13Namespaces
- Are a replacement for COM GUIDs
- Organize components into logical groups
identified by namespace name - Can be nested to reflect a logical hierarchy of
functionality, e.g. - System.Windows.Forms
- One namespace can span several files
- One file can contain several namespaces
14Binding Namespaces
- No special requirements for private assemblies
- add a reference to the .dll file
- then just use the namespace names
- For shared assemblies in the GAC a strong name is
required - create with the Shared Name utility
- binds to a 128-bit hash key
15The Class Library
- A large rich library of useful classes
organised into namespaces - Enables richer, more rapid, robust productive
development - System
- XML
- Collections
- Windows
- Forms
16Using a Class Library
Old Windows API
HWND hwnd hwnd CreateWindowEx
(WS_EX_OVERLAPPEDWINDOW, szAppName,
szAppName, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,
CW_USEDEFAULT, modewidth, modeheight, NULL,
NULL, hThisInstance, NULL) ShowWindow
(hwnd, nCmdShow) UpdateWindow (hwnd)
.NET Framework (C)
Form form new Form() form.Text My
Window form.Show()
17Deployment
- Assemblies are the units of deployment,
versioning security - Can be as simple as copying files - no Windows
registry needed - Shared assemblies are added to the Global
Assembly Cache (GAC) - Versioning allows deployment use of different
versions of a component