Introducing Web Services

Web services are loosely coupled, which means they are entirely independent of the operating system or programming language used on either the server side or the client side. Unlike previous technologies for distributed computing (such as Java’s RMI or .NET Remoting), web services do not require that both ends of the connection be programmed in the same language. For example, the server code might be written in Visual Basic on Windows Vista while the client is written in C++ running on a Unix machine.

However, if you are implementing both the client and the server, web services may not be the best solution. You will get better performance by using .NET Remoting, a tightly coupled, proprietary format that sends binary data over the wire.

Tip

For more information on .NET Remoting, see Advanced .NET Remoting, Second Edition, by Ingo Rammer and Mario Szpuszta (Apress).

As mentioned in Chapter 1, Microsoft introduced the Windows Communication Foundation (WCF) as part of .NET 3.0. This completely redefines how services are created and lets you write code for a service which you can deploy as either a web service or a .NET Remoting service by changing its associated *.config file rather than its code.

Tip

For more information on WCF, see Learning WCF by Michele Leroux Bustamente (O’Reilly), and Programming WCF Services by Juval Löwy (O’Reilly).

In this chapter, we’ll look at implementing web services, the preferred choice when you need to make the service available to ...

Get Programming ASP.NET 3.5, 4th Edition 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.