SlideServe
Menu
Préférences
© SlideServe · v2026

Introducing WCF

kerri avatar
8 diapositives · 276 Views · Jul 22, 2014

Introducing WCF. Ken Casada Developer Evangelist Microsoft Switzerland Blog: http :// blogs.msdn.com/swiss_dpe_team/Default.aspx kcasada@microsoft.com. Sys.Messaging. Ent Services. Attribute-based programming. Message- based programming. Windows Communication Foundation.

Introducing WCF - slide 1
01 / 8Introducing WCF
1 / 17

Télécharger la présentation

Introducing WCF
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Introducing WCF • Ken Casada • Developer Evangelist • Microsoft Switzerland • Blog: http://blogs.msdn.com/swiss_dpe_team/Default.aspx • kcasada@microsoft.com

  2. Sys.Messaging Ent Services Attribute-based programming Message- based programming Windows Communication Foundation Unified framework supersets existing technologies ASMX Remoting Location transparency Interop with other platforms WSE WS-* protocols

  3. class HelloService { • [WebMethod] • public String Hello(String Greeting) { • X509CertificateCollection collection = new X509CertificateCollection(); • IntPtr blob = Marshal.AllocHGlobal(Marshal.SizeOf( typeof(CRYPTOAPI_BLOB))); • IntPtr data = (IntPtr)((int)blob + • Marshal.SizeOf(typeof(CRYPTOAPI_BLOB))); • … • SeqAckRange range = new SeqAcknRange(id, low, high ); • SeqAckRange[] ranges = { range }; • ReliableQueue.ProcessAcks( ranges ); • … • BeginTransaction (NULL, • ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, • &pITransaction); • … • return Greeting; • } • } 20,379 linessecurity 5,988 lines reliable messaging 25,507 linestransactions 4,442 lines infrastructure Total lines 56,296 ProductivityUsing Visual Studio .NET 2003

  4. class HelloService { [WebMethod] public String Hello(String Greeting) { foreach ( SecurityTokentok in requestContext.Security.Tokens { X509SecurityToken token = tok as X509SecToken } … SeqAckRange range = new SeqAcknRange(id,low,high ); SeqAckRange[] ranges = { range }; ReliableQueue.ProcessAcks( ranges ); … BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction); … return Greeting; } } 10 lines security 1,804 lines reliable messaging 25,507 linestransactions Total lines 27,321 ProductivityUsing Visual Studio .NET 2003 and WSE

  5. [ServiceContract] class HelloService { [OperationContract] [PrincipalPermission(SecurityAction.Demand, Role = “Adminstrators")] [TransactionFlow(TransactionFlowOption.Mandatory)] [OperationBehavior(TransactionScopeRequired = true, TransactionAutoComplete = true)] String Hello(String Greeting) {return Greeting;} } <bindings> <wsHttpBinding> <binding name="Binding1“ transactionFlow="true"> <security mode="Message"> <message clientCredentialType="Windows“/> </security> <reliableSession enabled="true" /> </binding> </wsHttpBinding> </bindings> 1 code + 2 config (elem.) security 0 code + 1 config (elem.) reliable messaging 2 code + 1 config (attr.)transactions Total lines:3 code (what) + 4 config (how) Productivity Using Visual Studio 2005 and WCF

  6. Endpoints Client Service Endpoint Endpoint Endpoint Endpoint

  7. Endpoint Address, Binding, Contract Client Service A B C C B A A B C A B C Address Where? Binding How? Contract What?

  8. WCF