The .NET Remoting Layer Developers (Adelphia web hosting) who are new
The .NET Remoting Layer Developers who are new to the .NET platform often assume that .NET is all about building Internetcentric applications (given that the term .NET often conjures the notion of interNET software). As you have already seen, however, this is simply not the case. In fact, the construction of web-centric programs is simply one tiny (but quite well-touted) aspect of the .NET platform. In this same vein of misinformation, many new .NET developers tend to assume that XML web services are the only way to interact with remote objects. Again, this is not true. Using the .NET remoting layer, you are able to build peer-to-peer distributed applications that have nothing to do with HTTP or XML (if you so choose). The first goal of this chapter is to examine the low-level grunge used by the CLR to move information between application boundaries. Along the way, you will come to understand the numerous terms used when discussing .NET remoting, such as proxies, channels, marshaling by reference (as opposed to by value), server-activated (versus client-activated) objects, and so forth. After these background elements are covered, the remainder of the chapter offers numerous code examples that illustrate the process of building distributed systems using the .NET platform. Defining .NET Remoting As you recall from your reading in Chapter 13, an application domain (AppDomain) is a logical boundary for a .NET assembly, which is itself housed within aWin32 process. Understanding this concept is critical when discussing distributed computing under .NET, given that remoting is nothing more than the act of two objects communicating across application domains. The two application domains in question could be physically configured in any of the following manners: Two application domains in the same process (and thus on the same machine) Two application domains in separate processes on the same machine Two application domains in separate processes on different machines Given these three possibilities, you can see that remoting does not necessarily need to involve two networked computers. In fact, each of the examples presented in this chapter can be successfully run on a single, stand-alone machine. Regardless of the distance between two objects, it is common to refer to each agent using the terms client and server. Simply put, the client is the entity that attempts to interact with remote objects. The server is the software agent that houses the remote objects. 565 C H A P T E R 1 8
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.