<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx</link><description>(There's been a sudden influx in blog readers asking me good questions, which is great. Be patient; I'll try to cover them over the next few entries.) In response to yesterday's entry on serializable JScript .NET objects, a reader asked Please forgive</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>SimpleScript!!!</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#143244</link><pubDate>Thu, 27 May 2004 19:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143244</guid><dc:creator>mattd</dc:creator><description>Off topic but...&lt;br&gt;Give us more SimpleScript!!! No Pressure&lt;br&gt;Also could you integrate into ATL Server=)</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#143247</link><pubDate>Thu, 27 May 2004 19:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143247</guid><dc:creator>Eric Lippert</dc:creator><description>I'm still working on it little by little, but I don't have much time to spend on it lately.  We've got to ship Visual Studio at some point here you know...</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#143553</link><pubDate>Fri, 28 May 2004 03:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143553</guid><dc:creator>secretGeek</dc:creator><description>That's brilliant Eric. </description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#143597</link><pubDate>Fri, 28 May 2004 05:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143597</guid><dc:creator>Muhammad Ali Shah</dc:creator><description>Quite a captivating way of explaining things! Thanks!</description></item><item><title>.Net Remoting explained bizarely</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#143662</link><pubDate>Fri, 28 May 2004 11:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143662</guid><dc:creator>Wackylabs</dc:creator><description>This Eric Lippert guy is quite funny sometimes, go check out his explanation of the difference between MarshalByRef and Serializable. Made me laugh, and I understood it too.. Marshal-by-ref versus Serializable Objects...</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#143809</link><pubDate>Fri, 28 May 2004 15:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143809</guid><dc:creator>Tom Trenka</dc:creator><description>This is simply brilliant.  Do you have any idea of how many times I've tried to explain the concept of serialization to those who don't know, only to fall flat on my face?  BRILLIANT.&lt;br&gt;&lt;br&gt;(of course, coming from &amp;quot;the Man&amp;quot;, I suppose that's what I should have expected :)&lt;br&gt;&lt;br&gt;I for one would love to hear more on this topic (as well as the JScript.NET is Serializable); SimpleScript is interesting, but this is a bit more practical ;)&lt;br&gt;&lt;br&gt;Do you have a link to the book you've mentioned?</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#143836</link><pubDate>Fri, 28 May 2004 15:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143836</guid><dc:creator>Peter Torr</dc:creator><description>I hope that when you insert the disk into the Molecular Neuron Refrobnicator you get a nice &amp;quot;The memories you are about to implant could be those of an axe-murderer. Are you sure you want to continue?&amp;quot;-type popup. </description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#143984</link><pubDate>Fri, 28 May 2004 18:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143984</guid><dc:creator>Muhammad Ali Shah</dc:creator><description>Could be, &amp;quot;....axe-murderer. Are you sure you don't have an axe nearby?&amp;quot;&lt;br&gt;&lt;br&gt;Or something like, &amp;quot;This sytem has been thoroughly tested in the usability labs but we take no liabilities, implied or otherwise, of the results.&amp;quot;</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#144469</link><pubDate>Sat, 29 May 2004 21:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144469</guid><dc:creator>Dan Shappir</dc:creator><description>The only problem I have with this otherwise good analogy is that it makes marshal-by-value seem more complicated than marshal-by-ref. While in the physical world this is often true (it can be very difficult to build and send an exact duplicate of some object) in the virtual world it's often the reverse.&lt;br&gt;&lt;br&gt;Anyway &amp;quot;The only parameter passing mechanism endorsed by Real Programmers is call-by-value-return, as implemented in the IBM/370 Fortran G and H compilers&amp;quot;&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://www.pbm.com/~lindahl/real.programmers.html"&gt;http://www.pbm.com/~lindahl/real.programmers.html&lt;/a&gt;</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#144610</link><pubDate>Sun, 30 May 2004 12:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144610</guid><dc:creator>Virag</dc:creator><description>An excellent analogy how did you come up with it?</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#144628</link><pubDate>Sun, 30 May 2004 15:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144628</guid><dc:creator>Eric Lippert</dc:creator><description>Beats me. What am I, a neuroscientist?  Maybe read &amp;quot;Fluid Analogies&amp;quot; by Douglas Hofstadter if you want to understand how people come up with analogies.</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#144657</link><pubDate>Sun, 30 May 2004 19:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144657</guid><dc:creator>sotto</dc:creator><description>Thanks, this was fun to read... and interesting.</description></item><item><title>sotto&amp;#8217;s dev[b]log &amp;raquo; Remoting - Marshal By Ref vs Marshal By Value</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#144658</link><pubDate>Sun, 30 May 2004 22:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144658</guid><dc:creator>TrackBack</dc:creator><description>sotto&amp;amp;#8217;s dev[b]log &amp;amp;raquo; Remoting - Marshal By Ref vs Marshal By Value</description></item><item><title>New and Notable 58</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#145506</link><pubDate>Tue, 01 Jun 2004 18:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:145506</guid><dc:creator>Sam Gentile's Blog</dc:creator><description /></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#201406</link><pubDate>Fri, 30 Jul 2004 06:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:201406</guid><dc:creator>Haluk</dc:creator><description>Can a class have the [Serializable] attribute and be derived from MarshalByRef?</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#201409</link><pubDate>Fri, 30 Jul 2004 07:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:201409</guid><dc:creator>Eric Lippert</dc:creator><description>Can a clone take a phone call?&lt;br&gt;&lt;br&gt;Sure, why not?</description></item><item><title>A great and funny way to explain object serialization Vs Marshal by Ref!! </title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#226058</link><pubDate>Mon, 06 Sep 2004 18:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:226058</guid><dc:creator>zhen206</dc:creator><description>TrackBack From:http://www.cnblogs.com/leecs1/archive/2004/09/06/40457.aspx</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#583873</link><pubDate>Wed, 26 Apr 2006 09:42:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:583873</guid><dc:creator>Radhika</dc:creator><description>Man...that was some explanation...really Awesome!!!</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#2694829</link><pubDate>Thu, 17 May 2007 15:53:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2694829</guid><dc:creator>Tanveer Badar</dc:creator><description>&lt;p&gt;Wasn't that movie &amp;quot;The sixth day&amp;quot;?&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#6610353</link><pubDate>Fri, 30 Nov 2007 10:59:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6610353</guid><dc:creator>Geek At Your Service</dc:creator><description>&lt;p&gt;A fantastic show of writing hard-to-crack technical thing to a read-to-laugh-and-never-forget topic.&lt;/p&gt;
&lt;p&gt;Eric, you are great! &lt;/p&gt;
&lt;p&gt;The Geek!&lt;/p&gt;
&lt;p&gt;geekays@gmail.com&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#6710643</link><pubDate>Sun, 09 Dec 2007 08:54:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6710643</guid><dc:creator>/\/\asoud</dc:creator><description>&lt;p&gt;Hi Eric&lt;/p&gt;
&lt;p&gt;It was very simple, clear and useful story!&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#7860692</link><pubDate>Sat, 23 Feb 2008 21:36:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7860692</guid><dc:creator>Justizin</dc:creator><description>&lt;p&gt;Just a note on terminology and us crazy Python folks with 'pickle': pickle is not a slang term, it's a protocol, so please do not confuse things by referring to [Serializable] or Marshal-By-Ref or anything as pickling and unpickling. &amp;nbsp;I am working on a pickle module in IL which might be an alternative means of serialization, though more likely a compatibility solution for existing Python apps, and for interop with Python apps.&lt;/p&gt;
&lt;p&gt;As for terminology of .NET serialization, I like frobnicate / defrobnicate..&lt;/p&gt;
&lt;p&gt;Speaking of Python, and Molecular Neuron Frobnicators, anyone interested in this should check out Perspective Broker, originally of the Twisted project, but afaik now ported to many platform and languages. &amp;nbsp;If there isn't a PB implementation on .NET yet, there sure oughta be.&lt;/p&gt;
</description></item><item><title>I always said - use real-world examples!</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#8646220</link><pubDate>Tue, 24 Jun 2008 11:01:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8646220</guid><dc:creator>I always said - use real-world examples!</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://cafe.themarker.com/view.php?t=495233"&gt;http://cafe.themarker.com/view.php?t=495233&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#8647974</link><pubDate>Tue, 24 Jun 2008 20:10:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8647974</guid><dc:creator>Sriram</dc:creator><description>&lt;p&gt;I couldn't have understood this better.. amazing !!!&lt;/p&gt;
</description></item><item><title>Using a Separate Application Domain to Test for Implemented Interfaces</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#9020371</link><pubDate>Tue, 28 Oct 2008 18:51:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9020371</guid><dc:creator>Colby Africa</dc:creator><description>&lt;p&gt;Sometimes you need to load an assembly for use or inspection.&amp;amp;#160; The problem is that loading an assembly&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#9319526</link><pubDate>Thu, 15 Jan 2009 01:19:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9319526</guid><dc:creator>deelipfan</dc:creator><description>&lt;p&gt;&amp;quot;In keeping with our ridiculous analogy&amp;quot; - are you kidding ?? Your analogy told me a million things. &amp;nbsp;I didn't even have to read the rest of your article and went back to what I was doing after I read the two scenarios. &lt;/p&gt;
&lt;p&gt;Please...please....include analogies like these in future while explaining concepts at a high level. Saves a lot of time for us.&lt;/p&gt;
&lt;p&gt;I was wondering if you could explain the concept of signing assemblies (public/private key concept) with a real life analogy.&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#9845837</link><pubDate>Thu, 23 Jul 2009 09:38:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9845837</guid><dc:creator>SandyRaikar</dc:creator><description>&lt;p&gt;awesome analogies... cannot be erased forever&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#9846876</link><pubDate>Fri, 24 Jul 2009 02:09:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9846876</guid><dc:creator>TheCPUWizard</dc:creator><description>&lt;p&gt;I am continually suprised that &amp;quot;professional&amp;quot; developers don't understand this. &amp;quot;By Value&amp;quot; and &amp;quot;By Reference&amp;quot; are basic concepts that exist in almost every language (VB, C++, etc.) and are the inherent decision point in .NET when deciding if you declare a class or a struct......&lt;/p&gt;
&lt;p&gt;You are either working with the original (single) object or you are working with a copy (there can be many).&lt;/p&gt;
&lt;p&gt;Yet as soon at his moves into &amp;quot;communications&amp;quot; environments (even between AppDomains), then people seem to forget (or ignore) all of the basics........&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#9908260</link><pubDate>Fri, 16 Oct 2009 16:32:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9908260</guid><dc:creator>zorex</dc:creator><description>&lt;p&gt;Amazin article !!&lt;/p&gt;
&lt;p&gt;Could any one explain in which case we would need MarshalByRef model across netword ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#9908261</link><pubDate>Fri, 16 Oct 2009 16:32:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9908261</guid><dc:creator>zorex</dc:creator><description>&lt;p&gt;Amazin article !!&lt;/p&gt;
&lt;p&gt;Could any one explain in which case we would need MarshalByRef model across network ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Marshal-by-ref versus Serializable Objects</title><link>http://blogs.msdn.com/ericlippert/archive/2004/05/27/143203.aspx#9908265</link><pubDate>Fri, 16 Oct 2009 16:45:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9908265</guid><dc:creator>TheCPUWizard</dc:creator><description>&lt;p&gt;Zorex, you are (effectively) using MarshalByRef anytime you use a SOAP webservice!&lt;/p&gt;
&lt;p&gt;Consider a simple &amp;quot;Vote&amp;quot; class:&lt;/p&gt;
&lt;p&gt;class Vote&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; void VoteForA();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; void VoidForB()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; int AVotes();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; int BVotes();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;There is ONE instance of this class on the server.&lt;/p&gt;
&lt;p&gt;If you Marshal by value, place a vote and then look at the counts, you will see 1 and 0 (just your vote) - simply because you are looking at YOUR copy.&lt;/p&gt;
&lt;p&gt;If you Marhal by Reference, place a SINGLE vote and then look at the counts, you will se the results of EVERYONE who have voted.&lt;/p&gt;
</description></item></channel></rss>