The IMobileObject interface exists to support the MobileFormatter, and that is currently used only by Silverlight.
MobileObject, MobileList and other base classes implement IMobileObject to simplify how CSLA .NET implements the interface. And you can use those base classes yourself to create serializable objects for use with the Silverlight data portal (though that's obviously an advanced scenario).
In CSLA .NET for Windows, none of the code in the MobileObject/etc classes should matter, because nothing would invoke IMobileObject methods.
In the future you can imagine other interesting ideas though. For instance, a version of CSLA .NET for .NET Compact Framework that uses MobileFormatter. A version of CSLA .NET for Windows Azure that uses the MobileFormatter. A version of CSLA .NET for Partial Trust Web Servers that uses the MobileFormatter.
I don't know that I'll do all (or any) of those. But the MobileFormatter addresses the single biggest roadblock to making CSLA work in most partial trust environments, and I rather suspect that my use of the BinaryFormatter or NetDataContractSerializer may slowly fade away in the future.
If that happens, then MobileObject and the related types become rather important in other environments :)
No I haven’t. it isn’t entirely relevant, since
neither of the .NET formatters are available in SL.
The one thing we DO know is that MobileFormatter can create very
large XML streams. Behind the scenes it uses the WCF DataContractSerializer,
which creates pretty verbose XML. The Silverlight data portal has hooks where
you can plug in compression, and there’s a sample app showing how to do
that (the idea came from a thread on this forum a few weeks ago).
Rocky
Copyright (c) Marimer LLC