O'Reilly logo

Professional WCF 4: Windows Communication Foundation with .NET 4 by Johann Grabner, Fabio Cozzolino, Kurt Claeys, Pablo Cibraro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Bindings

WHAT'S IN THIS CHAPTER?

  • Understanding bindings

  • Defining addresses

  • Applying behaviors

  • Creating your own bindings

Windows Communication Foundation (WCF) provides a programming framework that abstracts out the complexities of creating services. It does this for nearly every element of the service and bindings is probably one of the most important areas. This allows you as the programmer to concentrate on the problem at hand, and not worry about how to create architecture that allows your system to work. The foundation is there already.

To define a service endpoint (as described in previous chapters), you must implement the ABCs of WCF. This stands for Address, Binding, and Contract — or the Where, How, and What of a service.

  • The Address is where the service is hosted, either for the service as a reference, or so the client knows where to send the message.

  • The Binding is the how of the services, and defines how the messages are sent and received.

  • The Contract is the definition of what the message contains. There are many types of contracts described in depth in Chapter 2.

The ABCs make up an endpoint in WCF. They need to be set for both the client and the service.

Bindings incorporate three main areas:

  • Transport protocol — The protocol to use. Examples are Http and TCP.

  • Encoding format — The details of how to encode the message as it goes down the wire, such as plain text, binary, and so on.

  • Other messaging protocol details — Used for the communication channel. This could be reliable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required