Friday, May 11, 2007

Book Review: Programming WCF Services by Juval Löwy

by T. Michael Testi (Blogcritics.org , PhotographyToday, ATAEE)

Windows Communication Foundation (WCF) is a software development kit for developing and deploying services on Window. WCF, previously codenamed "Indigo," is a communication system to enable applications, in one machine or many machines connected by a network to communicate. It has been introduced as part of Microsoft's .NET Framework 3.0.

WCF is really a lot of things to a lot of people. To the Web Service developer, it is the ultimate interoperability solution. To the distributed application developer, it is the easiest way to make remote or queued calls. To the systems developer, it is the next generation of productivity-oriented features such as transactions and hosting that provide off the shelf plumbing for applications. To the Application developer, it is a declarative programming model for structuring the application. To the architect, it is how one can finally build service-oriented applications (SOA).

A WCF Service is composed of three parts: a Service class that implements the service to be provided, a host environment to host the service, and one or more endpoints to which clients will connect. All communications with the WCF service will happen via the endpoints. The endpoints specify a contract that defines which methods of the service class will be accessible via the endpoint; each endpoint may expose a different set of methods.

Programming WCF Services will teach you how to design and develop SOA-WCF-based applications. You will learn how to take advantage of built-in features such as service hosting, instance management, disconnected queue calls and security. Programming WCF Services breaks down into ten chapters and three appendixes. You will need to be an experienced developer who has a fair understanding of .NET and C# 2.0. You will need .NET 2.0 and Visual Studio 2005 as well as the .NET 3.0 SDK and .NET 3.0 extensions for VS 2005.

Chapter one, WCF Essentials, begins by explaining what WCF is, its concepts and building blocks. It then concludes with I discussion of the WCF architecture which is really the whole key to everything that is enabled through the remaining book. If you are unfamiliar with SOA, then you should read appendix A, An Introduction to Service-Orientation.

Chapter two, Service Contracts, is geared for describing how to design and work with service contracts. You will learn how to design and factor contracts that cater to reuse. Chapter three, Data Contracts, is dedicated to how the client and service can exchange data without ever actually sharing the data type itself or using the same development technology.
Chapter four, Instance Management, deals with answering which service instance handles which client's request. It provides the rationale for each of the instance management modes. Chapter five, Operations, works with the types of operations that clients can invoke on a service and the related design guidelines you will need to handle.

Chapter six, Faults, explains how services report errors and exceptions back to their clients. It also discusses the best practices of error handling and how you can extend and improve the basic error handling mechanism. Chapter seven, Transactions, covers the motivation for transactions in general as well as the many transactional services.

Chapter eight, Concurrency Management, describes the declarative way WCF offers for managing concurrency and synchronization for both client and service. Chapter nine, Queued Services, shows how your clients can queue up calls to services, thus enabling asynchronous disconnected work. Chapter ten, Security, demystifies SOA security by breaking down this multifaceted task into its basic elements.

Appendix A, Introduction to Service-Orientation, will give you the background needed to understand the overall concept of this book and to expand to a more detailed description of SOA and how to implement it. Appendix two, Publish-Subscribe Service, presents the authors framework for implementing a publish-subscribe event management solution. Appendix C, WCF Coding Standard, is a consolidated list of all the best practices along with the do's and don'ts to help you get off on the right foot.

A couple of points about Programming WCF Services, first, this isn't a beginners book; the author dives down into advanced material in spots almost without notice. If you are uncomfortable with this you may want to start with a more basic attempt first, whether from the web or from another book. That being said, if you want to become proficient using WCF, you will be buying this book eventually. You will find that this book will become both a reference as well as well as a guide.

The book is well thought out and presented. Löwy places the focus on the how and why of programming WCF without the hype of the technology. He gives you information that is not readily available anywhere else, and has given well engineered examples that will provide you the correct methods of working with WCF.

If there was one thing missing to this book is a contextual reference for existing users of previous distributed technologies. That is background on how this relates back to Web Services, Remoting, COM etc. All pretty minor overall.

If you are serious about getting on the next wave of distributed SOA and Interoperability, then Programming WCF Services will take you to the next level. The book is filled with examples and will guide you along until you are creating professional WCF services. If you want to go to the next level of WCF then Programming WCF Services is a great place to get started.

No comments: