What are the differences between Marshal by value and
Marshal by reference?

Answer Posted / m.m.suhail

MBV:In this Server Creates a exact Copy of the Object and
sends it to the Client.Which can be used by the Client with
in its AppDomain with out making any further calls to the
server.
But this has a drawback,the copy sent to client will be
static and will not reflect the subsequent changes.So its
better not to use MBV when there are constant updates.

MBR:DotNet Framework creates a Proxy on the Client
AppDomain which the client uses for accessing the Objects
on the Server.We need to extend 'MarshalByRefObject' for
this.
But this to has a drawback,it increases the network traffic
as there can ba number of accesses to the Server.

So its depends upon our requirement.Small objects with
frequent accesses,we can go with MBR and huge Objects with
relatively low accesses we can go with MBV.

Is This Answer Correct ?    15 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Types of compatabilities and explain them ?

2037


Define proxy in .net remoting?

573


Define singleton activation mode in .net remoting?

523


Elaborate the term WebService and how it differ from Remoting?

566


Can you pass SOAP messages through remoting?

575






What are the security measures exist for .net remoting in system.runtime.remoting?

603


Which one is better WebService and Remoting ?

626


What are the threading types?

537


Define remotable objects in .net remoting?

559


What are static assemblies?

556


Which Namespaces is used to achieve the Remoting?

570


What are the steps to publish an object outside the service domain

558


Name the distributed systems available apart from .net remoting?

563


Explain the types of .net remoting?

610


What are static assemblies and dynamic assemblies. Differences between them?

637