developing with the.net framework rob howard program manager.net framework team microsoft...

Post on 18-Dec-2015

215 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Developing with Developing with the .NET Frameworkthe .NET Framework

Rob HowardRob HowardProgram ManagerProgram Manager.NET Framework Team.NET Framework TeamMicrosoft CorporationMicrosoft Corporation

AgendaAgenda Overview and .NET EvolutionOverview and .NET Evolution Design points and ArchitectureDesign points and Architecture Common Language RuntimeCommon Language Runtime Class LibrariesClass Libraries Windows FormsWindows Forms ASP.NETASP.NET

OverviewOverview .NET Framework.NET Framework

Simple, secure, modern, multi-languageSimple, secure, modern, multi-language Great XML and Web Services supportGreat XML and Web Services support

Comprehensive class librariesComprehensive class libraries Consistent across languagesConsistent across languages Object oriented - inheritance, etc.Object oriented - inheritance, etc.

ASP.NET is a incredible web platformASP.NET is a incredible web platform Controls, web servicesControls, web services Fast, scalable, available, reliableFast, scalable, available, reliable

The .NET EvolutionThe .NET Evolution

The .NET EvolutionThe .NET Evolution

Before COM, applications were Before COM, applications were completely separate entities completely separate entities with little or no integrationwith little or no integration

Application

Code and data

structures

The .NET EvolutionThe .NET Evolution

COM provides a way for COM provides a way for components to integrate. components to integrate.

However, each component However, each component must provide the must provide the “plumbing” and objects “plumbing” and objects cannot directly interact.cannot directly interact.

The .NET EvolutionThe .NET Evolution

With the .NET Framework With the .NET Framework common language runtime, common language runtime, components are built on a components are built on a common substrate. No common substrate. No “plumbing” is needed and “plumbing” is needed and objects can interact directlyobjects can interact directly

Design PointsDesign Points Simplify developmentSimplify development

More power, less plumbingMore power, less plumbing

Unify programming modelsUnify programming models Across languages and typesAcross languages and types

Web standards and best practicesWeb standards and best practices Rich XML, standard protocols, statelessRich XML, standard protocols, stateless

Easier to deploy, run, & maintainEasier to deploy, run, & maintain Versioning and availabilityVersioning and availability

ArchitectureArchitecture

Windows COM+ Services

Common Language Runtime

Base Class Library

ADO.NET and XML

ASP.NET Windows Forms

Common Language Specification

VB C++ C# JScript …V

isual S

tud

io.N

ET

Multi-LanguageMulti-Language Over 20 languages supportedOver 20 languages supported

VB, C++, C#, JScript, Perl, COBOLVB, C++, C#, JScript, Perl, COBOL

Advanced multi-language featuresAdvanced multi-language features Cross language inheritance, exceptionsCross language inheritance, exceptions

Highly leveraged toolsHighly leveraged tools Debuggers, etc work with all languagesDebuggers, etc work with all languages

MSILMSIL

Compilation & ExecutionCompilation & Execution

Source Source CodeCode

Language Language CompilerCompiler

CompilationCompilation

CodeCode

MetadataMetadata

NativeNative

CodeCode Before installation or Before installation or the first time each the first time each method is calledmethod is calledExecutionExecution

JIT JIT CompilerCompiler

Common Language RuntimeCommon Language Runtime Manages running codeManages running code

Type safety and code access securityType safety and code access security Garbage collection and error handlingGarbage collection and error handling

Provides common type systemProvides common type system Value types (integer, float, etc)Value types (integer, float, etc) Objects, InterfacesObjects, Interfaces

Provides access to system resourcesProvides access to system resources Native APIs through P/InvokeNative APIs through P/Invoke COM integrationCOM integration

Common Language RuntimeCommon Language Runtime

Class Loader

IL to NativeCompilers

CodeManager

GarbageCollector

Security Engine Debug Engine

Type Checker Exception Manager

Thread Support COM Marshaler

Base Class Library Support

Developing ComponentsDeveloping Components

Simplifies DevelopmentSimplifies Development

Eliminates COM plumbingEliminates COM plumbing No more…No more…

RegistrationRegistration GUIDsGUIDs .IDL files.IDL files HRESULTsHRESULTs IUnknownIUnknown AddRef/ReleaseAddRef/Release CoCreateInstanceCoCreateInstance

=>self describing components

=>hierarchical namespaces

=>source code to metadata

=>structured exceptions

=>root object class

=>garbage collector

=>”new” operator

Simplified DeploymentSimplified Deployment No registration requiredNo registration required

Code is completely self-describingCode is completely self-describing Simply copy components with appSimply copy components with app

Zero-impact installationZero-impact installation Installing one app will not affect anotherInstalling one app will not affect another Global and non-global componentsGlobal and non-global components

Side-by-side executionSide-by-side execution Multiple component versions co-existMultiple component versions co-exist Multiple app versions co-existMultiple app versions co-exist

Seamless IntegrationSeamless Integration Use .NET classes as COM objectsUse .NET classes as COM objects

No extra development work requiredNo extra development work required

COM objects can be imported COM objects can be imported No ref counting or COM API neededNo ref counting or COM API needed

.NET classes utilize COM+ services.NET classes utilize COM+ services Transactions, Object pooling, etc…Transactions, Object pooling, etc…

ArchitectureArchitecture

Windows COM+ Services

Common Language Runtime

Base Class Library

ADO.NET and XML

ASP.NET Windows Forms

Common Language Specification

VB C++ C# JScript …V

isual S

tud

io.N

ET

A Unified ModelA Unified Model

Windows API

.NET Framework

Consistent API availability regardless oflanguage and programming model

ASP

Stateless,Code embeddedin HTML pages

MFC/ATL

Subclassing,Power,

Expressiveness

VB Forms

RAD,Composition,

Delegation

Base Class Library

ADO.NET XML

ASP.NET Windows

.NET Framework Namespaces.NET Framework Namespaces

System System

System.DataSystem.Data System.XmlSystem.Xml

System.WebSystem.Web

GlobalizationGlobalization

DiagnosticsDiagnostics

ConfigurationConfiguration

CollectionsCollections

ResourcesResources

ReflectionReflection

NetNet

IOIO

ThreadingThreading

TextText

ServiceProcessServiceProcess

SecuritySecurity

OleDbOleDb

CommonCommon

SqlTypesSqlTypes

SqlClientSqlClient

XPathXPath

SchemaSchema

RuntimeRuntimeInteropServicesInteropServices

RemotingRemoting

SerializationSerialization

ConfigurationConfiguration SessionStateSessionState

CachingCaching SecuritySecurity

ServicesServicesDescriptionDescription

DiscoveryDiscovery

ProtocolsProtocols

UIUIHtmlControlsHtmlControls

WebControlsWebControls

System.DrawingSystem.Drawing

ImagingImaging

Drawing2DDrawing2D

TextText

PrintingPrinting

System.Windows.FormsSystem.Windows.Forms

DesignDesign ComponentModelComponentModel

.NET Framework Namespaces.NET Framework Namespaces

XPathXPath

SerializationSerialization

Data and XMLData and XML Managed ProvidersManaged Providers

Stream-level access to data sourcesStream-level access to data sources Fastest way to get data out of SQLFastest way to get data out of SQL

ADO.NETADO.NET DataSetDataSet – In-memory buffer – In-memory buffer DataReaderDataReader – Synonymous with RecordSet – Synonymous with RecordSet

System.Xml - Great Standards supportSystem.Xml - Great Standards support 100% OASIS compliance100% OASIS compliance XSLT 1.0, XPath 1.0, XSD 1.0, DOM2XSLT 1.0, XPath 1.0, XSD 1.0, DOM2

Windows FormsWindows Forms Rich Windows applicationsRich Windows applications

Combines best of VB Forms, MFC and WFCCombines best of VB Forms, MFC and WFC Easy access to Win32 ® APIEasy access to Win32 ® API

Provides advanced featuresProvides advanced features Visual forms inheritance, automatic layoutVisual forms inheritance, automatic layout Advanced graphics support – GDI+Advanced graphics support – GDI+

Secure Secure Code access security prevents harmCode access security prevents harm No Internet Explorer security dialogs!No Internet Explorer security dialogs!

How Much Simpler?How Much Simpler?

HWND hwndMain = CreateWindowEx(HWND hwndMain = CreateWindowEx( 0, "MainWClass", "Main Window",0, "MainWClass", "Main Window", WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL,WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT,CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,CW_USEDEFAULT, CW_USEDEFAULT, (HWND)NULL, (HMENU)NULL, hInstance, NULL); (HWND)NULL, (HMENU)NULL, hInstance, NULL); ShowWindow(hwndMain, SW_SHOWDEFAULT); ShowWindow(hwndMain, SW_SHOWDEFAULT); UpdateWindow(hwndMain);UpdateWindow(hwndMain);

Form form = new Form();Form form = new Form();form.Text = "Main Window";form.Text = "Main Window";form.Show();form.Show();

Windows API

.NET Framework

ASP.NETASP.NET ASP.NET is a revolutionary advance of ASPASP.NET is a revolutionary advance of ASP

Existing ASP skills still work fineExisting ASP skills still work fine ……but lots more features to leveragebut lots more features to leverage

Core themes that ASP.NET has focused on: Core themes that ASP.NET has focused on: Making it easier to Making it easier to buildbuild, , deploydeploy, and , and operateoperate Providing great Providing great performanceperformance and and scalabilityscalability

Supported platformsSupported platforms Windows 2000 and Windows XPWindows 2000 and Windows XP Open hosting APIsOpen hosting APIs

ASP.NET DevelopmentASP.NET Development Server controls encapsulate behaviorServer controls encapsulate behavior

Provide VB-Like ModelProvide VB-Like Model

Support compiled languagesSupport compiled languages VB, C#, JScript, COBOL, etc.VB, C#, JScript, COBOL, etc.

Enable separation of code from contentEnable separation of code from content Work independentlyWork independently

Support multiple clients automaticallySupport multiple clients automatically Mobile controls for small devicesMobile controls for small devices

ASP.NET Web ServicesASP.NET Web Services Simple Programming ModelSimple Programming Model

Author Author .asmx.asmx files files SOAP messages mapped to methodsSOAP messages mapped to methods HTTP or XML knowledge not requiredHTTP or XML knowledge not required

Multiple Message FormatsMultiple Message Formats SOAP messaging support SOAP messaging support HTTP Get/PostHTTP Get/Post Extensible model for innovationExtensible model for innovation

ASP.NET DeploymentASP.NET Deployment ““XCOPY” deploymentXCOPY” deployment

No registration requiredNo registration required No stopping the serverNo stopping the server

Supports all web resourcesSupports all web resources Compiled components (DLL)Compiled components (DLL) Configuration filesConfiguration files

Update running applicationsUpdate running applications Application gracefully updatedApplication gracefully updated No stop and restartNo stop and restart

Scalable and AvailableScalable and Available Special support for multi-proc scalingSpecial support for multi-proc scaling

Scalable GC, multi-process applicationsScalable GC, multi-process applications

Web farm scalable session stateWeb farm scalable session state ASP.NET State Service, SQL ServerASP.NET State Service, SQL Server

Detects and recovers from failuresDetects and recovers from failures Crashes, hangs, memory leaks, etc…Crashes, hangs, memory leaks, etc…

ASP.NETASP.NET

SummarySummary .NET Framework.NET Framework

Simple, secure, modern, multi-languageSimple, secure, modern, multi-language Great XML and Web Services supportGreat XML and Web Services support

Comprehensive class librariesComprehensive class libraries Consistent across languagesConsistent across languages Object oriented - inheritance, etc.Object oriented - inheritance, etc.

ASP.NET is a incredible web platformASP.NET is a incredible web platform Controls, web servicesControls, web services Fast, scalable, available, reliableFast, scalable, available, reliable

Resources Resources CommunityCommunity

ASP.NET Discussion listsASP.NET Discussion lists http://www.asp.nethttp://www.asp.net

BooksBooks Professional ASP.NETProfessional ASP.NET Web Services books due soonWeb Services books due soon

top related