XML Web services offer a simpler model for distributed applications than that provided by .NET Remoting. XML Web services are fine-tuned for Internet scenarios and cross-platform use. Although you can apply .NET Remoting in these scenarios, thanks to its SOAP formatter and HTTP channel, .NET Remoting is more suitable as a high-speed solution for binary communication between proprietary .NET components, usually over an internal network. And although XML Web services can't match the communication speed of .NET Remoting over a binary channel, they still lend themselves to high-performance designs thanks to their stateless nature and ASP.NET's multithreaded hosting service. Here's a quick overview of the major differences between the XML Web service and .NET Remoting technologies:
Note The underlying technology that supports XML Web services overlaps with portions of the .NET Remoting framework. Part of the reason for this is that these technologies were developed simultaneously, before the .NET team realized the full potential of XML Web services. Chapter 11 examines the similarities a little more closely. For now, it helps to remember a broad distinction: If you are planning to provide functionality to clients over the Internet, XML Web services should be your first choice. If you need different capabilities or faster communication over a closed network, however, .NET Remoting is often a better option. According to Microsoft architects, .NET Remoting isn't designed to work in interop situations (for example, with Java clients) or when crossing trust boundaries (for example, exposing functionality to third-party clients or another business). These two basic rules of thumb can help you decide when to use .NET Remoting and when to use XML Web services. Incidentally, speculation abounds that XML Web services and .NET Remoting technology will be integrated in some future release of the .NET Framework, although this development isn't on the imminent horizon and it won't help you plan today's generation of distributed applications. |