Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - Pros - Cons - Ideas/links on sending object graph through a web service using WCF.

 
 
Old 06-04-2007   #1 (permalink)
Curt K


 
 

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 SpecsSystem Spec
 

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46