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.com66 CHAPTER 3 ■ EXPLORING THE WCF PROGRAMMING MODELramrameshreddy.blog.comLooking at the WCF Layers “Inside”WCF is a layered framework similar to the Open Systems Interactive (OSI) model. The servicemodel layer is the layer you will use primarily to program against. The service model layerinfluences the layer underneath it, which is called the messaging layer. The messaging layer isthe layer where all the actual transportation of messages across the channels on the networkbecomes reality. The reason for the separation is an architectural concept. It allows you to separatethe actual messaging from the programming model, and this allows you to benefit justfrom the messaging layer (similar to what BizTalk Server does).Figure 3-5 shows how the layering is organized. The messaging layer is the lower-levellayer where you talk about transports, channels, protocols, and encoding. The service modellayer is where you talk about behavior, contracts, and policy. Behaviors are the most importantpiece in the service model layer, whereas in the messaging layer channels are central.Figure 3-5. WCF layersWhat Is the Messaging Layer?The messaging layer is the layer where the actual communication on the wire is happening.This is the layer where the transports such as HTTP, MSMQ, TCP, and Named Pipes come intoplay. In addition to that, the encoding used for the messages and the format of the messagescome into play. In other words, these are the protocols used inside the messages. Then, theprotocols are implemented as channels; a channel allows you to clearly separate the combinationof the transport and the messaging exchange pattern.ChannelsYour ApplicationServiceModelContracts Policy BehaviorMessagingChannels Encoders Transports ProtocolsramrameshreddyramrameshreddyThe address and binding together manifest themselves in the messaging layer of WCF. Theaddress expresses where the message should go, and the binding is the model you use tomanipulate the message. Going a bit lower into the stack of WCF, Figure 3-6 shows a layereddescription of the WCF messaging stack.

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

Saved successfully!

Ooh no, something went wrong!