Title: Microsoft 'NET
1Microsoft .NET
Introduction into the next generation of Internet
Applications
Tuna Oezer Ex-Program Manager Runtime Kernel
2Outline
- Evolution
- .NET Overview
- .NET Architecture
- Common Language Runtime
- C
3Evolution of the Internet
- 1st Generation 1994 1996
- Infrastructure
- Static Pages
- E-mail
- Browsers, Web Servers
- 2nd Generation 1996 2000
- Dynamic Pages
- Personalization, e-commerce
- Applets, Databases
4The Future of the Internet
- 3rd Generation
- Beyond Browsing
- Integration of Internet
- Web Services
- XML
Service 3
XML
Server
Service 2
XML
XML
HTML
/XML
XML
Service 1
Client
5Evolution of the PC
- Past Desktop is only device
- Future Many Devices, Mobility
- Desktop
- Notebook
- PDA
- Tablet PC
- TV, Toaster, etc.
6Evolution of Hardware
- Moor's Law
- Computing power increases exponentially
- Computing cost decreases
- Networking
- Broadband network access
- Static connections
- Wireless
7Evolution of Software
- From Standalone to Networking
- Necessity to interoperate with many devices
- Distributed Software
- From Product to Service
- Open Source
- Subscription to software
- Services around software
8Microsoft .NET
- Move towards a service oriented business model
- Provides a platform and tools for service
providers - Integrate and connect many different kinds of
devices over Internet
9Scenario
10Scenario
- Example Health Care
- Smart devices
- Mobility, geographic services
- Medical information is stored online
- Appointments can be scheduled online (Web
Service) - Authentication, Security
- Broadband, wireless networks
- Interactive user interface
11Microsofts Vision
- People will use many different kinds of devices
- Information will be accessible from anywhere
- Information will stay in digital form
- Companies will offer services via the web
12Guest Speaker
- Bill Gates, Chief Software Architect
13Guest Speaker
- Bill Gates, Chief Software Architect
- Platform for Internet and a Variety of Devices
- Smart devices
- Digital World
- Data, XML, Services
- Need easier development of Internet applications
- More powerful hardware and networks
14Microsofts Mission
- Empower people through great software any time,
any place, and on any device
- Provide a platform for the Internet
- .NET Framework
- Provide tools for developers
- Visual Studio .NET
- Provide data storage and access
- .NET Enterprise Servers
- Provide services over the Web
- Passport, Hotmail, Directory,
15Vision of Software Industry
- .NET vision is shared by many companies
- Microsoft offers complete solution
- Important differences between visions
- Smart devices vs. dumb terminals
- Write once run everywhere vs. adapt to device
and interoperate with others (Orchestration)
16Different Approaches
Desktop, Servers
.NET
.NET Framework
.NET Compact Framework
Smart Devices (PocketPC, Set Top Box, etc)
Java
Functionality, Power, Features
Pager, Cell Phone, etc.
.NET Compact Framework and Other
Reach across device form factors, CPUs, OSes
17Open Standards
- .NET is based on open Internet standards
- .NET itself is an open standard
- ECMA standardization is currently in progress
18Microsoft .NET Includes
- .NET Framework
- Visual Studio .NET
- ASP .NET
- Windows .NET
- .NET Enterprise Servers
- Building Block Services
19.NET Architecture
Open Internet Protocols SOAP, SCL, DISCO HTTP,
SMTP, XML, WAP, XSD
Your Application and Web Service
Orchestration
OtherApplications Using Your Service
.NET Framework
Building Block Services
Operations
Windows CE, 2000, XP, .NET
End-UserClients
Public Web Services
20.NET Framework
Orchestration
.NET Enterprise Servers
Building Block Services
.NET Framework
Windows (CE, ME, 2000, and .NET)
21Base Classes
System
Security
Collections
ServiceProcess
Configuration
Text
Diagnostics
Threading
Globalization
IO
Runtime
InteropServices
Net
Remoting
Reflection
Serialization
Resources
22Web Services
Framework
Concept
Web Protocol
Data
XML
Objects
Schema
XSD (XML Schema Definition)
Classes
Methods
Services
SCL (SOAP Configuration Language)
Invocation
SOAP
Calls
23XML Built in
- XML Parser is built into .NET Framework
- XML custom parser automatically generated from
XSD document and compiled into native code - SOAP is built into .NET
24Common Language Runtime
- Platform for .NET applications
- Provides runtime support
- Provides security features
- Enables interoperation of applications
XML, SOAP, etc.
Other Application (CLR)
Your Application (CLR)
Other Application (Other platform)
CLR
25Services of the CLR
- Class Loading and Layout
- Garbage collection (dynamic)
- 20-40 clock cycles for deallocation, scalable and
multi-processor - Code Manager (manages execution)
- Exception Manager (based on SEH)
- Type Checker
- Security Engine
- Thread Support
- Debug Engine
- COM Marshaler
26One Runtime For All Languages
- CLR is an open standard
- Any language can make use of CLR services
- Any language can use classes written in any other
language (consumer) - Any language can (code) inherit classes written
in any other language (extender) - A language can become a provider
27Types of Supported Languages
- Object Oriented
- Procedural
- Functional
- Common Language Specification
- Same Tool can be used for all languages
28Metadata 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)
29Current List of Languages
- ML (MS Research Cambridge)
- Mercury (Melbourne U.)
- Oberon (Zurich University)
- Oz (Univ of Saarlandes)
- Perl
- Python
- Basic (Visual Basic)
- C
- C
- C
- COBOL
- Component Pascal(Queensland Univ of Tech)
- Eiffel (Monash University)
- Haskell (Utrecht University)
30Built-in Support For
- Classes
- Global Procedures, Static, Instance and Virtual
Methods - Subroutines and Co-routines
- Constructors
- Inheritance (Type and Code)
- Overriding and Overloading
- Access Control and Hiding
- Attributes
31All Object Oriented
- All data types are objects, including Integers,
Chars, etc. - Single Object class for all languages
32Value Types
- Represent primitive types in an efficient way
- Extensible
- Boxing and unboxing
33Intermediate Language (IL)
- Assembly Language of CLR
- Code is never interpreted
VC
Standard JITCompiler
VB
IL
NativeCode
...
Econo-JITCompiler
Script
34Verification
- IL is verified by a verifier and guaranteed to be
type safe - Checks for type casts, memory initialization,
array bounds - Checks stack operations
35Security System
- Permissions
- Grant
- Demand (minimal, optional, refuse)
- Stack walk
- Policy Set of permissions
- Evidence Input to policy
- Zones
- Cryptography
- Signed XML IETF/W3C XMLDSIG
- Fully extensible
36Managed vs. Unmanaged
- Managed Code makes use of CLR services
- Unmanaged Code does not use any services
- Garbage Collector can be turned off
- CLR offers mechanisms for managed code to
interact with unmanaged code - Interoperation with hardware specific code and
other platforms - Ability to reuse old code
37Versioning
- Multiple versions of component can be installed
on machine - A single process can use different version of
component at same time - Zero-impact installation and uninstallation (copy)
38Runtime Control Flow
ClassLoader
First reference to type
IL to nativecode compiler
ExecutionSupport
ManagedNativeCode
First call to method
CodeManagers
CPU
SecuritySystem
39Common Language Runtime
Other Classes
Base Classes
Common Language Runtime
IL to native code compilers
Security
ExecutionSupport
GC, stack walker, code manager
Class loader and layout
40C
- Built on top of CLR
- Was designed from ground up to make use of CLR
services - Component Oriented
- Properties are first class
- Events are first class
41Hello World
using System class Hello static void
Main() Console.WriteLine(Hello word)
42Structure
- Namespaces
- May be nested
- Types
- Members
43C Type System
- All types extend Object
- There are no primitive types
- Implicit boxing and unboxing
44C Types Definitions
- Classes
- Interfaces
- Contain methods, properties, indexers, events
- Private implementations
- Structs (stack allocated)
- Enums
- Delegates
- Object-oriented function pointers
- Multi-cast
45C Member Definitions
- Constants
- Fields
- Methods (static, instance, virtual)
- Constructors and Destructors
- Properties
- Indexers
- can be overloaded
- Events
- Operators
46Properties
class Person private string _name public
string name get return _name
set _name value
Console.WriteLine(_name)
47Attributes
- Types and members may have attributes associated
with them - Attributes are themselves defined by classes,
extend System.Attribute - Extensible
- Type-safe
- Used for XML, SOAP, etc.
48Other Features
- Parameter arrays
- Versioning
- new and override
- XML comments
49Unsafe Code
- Interop
- Enables pointer arithmetic
- Pinning
50Conditional Compilation
- define, if, etc.
- Conditional methods
- Attribute Conditional(Debug)
- E.g., Assert