Chapter 4. Clients
WHAT'S IN THIS CHAPTER?
Implementing WCF clients
Implementing and using RESTful services
AJAX-enabling your service
Using WCF from Silverlight
Some of the other chapters have focused primarily on implementation on the server side. The main tasks involved in developing WCF services include the design of service and data contracts, the selection of a suitable InstanceContextMode and ConcurrencyMode, and last but not least, the use of a suitable binding.
In this chapter, a closer look at the client side is taken. You have probably already come across some examples where .NET has been used on the client side and communication takes place between the client application and service using a generated proxy. The proxy can be created with Add Service Reference or svcutil.exe (SLsvcutil.exe for Silverlight applications) and a reference to a WSDL file or an MEX endpoint. However, if you have absolute control of the server and client code, you can also dispense with the generated proxy and communicate directly with the service using a reference to the service assembly and make use of the ChannelFactory
class.
In a service-oriented world in which components are operated on a very diverse range of platforms and with very different technologies, your services may be consumed by other technologies — such as ASP.NET AJAX, Java, PHP, and Silverlight.
Depending on the expected clients, it may also make sense, under certain circumstances, not to use the entire set of features offered by ...
Get Professional WCF 4: Windows Communication Foundation with .NET 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.