Chapter 5. Operations


The classic object- or component-oriented programming models offered only a single way for clients to call a method: the client would issue a call, block while the call was in progress, and continue executing once the method returned. Any other calling model had to be handcrafted, often incurring productivity and quality penalties. While WCF supports this classic invocation model, it also provides built-in support for additional operation types: one-way calls for fire-and-forget operations, duplex callbacks for allowing the service to call back to the client, and streaming to allow the client or the service to handle large payloads. In general, the type of operation used is part of the service contract and is an intrinsic part of the service design. The operation type even has some constraints on the allowed bindings. Consequently, clients and services should be designed from the ground up with the operation type in mind, and you will not be able to easily switch between the various operation types. This chapter is dedicated to the various ways of invoking WCF operations and the related design guidelines. Two other ways of invoking operationsasynchronously or queuedare addressed in subsequent chapters.[*]

[*] This chapter contains excerpts from my article "WCF Essentials: What You Need to Know About One-Way Calls, Callbacks, and Events," MSDN Magazine, October 2006.




Programming WCF Services
Programming WCF Services
ISBN: 0596526997
EAN: 2147483647
Year: 2004
Pages: 148
Authors: Juval Lowy

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net