![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Pros - Cons - Ideas/links on sending object graph through a web service using WCF. We are pulling an object graph out of Nhibernate (it's a Object persistence framework or OPF). The object graph consists of a basic object with about 5 properties for basic data types (ints, strings, etc), but also contains about 7 properties that are Generic lists of other objects, and some of those objects will contain a property that is a list of yet more objects up to 4 or 5 levels deep. The object counts for each list will more than likely be less than 100. I have been a proponent of having a flat service/contract model (well a flat model coming out of Nhibernate too, but that's another story) where the service has atomic calls like the following: Pseudo code MyObject obj = GetObject(ID); ChildObject1[] childObj1 = GetChileObject1(obj.ID); ChildObjectLevel2[] childlevel2 = GetChildObjectLevel2(childObj1.ID). The code could continue with calls up to 4 or 5 layers deep to grab parts of the object graph depending on what you need. If the object graph were needed, it could be built making many single calls on the service. Hope this make sense. One of the ideas here to transfer the whole graph at once by serializing all the objects at once. I feel this is a bad idea due to the size of the XML, and the client will need to be able to understand the XML (it's types wouldn't be part of the WSDL import) and de-serialize it (using a SOAP Formatter for example). This to me is like mixing "remoting" with web services. What I do not know is whether the resulting XML from the SOAP serializer is compatible with non-dot net clients. How much would a non-dot net client need to know to re-construct the object graph? Example WCF contract call: String XML = GetObjectGraph(int ObjectID); Thanks for reading this far.. To sum up, What's your opinion on transferring a complex object graph across WCF? Yes (if yes, links examples?), No? Links/comments as to why or why not. Thank you! Curt |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Windows 7 Pros & Cons. | Vista News | |||
| Linq vs Sprocs, Pros and Cons | .NET General | |||
| pros and cons of 64bit | General Discussion | |||
| Re: Vista -- The Pros & The Cons -- And Posting Styles | Vista General | |||
| Re: Vista -- The Pros & The Cons -- And Posting Styles | Vista General | |||