SlideShare une entreprise Scribd logo
1  sur  46
Windows Communication Foundation Ch. Vishwa Mohan M.Sc., M.Tech Freelance Software Consultant & Corporate Trainer
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Agenda
WCF Introduction Windows Communication Foundation
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],WCF Introduction
From Objects to Services ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Object-Oriented Service-Oriented Component-Oriented 1980s 2000s 1990s
What is a SOA ?  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],A fully Implemented SOA Provides the ability to rapidly and dynamically compose applications, services and even complete processes.
What is a Service ?  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Loose coupling  is a requirement  not a suggestion
Four Tenets of Service Orientation SERVICE ORIENTATION Compatibility Based On Policy Share Schema & Contract, Not Class Services Are Autonomous Boundaries Are Explicit
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Service Oriented Architecture (SOA)
SOA Implementation in WCF Boundaries  are Explicit Services are autonomous Share schema & contract, not class Compatibility  based on policy Developers opt-in to consuming, exposing,  and defining public-facing service façade. Services and consumers are independently versioned, deployed, operated, and secured . Data never includes behavior;  Objects with data and behavior are  a local phenomenon. Capabilities and requirements represented  by a unique public name;  Used to establish service suitability.
Anatomy of a Service ?  ,[object Object],[object Object],[object Object],[object Object]
How to build Service Oriented Applications?   “ What API should I use?” “ How do I build service-oriented systems?” “ How can I send messages securely & reliably?” “ How do I build dynamic, decoupled applications?”
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],What is WCF ?
Extending the .NET Framework WCF Presentation Data Communication Windows Forms ASP.NET SQL Server Compact Framework Console & NT Service … J# C++ C# VB Base App Services Security Configuration Deployment & Management Visual Studio 2008
Windows Communication Foundation INTEROPERABILITY PRODUCTIVITY SERVICE-ORIENTED DEVELOPMENT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
WCF Unified Programming Model ( Supersets Existing Technologies ) Interop with other platforms ASMX Attribute-  Based Programming Enterprise Services WS-* Protocol Support WSE 2/3 Message- Oriented Programming MSMQ Extensibility Location transparency .NET Remoting Supersets Existing Technologies
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Unified Programming Model
WS-* Protocol Support Security WS-Security WS-Trust WS-Secure  Conversation Messaging SOAP, WS-Addressing, MTOM Reliability WS-Reliable Messaging Transactions WS-Atomic Transactions WS-Coordination Metadata WSDL, WS-Policy WS-MetadataExchange ,[object Object],XML
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],WCF Security
[object Object],[object Object],[object Object],[object Object],WCF Transaction
[object Object],[object Object],[object Object],[object Object],WCF Reliability
WS-* Composability and Message Anatomy
Investment Protection SIDE-BY-SIDE Interop UPGRADE Side-by-side co-existence with existing distributed technologies. Smooth upgrade of existing code to WCF Seamless communications with application built on existing technologies
[object Object],[object Object],[object Object],[object Object],WCF Introduction  Caller Service Service 1 Service 2 Message Message All messages are SOAP based
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],What is SOAP ?  <S:Envelope> <S:Header> <n:HeaderBlock>  .  .  . </n:HeaderBlock> </S:Header>  <S:Body>  . . .  </S:Body> </S:Envelope>
Example of Simple SOAP Envelope <?xml version=&quot;1.0&quot;?>  < soap:Envelope  xmlns:soap=&quot;http://www.w3.org/2001/12/soap-envelope&quot;  soap:encodingStyle=&quot;http://www.w3.org/2001/12/soap-encoding&quot;>  < soap:Heade r>  <m:Trans xmlns:m=&quot;http://www.w3schools.com/transaction/&quot;  soap:mustUnderstand=&quot;1&quot;>234</m:Trans>  </ soap:Header > < soap:Body  xmlns:m=&quot;http://www.example.org/stock&quot;>  <m:GetStockPrice>  <m:StockName>IBM</m:StockName>  </m:GetStockPrice>  </ soap:Body > </ soap:Envelope >
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],End Points Caller Service Message Endpoint Endpoint Endpoint
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],End Points
Address, Binding and Contract Caller Service Message Address Binding Contract (Where) (How) (What) ,[object Object],[object Object],[object Object],A B C A B C A B C
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],WCF Address
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],WCF Bindings
Standard Bindings ,[object Object],Interop Security Session Transx Duplex Stream BasicHttpBinding WsHttpBinding WsDualHttpBinding NetTcpBinding NetNamedPipeBinding NetMsmqBinding BP WS WS T TS TS TS TS TS O O NetPeerTcpBinding TS .NET .NET .NET
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],WCF Contracts
[object Object],[object Object],[object Object],WCF Service Contract [ ServiceContract (Namespace=&quot;http://Microsoft.ServiceModel.Samples&quot;)] public interface ICalculator  { [ OperationContract ] ComplexNumber Add(ComplexNumber n1,  ComplexNumber n2); [ OperationContract ] ComplexNumber Subtract(ComplexNumber n1,  ComplexNumber n2); void  InnerMethod(string  msg); //Not exposed to client.  }
WCF Data Contract ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[ DataContract ] public class ComplexNumber  { [ DataMember ] public double Real = 0.0D; [ DataMember ] public double Imaginary = 0.0D; }
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],WCF Behaviors
Message Exchange Pattern ,[object Object],[object Object],[object Object],Sender Receiver ,[object Object],[object Object],Sender Receiver ,[object Object],[object Object],[object Object],Sender Receiver
Message Topologies ,[object Object],[object Object],[object Object],[object Object],[object Object],Sender Receiver Intermediary Sender Receiver Sender Receiver
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],WCF Message Terminology
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],WCF Concepts
WCF Architecture: Messaging Runtime Client Dispatcher Service Contract and Behaviors Binding Address Transport Encoder Protocol(s) Transport Encoder Protocol(s)
WCF Architecture WS Security Channel Messaging HTTP Channel TCP  Channel MSMQ Channel Named Pipe Channel Transaction Flow  Channel WS Reliable  Messaging Channel Encoders (Binary/MTOM/Text/XML) Activation and Hosting Service Runtime Contracts Data Contract Message Contract Service Contract Policy  and Binding Application Windows Activation Service .EXE Windows Service COM+ Throttling Behavior Error Behavior Metadata Behavior Instance Behavior Message Behavior Transaction Behavior Dispatch Behavior Concurrency Behavior Parameter Filtering
WCF Features Summary Address Binding Behavior Contract HTTP Transport TCP Transport NamedPipe Transport MSMQ Transport Custom Transport WS-Security Protocol WS-RM Protocol WS-Coord Protocol Duplex Channel Custom Protocol http://... net.tcp://... net.pipe://... net.msmq://... xxx://... Throttling Behavior Metadata Behavior Error  Behavior Custom Behavior Instancing Behavior Concurrency Behavior Transaction Behavior Security Behavior Request/ Response One-Way Duplex net.p2p://... Peer Transport
WCF Architecture Binding Address Contract
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],WCF Authentication Service Overview
[object Object],[object Object],[object Object],[object Object],Contact Me

Contenu connexe

Tendances

.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
Doncho Minkov
 

Tendances (20)

.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
web service technologies
web service technologiesweb service technologies
web service technologies
 
.Net framework
.Net framework.Net framework
.Net framework
 
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 
IIS
IISIIS
IIS
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
Asp.net MVC training session
Asp.net MVC training sessionAsp.net MVC training session
Asp.net MVC training session
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 
C#.NET
C#.NETC#.NET
C#.NET
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
4 memory management bb
4   memory management bb4   memory management bb
4 memory management bb
 
Servlets
ServletsServlets
Servlets
 
Dot Net Core
Dot Net CoreDot Net Core
Dot Net Core
 
WPF
WPFWPF
WPF
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
dot net technology
dot net technologydot net technology
dot net technology
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 

En vedette

Windows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceWindows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) Service
Sj Lim
 
WCF for Dummies (Parte II)
WCF for Dummies (Parte II)WCF for Dummies (Parte II)
WCF for Dummies (Parte II)
Will.i.am
 
WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)
ipower softwares
 
State management
State managementState management
State management
Iblesoft
 
Master pages ppt
Master pages pptMaster pages ppt
Master pages ppt
Iblesoft
 

En vedette (20)

WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
 
Wcf
WcfWcf
Wcf
 
Windows Presentation Foundation
Windows Presentation Foundation  Windows Presentation Foundation
Windows Presentation Foundation
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 
Windows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceWindows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) Service
 
Windows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best PracticesWindows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best Practices
 
Making WCF Simple
Making WCF SimpleMaking WCF Simple
Making WCF Simple
 
Project Management with SharePoint 2010
Project Management with SharePoint 2010Project Management with SharePoint 2010
Project Management with SharePoint 2010
 
WFC #1
WFC #1WFC #1
WFC #1
 
WCF for Dummies (Parte II)
WCF for Dummies (Parte II)WCF for Dummies (Parte II)
WCF for Dummies (Parte II)
 
WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)
 
State management
State managementState management
State management
 
JSP Custom Tags
JSP Custom TagsJSP Custom Tags
JSP Custom Tags
 
ASP.NET Lecture 3
ASP.NET Lecture 3ASP.NET Lecture 3
ASP.NET Lecture 3
 
Master page in ASP . NET
Master page in ASP . NETMaster page in ASP . NET
Master page in ASP . NET
 
State management
State managementState management
State management
 
Master pages ppt
Master pages pptMaster pages ppt
Master pages ppt
 
ASP.NET State management
ASP.NET State managementASP.NET State management
ASP.NET State management
 
Master pages
Master pagesMaster pages
Master pages
 
State management in ASP.NET
State management in ASP.NETState management in ASP.NET
State management in ASP.NET
 

Similaire à WCF

Tulsa Tech Fest2008 Service Oriented Development With Windows Communication F...
Tulsa Tech Fest2008 Service Oriented Development With Windows Communication F...Tulsa Tech Fest2008 Service Oriented Development With Windows Communication F...
Tulsa Tech Fest2008 Service Oriented Development With Windows Communication F...
Jason Townsend, MBA
 
Enterprise Service Bus
Enterprise Service BusEnterprise Service Bus
Enterprise Service Bus
miteshisheth
 
Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35
Subodh Pushpak
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
Jorgen Thelin
 
Overview of Windows Vista Devices and Windows Communication Foundation (WCF)
Overview of Windows Vista Devices and Windows Communication Foundation (WCF)Overview of Windows Vista Devices and Windows Communication Foundation (WCF)
Overview of Windows Vista Devices and Windows Communication Foundation (WCF)
Jorgen Thelin
 
1. WCF Services - Exam 70-487
1. WCF Services - Exam 70-4871. WCF Services - Exam 70-487
1. WCF Services - Exam 70-487
Bat Programmer
 

Similaire à WCF (20)

Tulsa Tech Fest2008 Service Oriented Development With Windows Communication F...
Tulsa Tech Fest2008 Service Oriented Development With Windows Communication F...Tulsa Tech Fest2008 Service Oriented Development With Windows Communication F...
Tulsa Tech Fest2008 Service Oriented Development With Windows Communication F...
 
Service Oriented Development With Windows Communication Foundation Tulsa Dnug
Service Oriented Development With Windows Communication Foundation   Tulsa DnugService Oriented Development With Windows Communication Foundation   Tulsa Dnug
Service Oriented Development With Windows Communication Foundation Tulsa Dnug
 
Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003
 
Enterprise Service Bus
Enterprise Service BusEnterprise Service Bus
Enterprise Service Bus
 
Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
 
Overview of Windows Vista Devices and Windows Communication Foundation (WCF)
Overview of Windows Vista Devices and Windows Communication Foundation (WCF)Overview of Windows Vista Devices and Windows Communication Foundation (WCF)
Overview of Windows Vista Devices and Windows Communication Foundation (WCF)
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
 
Java web services
Java web servicesJava web services
Java web services
 
Difference between wcf and asp.net web api
Difference between wcf and asp.net web apiDifference between wcf and asp.net web api
Difference between wcf and asp.net web api
 
Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...
 
Advantage of WCF Over Web Services
Advantage of WCF Over Web ServicesAdvantage of WCF Over Web Services
Advantage of WCF Over Web Services
 
Introduction to Micro Services
Introduction to Micro ServicesIntroduction to Micro Services
Introduction to Micro Services
 
1. WCF Services - Exam 70-487
1. WCF Services - Exam 70-4871. WCF Services - Exam 70-487
1. WCF Services - Exam 70-487
 
Soa & Bpel With Web Sphere
Soa & Bpel With Web SphereSoa & Bpel With Web Sphere
Soa & Bpel With Web Sphere
 
Soa & Bpel With Web Sphere
Soa & Bpel With Web SphereSoa & Bpel With Web Sphere
Soa & Bpel With Web Sphere
 
Wcf v1-day1
Wcf v1-day1Wcf v1-day1
Wcf v1-day1
 
Uunit 5-xml&web security
Uunit 5-xml&web securityUunit 5-xml&web security
Uunit 5-xml&web security
 
Cc unit 2 updated
Cc unit 2 updatedCc unit 2 updated
Cc unit 2 updated
 
Web programming
Web programmingWeb programming
Web programming
 

Plus de Vishwa Mohan (14)

OPC Unified Architecture
OPC Unified ArchitectureOPC Unified Architecture
OPC Unified Architecture
 
jQuery
jQueryjQuery
jQuery
 
Wwf
WwfWwf
Wwf
 
Da package usersguide
Da package usersguideDa package usersguide
Da package usersguide
 
Dareadme
DareadmeDareadme
Dareadme
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
 
Linq
LinqLinq
Linq
 
Uml
UmlUml
Uml
 
Xml
XmlXml
Xml
 
Real Time Systems &amp; RTOS
Real Time Systems &amp; RTOSReal Time Systems &amp; RTOS
Real Time Systems &amp; RTOS
 
Embedded Linux
Embedded LinuxEmbedded Linux
Embedded Linux
 
Introduction To Embedded Systems
Introduction To Embedded SystemsIntroduction To Embedded Systems
Introduction To Embedded Systems
 
Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
 
Zig Bee
Zig BeeZig Bee
Zig Bee
 

WCF

  • 1. Windows Communication Foundation Ch. Vishwa Mohan M.Sc., M.Tech Freelance Software Consultant & Corporate Trainer
  • 2.
  • 3. WCF Introduction Windows Communication Foundation
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Four Tenets of Service Orientation SERVICE ORIENTATION Compatibility Based On Policy Share Schema & Contract, Not Class Services Are Autonomous Boundaries Are Explicit
  • 9.
  • 10. SOA Implementation in WCF Boundaries are Explicit Services are autonomous Share schema & contract, not class Compatibility based on policy Developers opt-in to consuming, exposing, and defining public-facing service façade. Services and consumers are independently versioned, deployed, operated, and secured . Data never includes behavior; Objects with data and behavior are a local phenomenon. Capabilities and requirements represented by a unique public name; Used to establish service suitability.
  • 11.
  • 12. How to build Service Oriented Applications? “ What API should I use?” “ How do I build service-oriented systems?” “ How can I send messages securely & reliably?” “ How do I build dynamic, decoupled applications?”
  • 13.
  • 14. Extending the .NET Framework WCF Presentation Data Communication Windows Forms ASP.NET SQL Server Compact Framework Console & NT Service … J# C++ C# VB Base App Services Security Configuration Deployment & Management Visual Studio 2008
  • 15.
  • 16. WCF Unified Programming Model ( Supersets Existing Technologies ) Interop with other platforms ASMX Attribute- Based Programming Enterprise Services WS-* Protocol Support WSE 2/3 Message- Oriented Programming MSMQ Extensibility Location transparency .NET Remoting Supersets Existing Technologies
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. WS-* Composability and Message Anatomy
  • 23. Investment Protection SIDE-BY-SIDE Interop UPGRADE Side-by-side co-existence with existing distributed technologies. Smooth upgrade of existing code to WCF Seamless communications with application built on existing technologies
  • 24.
  • 25.
  • 26. Example of Simple SOAP Envelope <?xml version=&quot;1.0&quot;?> < soap:Envelope xmlns:soap=&quot;http://www.w3.org/2001/12/soap-envelope&quot; soap:encodingStyle=&quot;http://www.w3.org/2001/12/soap-encoding&quot;> < soap:Heade r> <m:Trans xmlns:m=&quot;http://www.w3schools.com/transaction/&quot; soap:mustUnderstand=&quot;1&quot;>234</m:Trans> </ soap:Header > < soap:Body xmlns:m=&quot;http://www.example.org/stock&quot;> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </ soap:Body > </ soap:Envelope >
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. WCF Architecture: Messaging Runtime Client Dispatcher Service Contract and Behaviors Binding Address Transport Encoder Protocol(s) Transport Encoder Protocol(s)
  • 42. WCF Architecture WS Security Channel Messaging HTTP Channel TCP Channel MSMQ Channel Named Pipe Channel Transaction Flow Channel WS Reliable Messaging Channel Encoders (Binary/MTOM/Text/XML) Activation and Hosting Service Runtime Contracts Data Contract Message Contract Service Contract Policy and Binding Application Windows Activation Service .EXE Windows Service COM+ Throttling Behavior Error Behavior Metadata Behavior Instance Behavior Message Behavior Transaction Behavior Dispatch Behavior Concurrency Behavior Parameter Filtering
  • 43. WCF Features Summary Address Binding Behavior Contract HTTP Transport TCP Transport NamedPipe Transport MSMQ Transport Custom Transport WS-Security Protocol WS-RM Protocol WS-Coord Protocol Duplex Channel Custom Protocol http://... net.tcp://... net.pipe://... net.msmq://... xxx://... Throttling Behavior Metadata Behavior Error Behavior Custom Behavior Instancing Behavior Concurrency Behavior Transaction Behavior Security Behavior Request/ Response One-Way Duplex net.p2p://... Peer Transport
  • 44. WCF Architecture Binding Address Contract
  • 45.
  • 46.