Silverlight, WCF, basicHttpBinding, UnitOfWork

Posts   
 
    
toddaheath
User
Posts: 3
Joined: 20-Jun-2008
# Posted on: 07-Sep-2008 20:12:52   

I was wondering if anyone has done a unit of work implementation for use with Silverlight / WCF / basicHttpBinding. Since UnitOfWork2 objects are not XML serializable I was wondering what approach people are taking? It seems that I’m kind of limited to using very chatty async message calls. If I want to take advantage for the UnitOfWork pattern, I will have to develop my own UnitOfWork class that is XML serializable and uses my DTO objects and populate the UnitOfWork2 object on the server side.

mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 09-Sep-2008 09:13:13   

There is always an option to serialize UOW->byte array->string and pass it wherever you want.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
toddaheath
User
Posts: 3
Joined: 20-Jun-2008
# Posted on: 09-Sep-2008 22:50:10   

Silverlight uses a different runtime that the rest of .NET. Therefore, Silverlight communicating with WCF is cross-platform. Silverlight applications can not reference .NET assemblies they can only reference other Silverlight assemblies.

Therefore, using the DataContractSerializer or serializing a UnitOfWork to a byte[] then to a string and deserializing on the other side won't work.

How do other people use UnitOfWork2 with cross-platform serialization?