architecture orientée services avec windows communication foundation pascal belaud microsoft france

21
Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France http://blogs.microsoft.fr/pascalbe

Upload: pierrette-auger

Post on 03-Apr-2015

104 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Architecture orientée servicesavec Windows

Communication Foundation

Pascal BelaudMicrosoft France

http://blogs.microsoft.fr/pascalbe

Page 2: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Historique de la communication

DCOMCOM+MSMQEnterprise ServicesWeb Services XML.NET Remoting…

A chaque technologie, un modèle de programmation

spécifique

Le choix du protocole et des types de message échangés

se fait au moment du développement et non pas

lors du déploiement

Page 3: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Interopérabilitéavec d’autresplateformes

ASMX

Programmationpar

attribut

Enterprise Services

Support desprotocoles

WS-*

WSE

Programmationorienté

message

System.Messaging

ExtensibilitéDisponibilité transparente

.NET Remoting

Modèle de programmation unifié

Page 4: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Unification des couches de distribution actuellesIdéal pour du mono-machine, du pluri-machines ou à travers Internet

Modèle de programmation unifié pour construire

des applications orientées services

Interopérabilité avec des applications tournant sur d’autres plateformes

Unification

Intégration

• Renforce les « best practices » pour construire des applications distribuées

OrientéeService

Windows Communication Foundation

Page 5: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

PRESENTATION

ASP.NETSystem.Web (2.0)CompilationConfigurationHandlersHostingMailManagementSecurityUI (2.0)Util

Presentation FrameworkSystem.Windows (3.0)

AnnotationsAutomationControlsDataDocumentsInkInteropNavigationResourcesSerializationShapesThreading

System.Windows.Media (3.0)

3DAnimationImagine

Windows FormsSystem.Windows.Forms (2.0)

DesignLayoutVisualStyles

Printing SubsystemSystem.Printing (3.0)GDI+System.Drawing

DesignDrawing2DPrinting

ADO.NETSystem.DataCommonOdbcOleDbOracleClientSqlSqlClient

ASP.NET Data ManagementSystem.WebCachingProfileSessionState

XML Data System.XmlSchemaSerializationXPathXsl

Windows File SystemSystem.Storage (F)CoreAudioCalendarContactsDocumentsImageMediaMessagesRulesSyncVideo

XPS DocumentsSystem.Windows.Xps (3.0)System.IO.Packaging (3.0)Speech IntegrationSystem.Speech (3.0)RecognitionSynthesis

Language Integrated QuerySystem.Query (F)System.Data.DLinq (F)System.Xml.XLinq (F)System.Expressions (F)

Windows Workflow FoundationSystem.Workflow (3.0)System.Workflow.Activities (3.0)

RulesSystem.Workflow.ComponentModel (3.0)

ComplierDesingerSerializaztion

System.Workflow.Runtime (3.0)HostingMessagingNetwork Class Library

System.Net CacheMail (2.0)Network Information (2.0)Security (2.0)Sockets

.NET RemotingSystem.Runtime.Remoting

ASMX Web ServicesSystem.Web.Services

Identity ManagementMicrosoft.InfoCards (3.0)

MSMQSystem.Messaging

Directory ServicesSystem.DirectoryServices

DATA COMMUNICATION

FUNDAMENTALS

BASE CLASS LIBRARIES

System

System.CodeDom

System.ComponentModel

System.Diagonostics

System.IO (2.0)

System.Resources

System.Text

System.ServiceProcess

System.Threading

System.Timers

System.EnterpriseServices

System.Transactions (2.0)

.NET RemotingSystem.Runtime.Remoting

System.TextGeneric (2.0)

System.ReflectionEmail

System.Configuration

System.TextAccessControl (2.0)Cryptography (2.0)PermissionsPolicyPrincipal (2.0)

Managed Add-In FrameworkSystem.Addins (F)

Contact

Microsoft.Build (2.0)

System.RuntimeCompilerServicesConstrainedExecution(2.0)InteropServicesHostingSerializationVersioning

“ClickOnce” DeploymentSystem.Deployoment (2.0)

WINDOWS VISTA

(2.0) (3.0) - New

(2.0) - Substantially Improved

- Windows Presentation Foundation(formerly codenamed “Avalon”)

- Windows Communication Foundation

(formerly codenamed “Indigo”)

- Windows Workflow Foundation

KEY

Windows Communications FoundationSystem.ServiceModel (3.0)

ChannelsConfigurationDiagnosticsIntegration

System.ServiceModel.Security(3.0)

ProtocolsTokens

Page 6: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Windows Communication Foundation?

Un jeu de classes .NET 2.0 pour construire des applications basées sur des services

Il faut définir des interfaces explicites - Contracts

“Behavioral contracts” — ce que votre programme va faire“Structural contracts” — le format des entrées et sorties

Page 7: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Windows Communication Foundation?

Il faut choisir comme s’intégrer à la topologie réseau - Bindings

“Standard bindings” — à choisir pour une perf max ou une interop max par exemple“Custom bindings” — pour choisir le transport, encodage et protocole

Il faut choisir l’hébergement et les adresses à utiliser - Address

Au sein de n’importe quelle assembly .NET — console, windows, serviceAu sein de IIS 5.1, 6.0 ou IIS 7.0 Windows Activation ServiceBénéficier des interfaces évoluées de gestion et d’instrumentation fournies en standard:

perf counters, WMI, tracing…

Page 8: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Client Service

Clients et Services

Message

Page 9: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Client Service

Endpoints

EndpointEndpoint

Endpoint

Endpoint

Message

Page 10: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Service

CBA

CBA

Client

Address, Binding, Contract

ABC

AddressOù ?

ContractQuoi ?

BindingComment ?

EndpointEndpoint

CBA

Message

Page 11: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

WCF : vue du développeur

Où ?Où ? serviceservice aaddressddress

Comment ?Comment ? bindingbinding bbindinginding

Quoi ?Quoi ? portTypeportType ccontractontract

Section WSDLSection WSDL Terme WCFTerme WCF

Page 12: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

WCF : vue du développeur

Où ?Où ? serviceservice aaddressddress

Comment ?Comment ? bindingbinding bbindinginding

Quoi ?Quoi ? portTypeportType ccontractontract

Section WSDLSection WSDL Terme WCFTerme WCF

Une interface définie et

implémentée par les développeurs

Spécifié par les administrateurs via des fichiers

de configuration

XML

Page 13: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

WCF : comment ça marche ?

User CodeUser Code User CodeUser Code

Typed ProxyTyped Proxy DispatcherDispatcher

ProtocolProtocol ProtocolProtocol

EncodingEncoding EncodingEncoding

TransportTransport TransportTransportMessageMessage

Page 14: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Windows Communication FoundationComment ça marche ?

On prend sa respiration… c’est parti !

démo

Page 15: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Les éléments du Binding

Transport Encoder Security Reliability Protocol

Pipes

MSMQ

Custom

HTTP Text

TCP Binary

MTOM

Custom

Custom Custom

WS-* WS-* WS-*

Custom

WS-* WS-* WS-*HTTP TextTCP Binary

Page 16: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Les Bindingspar défaut

T = Transport Security | S = WS-Security | O = One-Way Only

InteropS

ecurityS

essionTransxD

uplexS

tream

BasicHttpBinding

WsHttpBinding

WsDualHttpBinding

NetTcpBinding

NetNamedPipesBinding

NetMsmqBinding

BPBP

WSWS

WSWS

TT

TSTS

TSTS

TSTS

TSTS

TSTS

OO

OO

NetPeerTcpBinding

TSTS

Page 17: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Operating Systems supportés

WCF est installé par défaut sur Windows Vista

WCF peut être installé sur Windows XP SP2 Windows Server 2003 R2

Page 18: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Quoi installer ?

Page 19: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Ressources

Microsoft Windows Vista Developer Centerhttp://msdn.microsoft.com/windowsvista

Windows Communication Foundation Webhttp://windowscommunication.net

Migrating .NET Remoting to WCF (and even ASMX!)http://blogs.msdn.com/mattavis/archive/2005/10/10/479280.aspx

Windows Communication Foundation - MSDN Forumshttp://forums.microsoft.com/msdn/showforum.aspx?forumid=118&siteid=1

Page 20: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France

Conclusion

Une approche unifiée dans le développement d’applications orientées services

Prise en main aisée

Guettez les WebCasts et prochaines sessions sur le sujet

Page 21: Architecture orientée services avec Windows Communication Foundation Pascal Belaud Microsoft France