R – How complex an object can be passed to silverlight from server, using WCF

silverlightwcf

Please note that my experience in Silverlight/.Net and WCF is about two weeks of googling and deciphering tutorials. I need to attempt and provide feedback to a client on if Silverlight will be a possible solution to their application needing a RIA front end.

The client has a rather large .Net based application with a UI layer built which greatly relies on the creation and manipulation of specific (personal) classes and objects from the backend (which would be the server side).

A summery of what I understand to be the general procedure: one can pass simple objects containing simple data types, or more complex .Net type objects. Basically anything which can be understood by both client and server side, after serializing.

But what is the limitation to the complexity of an object I can pass? Or phrased otherwise, would silverlight and WCF be able to support the passing of a personalized object which may contain references to other classes/objects and variables etc?

Additional Info (in case it can help):
I am not allowed direct access to their backend code but with the information I have been given I can safely say their classes heavily use inheritance and overloading of functions/methods in the classes.

Best Answer

As far as I know there is nothing specific to Silverlight. There are some things to keep in mind though.

  • WCF serialization doesn´t like circular references.
  • All types need to specified in the contract. So watch out with inheritance etc.

In general using DTO's (Data Transfer Objects) and not exposing your business objects is the way to go.

Related Topic