Information and Links
Join the fray by commenting, tracking what others have to say, or linking to it from your blog.
Simple Singleton .NET Remoting with Serialization
.NET Remoting has two important concepts to master, the first is the MarshalByRefObject which is introduced in Simple Singleton .NET Remoting. The second is Serialization. MarshalByRefObject is a class that you derive from if you want a given class to stay put (in other words, the object will not move from where it is instantiated). Serialization is the exact opposite, you mark an object with the [Serializable] attribute when you want it to be able to move from client to server and vice versa.
In the attached sample there are three projects.
-
SimpleRemotingSerializationClient - This contains a databound grid control (using the snazzy new VS 2005 object databinding) that is bound to a list of Person objects that is serialized down from the SimpleRemotingSerializationServer.
SimpleRemotingSerializationObject - This contains a [Serializable] Person object, and a MarshalByRefObject SimpleObject object that contains property that is of type List
SimpleRemotingSerializationServer - This is a winforms application that has a few lines of code in it to host the SimpleObject as a Singleton.
When the sample project runs the following happens.
SimpleRemotingSerializationServer hosts the SimpleObject as a Singleton. SimpleRemotingSerializationClient instantiates SimpleObject and grabs a copy of the People property (of type List
Download: Simple Remoting Serialization Sample



Dude, this has to be the most boring blog I’ve ever read!
Of course, its not like I should expect any better of someone who spnet his high school years living in a basement with a stack of Symantac books