To talk abt wcf we need to know the concepts like
1)endpoints 2) address 3) bindings
how can we make use of exceptionhanllings,sessions and security workflows
for transfering data from one system to another system:
==========================================================
for eg 2 systems are in the same network(eg:office) in this case we will use remoting
ll erly when the systems are not in the same network(then we will go for webservices)
cobination of both i.e remoting + webservices = wcf(windows communication foundation)
wcf is used to develoup service oriented applications
service is a collectoins of operations which are visible to the client to access.
======
all communications occur through messages only.
many ways to develop service oriented applications are:
webservices(soap)(http)--------------->externally
Enterprice services , remoting(not soap)(tcp)--------->internally
wcf is a part of .net 3.0 and 3.5 framework
it has one runtime all the classes related to wcf are in system.serviceModel
Building blocks of wcf:
sevice
service and datacontract
endpoint
binding
servicecontract is nothing but what are the operations(methods) available and how client use them and also it tells us format the of the message.
================
service contract is nothing but a interface so interfasce is a collecion of methods so we can write the methods in interfase using operation contract.
wcf runtime uses datasericalizer
cliets and serivce exchage the data in the form of xml
when you are exchange the data of type complextype(dataset) wcf runtime converts your date into serializable and deserializable
serializable ---------> it takes data and converts to xml
deseriazable---------=> xml to data
to work with arrays enumrations and classes you need datacontract(it need seriazable) to do serializable you need datacontract
now assume our service is ready and we hosted it. now how client able to use theat service?
so endpoint comes in to the picture.
atleast one endpoint exist b/w client and service
using endpoing client and service coommunicate with each other.
endpoint constists of
address--------------> it specifies where is the service?
binding--------------->it specifies how do you reach it?
contract-------------->it specifies after what can you do with it?
wcf provides so many bindings
net tcp binding
wshttpbinding
httpbinding
No comments:
Post a Comment