7 of 8 people found the following review helpful
Gilbert M. Vanegas
- Published on Amazon.com
Book review - "Windows Communication Foundation 4 - Step by Step", by John Sharp
Hi, This book is about WCF (Windows Communication Foundation) which is Microsoft's API for building SOA (service oriented application) infrastructures. SOA is very important because todays devices (especially tablets, smartphones, IPADS). all need to make HTTP calls to some URL addressable endpoint, whether it be SOAP based, REST based or just simple HTTP xml services. HTTP over TCP/IP is the universal transport mechanism for all these web-enabled devices. Lest we forget, SOA's also can serve as the building blocks for calls to get data for websites, Silverlight or FLASH based apps as well.
I am very interested in SOA architectures and believe that they are very important to any organization's IT department as a mechanism to eventually have "building blocks" of services which make the application of business logic or some type of workflow process easier to consistently apply this logic across the organization.
It also allows organizations to more rapidly build applications because once you have an SOA architecture in place, these services can be called from any client-side environment such as a web page, mobile device, tablet or whatever else may come down the pike.
Another key advantage is the fact that SOA's usually use standardized data exchange formats such as XML or JSON so that different devices from different manufacturers (android/IOS/Blackberry/Windows Phone) all can understand the data while abstracting away concepts such as operating system type or CPU architecture etc.. In other words, SOA's when correctly built are platform agnostic.
The first several chapters of the book cover pretty much what you would expect from any WCF book, things like what WCF is, what is SOA, how and where can WCF be hosted (for example WCF is designed to be very flexible, the services built within WCF can be hosted in IIS, run as a windows service and can also use different protocols (HTTP, TCP/IP, PEER to PEER) and also can be secured in a variety of ways (WINDOWS security, FORMS authentication, SSL certificates, custom authentication hooks)).
Fairly complex topics such as service endpoints, hosting services, bindings, fault propagation are covered in an easy to understand manner in the first couple of chapters.
Chapters 4 and 5 deal with a critical topic which is how to protect your services (authentication and authorization). These chapters do a pretty good job of describing the challenges for services that may be hosted on an internal corporate network as opposed to services which will be URL accessible across the internet. These topics are critical to the success of any SOA architecture because if you do not have a way of identifying and granting access to who may call your services, you can run the risk of exposing your data in a manner which you did not intend to. Remember, these SOA architectures are exposed as http endpoints across the world wide web! Make sure you understand security implications before you get too far. In my opinion implementing SSL for your service endpoints exposed in the WWW is a must for most organizations unless you have in mind very simple services such as returning the current temperature for a given zip code (in other words, things that you do not necessarily want secured, maybe something like the time a movie is showing at a particular theatre).
One topic dealing with authentication/authorization is called federated (claims based authentication/authorization). This was given very little coverage in the book, I can understand why though, because there are entire books written about the subject. I did find it disappointing that so little mention was made of federated (claims based authentication/authorization). For excellent coverage of this topic look for the book titled Programming Windows Identity Foundation by Vittorio Bertocci.
Chapter 6 deals with service contracts and data contracts which are a way of structuring your WCF programming. Service contracts describe the operations your service supports (it basically defines an implementation interface) and data contracts are important because that is how you get the "platform neutrality" that maximizes the usage of your WCF services. In prior programming projects using regular "web services"), I was guilty of sending back very .net specific data structures such as ado.net datasets. In today's world, it's much more critical that you use data contracts (and data members) which will cause WCF to generate very neutral generic return data structures that are recognizable by all platforms. This is because today we see the rise of android, IOS (ipad), Windows Phone, java devices, blackberry etc... The future will see the advent of many more connected devices, some we have not yet even dreamed of as of yet.
Chapter 7 deals with WCF state and how to preserve state, usually http based services are stateless, but there are ways of persisting session state between calls.
Chapter 8 brings into the picture, mind blowing power which comes from integrating WCF with Windows Workflow foundation services, which is a true workflow API built into the .net framework, this is how you can truly build stateful service calls built upon the concept of "workflows" by using the workflow engine. The windows workflow engine can persist a workflow inside of sql server and "rehydrate" that workflow right back where it left off, very powerful!
The rest of the book covers topics such as transactional processing with WCF services, reliable sessions and asynchronous calls. There is a nice chapter (Chapter 13) on how to support features such as service throttling, MTOM protocol (sending binary objects efficiently across HTTP) and streaming data (such as video streaming).
One of the more interesting topics is the SOAP protocol versus RESTFUL services debate raging in today's world. (read some of the links below)
Chapter 15 has a nice chapter on RESTFUL services based upon ODATA (AKA WCF data services). I read this chapter and got a lot of useful information about it, as mentioned many of these chapters are topics that actually have whole books written about them. WCF by default is SOAP based, but it also supports the concept of building REST services. I encourage you to read more about REST services, because I believe ultimately most SOA's are going to be built using this type of architecture. As a matter of fact, for those of you interested in SharePoint, SharePoint 2010 now has a REST based callable SOA based upon WCF data services. It has a few quirks, but once I understood it, I was amazed at how powerful and easy to use the SharePoint REST based API is.
Not covered at all is another WCF based technology called WCF RIA services, which is mostly used from what I have seen in Silverlight projects. I was a little disappointed that no mention was made of this technology, at least a paragraph or two should have been included.
There is also an exciting new WCF based api they are calling WCF web api which was too new for the author to include in this book, I am following this WCF web api because it looks very promising, I predict really powerful and useful things to come from this WCF web api.
All in all, I would consider this book an intermediate level book on WCF, the book gives a nice overview of WCF although it's missing a few topics I would have liked to at least have seen mentioned. I did like the REST chapter of the book a lot, because you would be surprised how many WCF books don't even deal with REST at all.
Certainly I would highly recommend this book as a gateway to other more detailed WCF books such as Juval Lowy's excellent Programming WCF services book, there are several very nice O'Reilly books that cover REST.
The author does a good job at covering WCF at a high level, but with some good levels of detail. The topic of WCF could easily cover thousands of pages, so the author should be commended at being able to produce a good, intermediate level WCF book with the amount of space he had to work with (700 pages).
I do like this book and give it 4.5 out of 5 stars and recommend it.
Thank you for reading my book review.