Microsoft Global Briefing 2001
Download
Report
Transcript Microsoft Global Briefing 2001
Developing with the
.NET Framework
Rob Howard
Program Manager
.NET Framework Team
Microsoft Corporation
Agenda
Overview and .NET Evolution
Design points and Architecture
Common Language Runtime
Class Libraries
Windows Forms
ASP.NET
Overview
.NET Framework
Comprehensive class libraries
Simple, secure, modern, multi-language
Great XML and Web Services support
Consistent across languages
Object oriented - inheritance, etc.
ASP.NET is a incredible web platform
Controls, web services
Fast, scalable, available, reliable
The .NET Evolution
The .NET Evolution
Applicatio
n
Code and data
structures
Before COM, applications were
completely separate entities
with little or no integration
The .NET Evolution
COM provides a way for
components to integrate.
However, each component
must provide the
“plumbing” and objects
cannot directly interact.
The .NET Evolution
With the .NET Framework
common language runtime,
components are built on a
common substrate. No
“plumbing” is needed and
objects can interact directly
Design Points
Simplify development
Unify programming models
Across languages and types
Web standards and best practices
More power, less plumbing
Rich XML, standard protocols, stateless
Easier to deploy, run, & maintain
Versioning and availability
Architecture
VB
C++
C#
JScript
…
ASP.NET
Windows Forms
ADO.NET and XML
Base Class Library
Common Language Runtime
Windows
COM+ Services
Visual Studio.NET
Common Language Specification
Multi-Language
Over 20 languages supported
Advanced multi-language features
VB, C++, C#, JScript, Perl, COBOL
Cross language inheritance, exceptions
Highly leveraged tools
Debuggers, etc work with all languages
Compilation & Execution
Compilation
Source
Code
Language
Compiler
JIT
Compiler
Execution
Native
Code
Code
MSIL
Metadata
Before installation or
the first time each
method is called
Common Language Runtime
Manages running code
Provides common type system
Type safety and code access security
Garbage collection and error handling
Value types (integer, float, etc)
Objects, Interfaces
Provides access to system resources
Native APIs through P/Invoke
COM integration
Common Language Runtime
Base Class Library Support
Thread Support
COM Marshaler
Type Checker
Exception Manager
Security Engine
Debug Engine
IL to Native
Compilers
Code
Manager
Class Loader
Garbage
Collector
Developing Components
Simplifies Development
Eliminates COM plumbing
No more…
Registration
GUIDs
.IDL files
HRESULTs
IUnknown
AddRef/Release
CoCreateInstance
=>self describing components
=>hierarchical namespaces
=>source code to metadata
=>structured exceptions
=>root object class
=>garbage collector
=>”new” operator
Simplified Deployment
No registration required
Zero-impact installation
Code is completely self-describing
Simply copy components with app
Installing one app will not affect another
Global and non-global components
Side-by-side execution
Multiple component versions co-exist
Multiple app versions co-exist
Seamless Integration
Use .NET classes as COM objects
COM objects can be imported
No extra development work required
No ref counting or COM API needed
.NET classes utilize COM+ services
Transactions, Object pooling, etc…
Architecture
VB
C++
C#
JScript
…
ASP.NET
Windows Forms
ADO.NET and XML
Base Class Library
Common Language Runtime
Windows
COM+ Services
Visual Studio.NET
Common Language Specification
A Unified Model
Consistent API availability regardless of
language and programming model
.NET Framework
RAD,
Composition,
Delegation
VB Forms
Subclassing,
Power,
Expressiveness
MFC/ATL
Windows API
Stateless,
Code embedded
in HTML pages
ASP
.NET Framework Namespaces
ASP.NET
Windows
ADO.NET
XML
Base Class Library
.NET Framework Namespaces
System.Web
Services
Description
UI
HtmlControls
Discovery
WebControls
System.Windows.Forms
Design
Protocols
ComponentModel
System.Drawing
Caching
Security
Drawing2D
Printing
Configuration
SessionState
Imaging
Text
System.Data
System.Xml
Common
SqlClient
Schema
Serialization
OleDb
SqlTypes
XPath
XPath
System
Collections
IO
Security
Configuration
Net
ServiceProcess
Runtime
InteropServices
Diagnostics
Reflection
Text
Remoting
Globalization
Resources
Threading
Serialization
Data and XML
Managed Providers
ADO.NET
Stream-level access to data sources
Fastest way to get data out of SQL
DataSet – In-memory buffer
DataReader – Synonymous with RecordSet
System.Xml - Great Standards support
100% OASIS compliance
XSLT 1.0, XPath 1.0, XSD 1.0, DOM2
Windows Forms
Rich Windows applications
Provides advanced features
Combines best of VB Forms, MFC and WFC
Easy access to Win32 ® API
Visual forms inheritance, automatic layout
Advanced graphics support – GDI+
Secure
Code access security prevents harm
No Internet Explorer security dialogs!
How Much Simpler?
Windows API
HWND hwndMain = CreateWindowEx(
0, "MainWClass", "Main Window",
WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
(HWND)NULL, (HMENU)NULL, hInstance, NULL);
ShowWindow(hwndMain, SW_SHOWDEFAULT);
UpdateWindow(hwndMain);
.NET Framework
Form form = new Form();
form.Text = "Main Window";
form.Show();
ASP.NET
ASP.NET is a revolutionary advance of ASP
Core themes that ASP.NET has focused on:
Existing ASP skills still work fine
…but lots more features to leverage
Making it easier to build, deploy, and operate
Providing great performance and scalability
Supported platforms
Windows 2000 and Windows XP
Open hosting APIs
ASP.NET Development
Server controls encapsulate behavior
Support compiled languages
VB, C#, JScript, COBOL, etc.
Enable separation of code from content
Provide VB-Like Model
Work independently
Support multiple clients automatically
Mobile controls for small devices
ASP.NET Web Services
Simple Programming Model
Author .asmx files
SOAP messages mapped to methods
HTTP or XML knowledge not required
Multiple Message Formats
SOAP messaging support
HTTP Get/Post
Extensible model for innovation
ASP.NET Deployment
“XCOPY” deployment
Supports all web resources
No registration required
No stopping the server
Compiled components (DLL)
Configuration files
Update running applications
Application gracefully updated
No stop and restart
Scalable and Available
Special support for multi-proc scaling
Web farm scalable session state
Scalable GC, multi-process applications
ASP.NET State Service, SQL Server
Detects and recovers from failures
Crashes, hangs, memory leaks, etc…
ASP.NET
Summary
.NET Framework
Comprehensive class libraries
Simple, secure, modern, multi-language
Great XML and Web Services support
Consistent across languages
Object oriented - inheritance, etc.
ASP.NET is a incredible web platform
Controls, web services
Fast, scalable, available, reliable
Resources
Community
ASP.NET Discussion lists
http://www.asp.net
Books
Professional ASP.NET
Web Services books due soon