Advantages of Using .NET Remoting

.NET Remoting is not only about intersystem communications. It also can be used for interprocess communications. .NET Remoting can be configured to communicate and exchange data between two or more components in separate application domains on .NET ”all on the same machine. This is useful for creating systems that are local today but might need to be adapted for a more distributed deployment tomorrow.

Furthermore, .NET Remoting supports both pass- by-value and pass-by- reference implementations for remote data. To define these terms, let's return to our previous example. Remember in the "Interoperability at the Presentation Tier" section of Chapter 2, "Business Requirements for Interoperability," how the ASP.NET page called the business- tier component, which in turn returned a set of data? With .NET Remoting, you have two ways of passing this data back to the calling component. First, you can pass all the data back to the caller, which is known as passing by value . Alternatively, you can pass only a pointer to the data, which is known as passing by reference .

When you use pass by reference, the data will remain in state on the server, and the client will use a reference to that data when required. One advantage of passing by reference is that if the data is large or if operations are better suited to run on a remote system, network latency isn't an issue. The client can still use and reference the object, even though it's contained within the boundaries of the server. Figure 4.2 shows how you would pass data by reference using our previous example.

click to expand
Figure 4.2: Passing by reference with .NET Remoting.

Microsoft. NET and J2EE Interoperability Toolkit
Microsoft .NET and J2EE Interoperability Toolkit (Pro-Developer)
ISBN: 0735619220
EAN: 2147483647
Year: 2003
Pages: 132
Authors: Simon Guest

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net