11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

amrameshreddy.blog.com54 CHAPTER 3 ■ EXPLORING THE WCF PROGRAMMING MODELramrameshreddy.blog.comWe’ll address clients, services, endpoints, contracts, and behaviors on the service model side.Together, the address, binding, and contract are commonly referred to as an endpoint.BehaviorBehaviorClientContract BindingFactoryChannel AddressFigure 3-1. The WCF programming modelOn the client side, you can see only one endpoint consisting of an address, binding, andcontract. Think of the client as a piece inside your program that is able to communicate with aservice, not your entire application. Commonly this is referred to as a proxy for that service. Ofcourse, it is possible to have your client connect to multiple services by using multiple proxieswith different endpoints (that is, connected to different services). The client side can have aspecific behavior to do local configuration, such as concurrency, instancing, throttling, errorhandling, transaction control, security, and so on.The service side can have multiple endpoints. A service just sits around and waits formessages to come in on its endpoints. And again on the service side, you see the same behaviorsyou can see on the client side that cover local configuration behaviors on the service or atthe operation level.You will learn more about behaviors, factories, listeners, and channels later in this chapter.We’ll cover the ABCs of WCF in much greater detail now.What Are Addresses?Service ModelMessaging LayerMessageEndpointAddress Binding ContractBinding ContractServiceBehaviorBehaviorramrameshreddyramrameshreddyAddressing a service is essential to being able to use a service. You need to have the address ofa service to be able to send it a message. Addresses in WCF are URLs that define the protocolused, the machine where the service is running, and the path to the service. The port numberis an optional field in the URL and depends on the protocol used. Table 3-1 lists the addressingspecifications.ListenerAddress Channel

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!