MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

WcfProxy vs MobileProxy? #357

Open ajj7060 opened 7 years ago

ajj7060 commented 7 years ago

I'm trying to get WcfProxy up and going on Csla again for Android, and I stumbled across the MobileProxy which looks like its also Wcf. What is the difference between the two? Does WcfProxy expect to use Csla.Server.Hosts.WcfPortal at the SVC endpoint, and MobileProxy is meant to work with Csla.Server.Hosts.Mobile.WcfPortal?

rockfordlhotka commented 7 years ago

That is correct - they are very different endpoints.

The Hosts.WcfPortal endpoint is raw WCF. The Hosts.Mobile.WcfPortal uses WCF, but it actually abstracts over WCF - using WCF purely as a way to move a byte array.

Or to put it another way - the Hosts.WcfPortal uses BinaryFormatter or NDCS for serialization. The Hosts.Mobile.WcfPortal (and MobileProxy) use the CSLA MobileFormatter for serialization, and then WCF uses its native DataContractSerializer to serialize the resulting byte array.