ASP.NET Web Services or .NET Remoting: How to choose

xiaoxiao2021-03-06  71

Http://www.microsoft.com/china/msdn/archives/library/dnbda/html/bdadotNetarch16.asp

September 2002

Suitable for: Microsoft® ASP.NET Web Services Microsoft® .NET Framework Microsoft® .NET Remoting

Summary: Understanding how Microsoft .NET Remoting infrastructure and how Microsoft ASP.NET Web services perform cross-trip communication, understand the working principle of these two technologies, and how to select appropriate technologies for your application.

table of Contents

Overview Serialization and Metadata Distributed Application Design: ASP.NET Web Services and .NET Remoting Select Architecture Summary

Overview

Over time, such a convention has been formed: the application is integrated into a set of components, distributed between the computer network, and runs together as part of the entire program. In the past, distributed application logic requires component / object technology, such as Microsoft® Distributed Component Object Models (DCOM), Object Management Group Public Object Request Agent Architecture (CORBA) or Sun's Remote Method (RMI) . These technologies provide a reliable, upgraded architecture to meet the growing needs of applications.

Although these components-based technologies are well operating in the intranet environment, they will encounter two large questions if they try to apply them to the Internet. First, these technologies cannot be interactive. Although these technologies can handle objects, they do not have the same details. For example, life cycle management, support for constructor, and support for inheritance. Second, more importantly, they all focus on the communication of the RPC, which typically constructs a tightly coupled system around the explicit call of the object method.

Instead, a browser-based web application is loosely coupled, with strong interoperability. They communicate with HTTP to exchange many MIME type data in different formats. Web services make traditional Web programming models for a variety of applications, not just browser-based applications. They swap SOAP messages using HTTP and other Internet protocols. Since the Web service depends on industry standards such as HTTP, XML, SOAP, and WSDL, the application's function is displayed on the Internet, so they are independent of programming languages, platforms, and devices.

The ASP.NET Web Services The infrastructure provides a simple API for web services by mapping the SOAP message to method calls. This mechanism is implemented by providing a very simple programming model (based on the SOAP message exchange mapping to method call). The client of the ASP.NET Web service does not need to understand the platform, object model, or programming language for creating them. The service does not need to understand the client to send a message. The only requirement is that both parties must recognize the format of the SOAP message being created and used, which is defined by the Web service contract definition represented using the WSDL and XML architecture (XSD).

.NET Remoting provides an infrastructure for distributed objects. It uses both flexible and scalable pipelines to provide .NET full object semantics. ASP.NET Web Services provides a very simple programming model based on messaging, while .NET Remoting provides more complex features, including supporting values ​​or reference delivery objects, callbacks, and multi-object activation and lifecycle management strategies. To use .NET Remoting, the client needs to know all of these details, in short, you need to use the .NET to establish the client. (Or other frames that support .NET Remoting, the only framework we know is the JA.NET for Intrinsyc for Java.). Net Remoting line also supports SOAP messages, but must pay attention to this does not change its client Claim. If the Remoting endpoint provides .NET dedicated object semantics, whether or not through SOAP, the client must understand them. .NET Framework supports two distinct distributed programming models - Web services and distributed objects, which caused great chaos to developers. When should I use the ASP.NET web service, when should I use .NET Remoting? To answer this question, you must understand the working principle of these two technologies.

转载请注明原文地址:https://www.9cbs.com/read-88176.html

New Post(0)