Windows Communication Foundation - It takes many existing communication technologies, such as Web Services, Windows Remoting, Microsoft Message Queuing, and abstracts them into a single technology. In most cases, this simplifies the way you communicate with other applications. It also allows you to communicate with other applications without being coupled to a specific technology. Therefore, you could use Web Services over SOAP to begin with, and later move to remote procedure calls (RPC) without changing your code, just the configuration of WCF.
WCF defines four types of contracts :
1. Service contracts : Describe which operations the client can perform on the service.
2. Data contracts : Define which data types are passed to and from the service. WCF defines
implicit contracts for built-in types such as int and string, but we can easily define explicit opt-
in data contracts for custom types.
implicit contracts for built-in types such as int and string, but we can easily define explicit opt-
in data contracts for custom types.
3. Fault contracts : Define which errors are raised by the service, and how the service handles and
propagates errors to its clients.
4. Message contracts : Allow the service to interact directly with messages.
Message contracts can be typed or untyped, and are useful in interoperability cases and when
there is an existing message format we have to comply with.
5. Operation Contract : An operation contract is defined within a service contract. It defines the
parameters and return type of an operation. An operation contract can also defines operation-level
settings, like as the transaction flow of the operation, the directions of the operation (one-way,
two-way, or both ways), and fault contract of the operation.
Message contracts can be typed or untyped, and are useful in interoperability cases and when
there is an existing message format we have to comply with.
5. Operation Contract : An operation contract is defined within a service contract. It defines the
parameters and return type of an operation. An operation contract can also defines operation-level
settings, like as the transaction flow of the operation, the directions of the operation (one-way,
two-way, or both ways), and fault contract of the operation.
No comments:
Post a Comment