malaikuangren

What is the purpose or drive to build thing like (xxx),How can it achieve the original goal of design?
WCF Part 1 : Services ABC

I want to begin with a conceptual explanation about services. A service always has at least one endpoint, but can have multiple. A client normally communicates with only one endpoint. A plain-old-webservice only has one endpoint and communicates via HTTP and Text/XML. The picture below shows a service with three endpoints. Notice the ABC. 

 

 There are a few articles about the WCF ABC's (12)but the short story is that you always have to remember:

  1. A stands for Address
  2. B stands for Binding
  3. C stands for Contract

I'll try to explain them, they'll get more sense once we advanced in posts.

  1. Address
    Every website and webservice has an address, like http://bloggingabout.net/ or http://mydomain.com/stockquote.asmx. Our WCF services also must have an address. WCF can provided addresses for the following protocols:
    1. HTTP
    2. TCP
    3. NamedPipe
    4. Peer2Peer
    5. MSMQ
  2. Binding
    A binding specifies how a service is accessible. Think transport protocol (see the previous list that shows the basic list), encoding (text, binary, etc) and WS-* protocols like transactional support or reliable messaging.
  3. Contract
    The contract is something you completely specify by yourself. The contract is used to specify what your service can do. For example give you the correct streetname and city when providing a zipcode.

In the next articles I'll explain how you can build a service while using the ABC. 

posted on 2012-06-16 19:56  malaikuangren  阅读(322)  评论(0编辑  收藏  举报