SlideShare una empresa de Scribd logo
1 de 33
ARIANA
 Introduction to WCF
 What is it? Why use it?
 Architecture
 Fundamentals and the ABCs of WCF
 Hosting
 Tooling Support
 Handling faults
 Stands for Windows Communication Foundation
 One of the 4 pillars of .NET 3.0
 Microsoft’s unified programming model (the service
model) for building Service-Oriented Applications
 Service
Small program interacted by well defines message
exchanges
Agile, Reliable, Stable, Interoperable, Secure
 Four Tenets
Boundaries are Explicit
Services are Autonomous
Services share schema and contract, not class
Service compatibility is based upon policy
 WCF provides:
an SDK for creating SOA
a runtime for running Services on Windows
 Services send and receive messages
 All messages are SOAP messages
 WCF takes care of all the plumbing
 Interoperable and Standards based
 Supports WS-* protocols
 Unified Programming Model
 Unifies previous models like .NET Remoting, ASMX
web services, COM+ etc
 Productive Programming Model
 Declarative
 Imperative
 Configuration based
 Simplicity
 Flexibility
 Maintainability
 Power
Every service has
 Address
Where the service is
 Binding
How to talk to the service
 Contract
What the service can do
 Combination of transport, server name, port &
path
 Transport is determined by the binding
 Examples
http://localhost:8001
net.tcp://localhost:8002/MyService
net.pipe://localhost/MyPipe
net.msmq://localhost/private/MyService
net.msmq://localhost/MyService
 Transport
 HTTP
 TCP
 MSMQ
 Message formats and encoding
 Plain text
 Binary
 Message Transmission Optimization Mechanism (MTOM)
 Communication security
 No security
 Transport security
 Message security
 Authenticating and authorizing callers
 BasicHttpBinding
 WSHttpBinding
 WS2007HttpBinding
 WSDualHttpBinding
 WSFederationHttp
Binding
 WS2007FederationHttpBind
ing
 NetTcpBinding
 NetNamedPipeBinding
 NetMsmqBinding
 NetPeerTcpBinding
 WebHttpBinding
 MsmqIntegrationBinding
 Service contracts
Defines operations, communications and
behaviours.
 Data contracts
Defines data entities and parameter types.
 Fault contracts
Defines error types
 Message contracts
Defines message formats
 [ServiceContract] – Defines a ‘set’ of operations
 [OperationContract] – Defines a single method
[ServiceContract]
public interface IService
{
[OperationContract]
string GetData(int value);
}
public class ConcreteService : IService
{
public string GetData(int value)
{ ... }
public string OtherMethod()
{ ... }
}
[ServiceContract]
public interface IService
{
[OperationContract]
string GetData(int value);
}
public class ConcreteService : IService
{
public string GetData(int value)
{ ... }
public string OtherMethod()
{ ... }
}
 [DataContract] – Specifies type as a data contract
 [DataMember] – Members that are part of contract
[DataContract]
public class CustomType
{
[DataMember]
public bool MyFlag { get; set; }
[DataMember]
public string MyString { get; set; }
}
[DataContract]
public class CustomType
{
[DataMember]
public bool MyFlag { get; set; }
[DataMember]
public string MyString { get; set; }
}
 DataContract: created specifically for WCF to serialize
types
 Attribute contains Name and Namespace properties
 DataMember is needed to specify which
properties/fields will form part of the contract
 Contains EmitDefaultValue, IsRequired, Name, Order
properties
 Service can also expose endpoint for Metadata
Exchange (MEX)
 It provides a mechanism for clients to find out about:
 Address of other end points
 Bindings that are used
 Contracts used – Service, Operation, Data, etc
 IIS
 HTTP only
 WAS (Windows Activation Service)
 Can use any transport
 Vista and Windows Server 2008 only
 Self hosting
 Can use any transport
 Can be hosted within Console, WinForms, etc
Applications
 Visual Studio
 Separate projects for WCF
 “Add Service reference” menu
 WCF Configuration Editor
 WCF Service Host
 WCF Test Tool
 SvcUtil – To generate proxies
 SvcTraceViewer – To view logs
 Three main kinds of Exceptions can occur:
 Communication errors
 Unexpected error on the service
 Errors thrown by the service on purpose
 .NET Exceptions are technology specific
 All Exceptions come across the wire as SOAP Faults
 In WCF, SOAP faults are passed in as
FaultException objects
 Rather than throwing Exceptions, services should
throw FaultExceptions
 Or better still FaultException<T>
 Throwing FaultExceptions will not fault the proxy and
the channel
 Specifies what kind of Exceptions, an operation can
throw
[ServiceContract]
public interface IEmployeeService
{
[OperationContract]
[FaultContract(typeof(ValidationException))]
public void AddEmployee(Employee e);
}
[ServiceContract]
public interface IEmployeeService
{
[OperationContract]
[FaultContract(typeof(ValidationException))]
public void AddEmployee(Employee e);
}
 Its made of a lot of different components, so you can create
new components for security, transport, authentication.
 In WCF, there is no need to make much change in code for
implementing the security model and changing the binding.
Small changes in the configuration will make your
requirements.
 Its faster than ASMX
 Its Interoperability, for java, and more.
 WCF is interoperable with other services when compared
to .Net Remoting, where the client and service have to be
.Net
 WCF services provide better reliability and security in
compared to ASMX web services.
 WCF is Microsoft's implementation of SOA and hence its
APIs are solely controlled by MS which makes
interoperability a bit difficult.
 To deploy WCF apps, need more underlying hardware
resources on the platform on which the WCF applications
will be running, since there is an additional layer of
abstraction to deal with.
 WCF provides a runtime for creating Service Oriented Apps
 Provides a productive programming model. Takes care of:
 Messaging and Exchange formats
 All Plumbing: Transaction, Reliability, Security, etc
 Supports Declarative (via attributes), Imperative (via code)
and Configuration based (via config files) programming model
 ABCs of Endpoints
 Address: Where to go?
 Binding: How to get there?
 Contract: What to do?
 Hosting
 IIS, WAS, Self-hosting

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (20)

WCF for begineers
WCF  for begineersWCF  for begineers
WCF for begineers
 
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF10 Tricks and Tips for WCF
10 Tricks and Tips for WCF
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overview
 
MCT Summit Middle East 2021 - Exchange Hybrid - What, Why, and How
MCT Summit Middle East 2021 - Exchange Hybrid - What, Why, and HowMCT Summit Middle East 2021 - Exchange Hybrid - What, Why, and How
MCT Summit Middle East 2021 - Exchange Hybrid - What, Why, and How
 
WSO2: Bringing Cloud Computing and SOA Together
WSO2: Bringing Cloud Computing and SOA TogetherWSO2: Bringing Cloud Computing and SOA Together
WSO2: Bringing Cloud Computing and SOA Together
 
Microsoft Exchange Server 2007 Deployment
Microsoft Exchange Server 2007 DeploymentMicrosoft Exchange Server 2007 Deployment
Microsoft Exchange Server 2007 Deployment
 
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)
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
 
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
 
SOAP Services
SOAP ServicesSOAP Services
SOAP Services
 
Soaml service Identification
Soaml  service IdentificationSoaml  service Identification
Soaml service Identification
 
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...
 
Biz talk summit 2013 - The new cloud related adapters
Biz talk summit 2013 - The new cloud related adaptersBiz talk summit 2013 - The new cloud related adapters
Biz talk summit 2013 - The new cloud related adapters
 
BizTalk on App Services
BizTalk on App ServicesBizTalk on App Services
BizTalk on App Services
 
RESTful WCF Services
RESTful WCF ServicesRESTful WCF Services
RESTful WCF Services
 
Web services
Web servicesWeb services
Web services
 
Lixsql port enterprise integration
Lixsql port   enterprise integrationLixsql port   enterprise integration
Lixsql port enterprise integration
 
Real world integration using mule
Real world integration using muleReal world integration using mule
Real world integration using mule
 
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
 
ad.ppt
ad.pptad.ppt
ad.ppt
 

Similar a Wcf

Session 1: The SOAP Story
Session 1: The SOAP StorySession 1: The SOAP Story
Session 1: The SOAP Story
ukdpe
 
Web services
Web servicesWeb services
Web services
aspnet123
 
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
 
Lunch Learn - WCF Security
Lunch Learn - WCF SecurityLunch Learn - WCF Security
Lunch Learn - WCF Security
Paul Senatillaka
 
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
 
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
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & REST
Santhu Rao
 
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
 

Similar a Wcf (20)

WINDOWS COMMUNICATION FOUNDATION
WINDOWS COMMUNICATION FOUNDATIONWINDOWS COMMUNICATION FOUNDATION
WINDOWS COMMUNICATION FOUNDATION
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
 
WCF Fundamentals
WCF Fundamentals WCF Fundamentals
WCF Fundamentals
 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)
 
Session 1: The SOAP Story
Session 1: The SOAP StorySession 1: The SOAP Story
Session 1: The SOAP Story
 
Web services
Web servicesWeb services
Web services
 
Application integration framework & Adaptor ppt
Application integration framework & Adaptor pptApplication integration framework & Adaptor ppt
Application integration framework & Adaptor ppt
 
Understanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company indiaUnderstanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company india
 
Unit 3-SOA Technologies
Unit 3-SOA TechnologiesUnit 3-SOA Technologies
Unit 3-SOA Technologies
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
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
 
Lunch Learn - WCF Security
Lunch Learn - WCF SecurityLunch Learn - WCF Security
Lunch Learn - WCF Security
 
Top wcf interview questions
Top wcf interview questionsTop wcf interview questions
Top wcf interview questions
 
Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35
 
WCF
WCFWCF
WCF
 
1. WCF Services - Exam 70-487
1. WCF Services - Exam 70-4871. WCF Services - Exam 70-487
1. WCF Services - Exam 70-487
 
WFC #1
WFC #1WFC #1
WFC #1
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & REST
 
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
 
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...
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Wcf

  • 2.  Introduction to WCF  What is it? Why use it?  Architecture  Fundamentals and the ABCs of WCF  Hosting  Tooling Support  Handling faults
  • 3.
  • 4.  Stands for Windows Communication Foundation  One of the 4 pillars of .NET 3.0  Microsoft’s unified programming model (the service model) for building Service-Oriented Applications
  • 5.
  • 6.
  • 7.  Service Small program interacted by well defines message exchanges Agile, Reliable, Stable, Interoperable, Secure  Four Tenets Boundaries are Explicit Services are Autonomous Services share schema and contract, not class Service compatibility is based upon policy
  • 8.
  • 9.
  • 10.  WCF provides: an SDK for creating SOA a runtime for running Services on Windows  Services send and receive messages  All messages are SOAP messages  WCF takes care of all the plumbing
  • 11.  Interoperable and Standards based  Supports WS-* protocols  Unified Programming Model  Unifies previous models like .NET Remoting, ASMX web services, COM+ etc  Productive Programming Model  Declarative  Imperative  Configuration based
  • 12.  Simplicity  Flexibility  Maintainability  Power
  • 13.
  • 14.
  • 15. Every service has  Address Where the service is  Binding How to talk to the service  Contract What the service can do
  • 16.  Combination of transport, server name, port & path  Transport is determined by the binding  Examples http://localhost:8001 net.tcp://localhost:8002/MyService net.pipe://localhost/MyPipe net.msmq://localhost/private/MyService net.msmq://localhost/MyService
  • 17.  Transport  HTTP  TCP  MSMQ  Message formats and encoding  Plain text  Binary  Message Transmission Optimization Mechanism (MTOM)  Communication security  No security  Transport security  Message security  Authenticating and authorizing callers
  • 18.  BasicHttpBinding  WSHttpBinding  WS2007HttpBinding  WSDualHttpBinding  WSFederationHttp Binding  WS2007FederationHttpBind ing  NetTcpBinding  NetNamedPipeBinding  NetMsmqBinding  NetPeerTcpBinding  WebHttpBinding  MsmqIntegrationBinding
  • 19.  Service contracts Defines operations, communications and behaviours.  Data contracts Defines data entities and parameter types.  Fault contracts Defines error types  Message contracts Defines message formats
  • 20.  [ServiceContract] – Defines a ‘set’ of operations  [OperationContract] – Defines a single method [ServiceContract] public interface IService { [OperationContract] string GetData(int value); } public class ConcreteService : IService { public string GetData(int value) { ... } public string OtherMethod() { ... } } [ServiceContract] public interface IService { [OperationContract] string GetData(int value); } public class ConcreteService : IService { public string GetData(int value) { ... } public string OtherMethod() { ... } }
  • 21.  [DataContract] – Specifies type as a data contract  [DataMember] – Members that are part of contract [DataContract] public class CustomType { [DataMember] public bool MyFlag { get; set; } [DataMember] public string MyString { get; set; } } [DataContract] public class CustomType { [DataMember] public bool MyFlag { get; set; } [DataMember] public string MyString { get; set; } }
  • 22.  DataContract: created specifically for WCF to serialize types  Attribute contains Name and Namespace properties  DataMember is needed to specify which properties/fields will form part of the contract  Contains EmitDefaultValue, IsRequired, Name, Order properties
  • 23.  Service can also expose endpoint for Metadata Exchange (MEX)  It provides a mechanism for clients to find out about:  Address of other end points  Bindings that are used  Contracts used – Service, Operation, Data, etc
  • 24.  IIS  HTTP only  WAS (Windows Activation Service)  Can use any transport  Vista and Windows Server 2008 only  Self hosting  Can use any transport  Can be hosted within Console, WinForms, etc Applications
  • 25.
  • 26.  Visual Studio  Separate projects for WCF  “Add Service reference” menu  WCF Configuration Editor  WCF Service Host  WCF Test Tool  SvcUtil – To generate proxies  SvcTraceViewer – To view logs
  • 27.
  • 28.  Three main kinds of Exceptions can occur:  Communication errors  Unexpected error on the service  Errors thrown by the service on purpose  .NET Exceptions are technology specific  All Exceptions come across the wire as SOAP Faults
  • 29.  In WCF, SOAP faults are passed in as FaultException objects  Rather than throwing Exceptions, services should throw FaultExceptions  Or better still FaultException<T>  Throwing FaultExceptions will not fault the proxy and the channel
  • 30.  Specifies what kind of Exceptions, an operation can throw [ServiceContract] public interface IEmployeeService { [OperationContract] [FaultContract(typeof(ValidationException))] public void AddEmployee(Employee e); } [ServiceContract] public interface IEmployeeService { [OperationContract] [FaultContract(typeof(ValidationException))] public void AddEmployee(Employee e); }
  • 31.  Its made of a lot of different components, so you can create new components for security, transport, authentication.  In WCF, there is no need to make much change in code for implementing the security model and changing the binding. Small changes in the configuration will make your requirements.  Its faster than ASMX  Its Interoperability, for java, and more.  WCF is interoperable with other services when compared to .Net Remoting, where the client and service have to be .Net  WCF services provide better reliability and security in compared to ASMX web services.
  • 32.  WCF is Microsoft's implementation of SOA and hence its APIs are solely controlled by MS which makes interoperability a bit difficult.  To deploy WCF apps, need more underlying hardware resources on the platform on which the WCF applications will be running, since there is an additional layer of abstraction to deal with.
  • 33.  WCF provides a runtime for creating Service Oriented Apps  Provides a productive programming model. Takes care of:  Messaging and Exchange formats  All Plumbing: Transaction, Reliability, Security, etc  Supports Declarative (via attributes), Imperative (via code) and Configuration based (via config files) programming model  ABCs of Endpoints  Address: Where to go?  Binding: How to get there?  Contract: What to do?  Hosting  IIS, WAS, Self-hosting

Notas del editor

  1. WCF combines many previous Microsoft messaging technologies together into a standard coding framework. A service is written as a logical piece of work and is then exposed using whichever method is most appropriate. This keeps the service logic and the technical transportation pieces of the service separate and reduces the complexity.
  2. There are numerous ways that a message can be formatted/sent/secured, this allows you to tailor your service for the compatibility/performance you require for your solution. Because there is such a large number of choices that can be made these have been packaged into ‘standard binding’ sets for easy use. A service can support multiple sets of bindings, however each must be on a separate address. The Client must use exactly the same binding as service otherwise they will not be able to communicate properly.
  3. We will talk about just the first three in this presentation. Message Contracts help in specifying the actual SOAP message and isn’t used as much as the other 3
  4. To expose a class and methods as a service you need to decorate them with metadata, this allows .NET to map this the CLR to WCF. A single Class can implement multiple ServiceContracts it just needs to implement multiple Interfaces. The methods exposed with [ OperationContract] can only use primitive or data contracts as parameters.
  5. To expose a class and methods as a service you need to decorate them with metadata, this allows .NET to map this the CLR to WCF. A single Class can implement multiple ServiceContracts it just needs to implement multiple Interfaces. The methods exposed with [ OperationContract] can only use primitive or data contracts as parameters.
  6. Self hosting can be done in any .NET application: WPF, Winforms, WF, console, windows service, etc. An advantage of hosting on IIS or WAS over self hosting is that the process needs to be running constantly with a self hosted solution, whereas one hosted on IIS or WAS isn’t launched until there is a client request.