14.4. Summary

 < Day Day Up > 

To run code in a managed environment, .NET creates partitions called application domains for the assemblies to execute in. The AppDomain, which runs inside of a physical process, has the advantage of providing more secure code through code isolation and security boundaries. The boundaries prevent an object in one AppDomain from directly accessing an object in another AppDomain. For them to communicate, .NET provides a set of classes that support remoting a technique that enables objects to communicate across AppDomain boundaries.

Remoting provides a way to implement client-server or peer-to-peer distributed applications. It's designed to conceal the underlying details of how messages are transported and permit the developer to focus on higher level tasks such as selecting a protocol or the way the transported message is formatted. A key component of the remoting architecture is the use of a proxy on the client side that serves as a surrogate for the remote object. It interacts with the client by presenting the same interface as on the remote object and encapsulates the information required to translate client calls into actual calls on the remote object.

The remote objects can be implemented in several ways: as a singleton that services all requests, as a server-activated single call object that is created each time the object is invoked, or as a client-activated object that persists as long as the client keeps it alive. The three offer a variety of different characteristics that enable a developer to select one most suited for an application.

     < Day Day Up > 

    Core C# and  .NET
    Core C# and .NET
    ISBN: 131472275
    EAN: N/A
    Year: 2005
    Pages: 219

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