Quoth J. Merrill: > I'm not going to assert that I've fully thought this through, but couldn't your "shared > assembly" define an appropriate object class that has a constructor that accepts > XML? (It might also have a SetState method that resets the state completely from > XML, so you don't have to build a new object in order to change the XML data it > represents.) Sure, that's do-able. But since these guys are now hooked on the model I'm using I have to answer the inevitable question: "If all I'm going to do is turn the XML into an object, why can't the WebService just return the object like it's currently doing?" In other words, I'm having trouble evangelizing the "passing messages that are not necessarily objects" approach. Seriously, I think all I need is better ammo to motivate everyone to switch.
> In other words, provide the "internal object model" in a shared assembly so that > each developer doesn't have to do the same work to consume the agreed-upon XML. > Of course, objects of this class should be able to generate appropriate output XML. > If anyone decides to do so (e.g. they're taking a fling writing some part of the app in > Java, or they don't like your object model) they can read and write XML however > they choose. That's exactly what we are doing; we are working with an external developer who is using Axis to consume some of our Web services. It's really a shining example of interoperability. But guess what he does on his side? Yep, he turns the XML into objects using Axis' type-mapping features. It seems as if RPC is firmly lodged into our heads and refuses to make way for SOA. > If you enhance the system so that there are new (presumably optional) values > represented in the XML, you can provide a new shared assembly that defines > an enhanced class that inherits from the original. The developers who don't want > or need to use the new functionality don't have to update any code, and don't need the > new assembly. Those who need the new stuff can pick up the new assembly, and the > only code they'll need to change is the declared datatypes; of course they'll need to > add code to work with the new info. In some places they won't even need to change > datatypes -- any routine that doesn't care about the new info can work with objects of > type OriginalObjectClass; only if there's a need to read or update the (e.g.) new > property does the signature need to change to mention EnhancedObjectClass, because > any EnhancedObjectClass object "is an" OriginalObjectClass. Precisely. The "shared assembly" approach we use now does not require recompilation or client apps provided that any new properties are not required by server-side logic. In almost all cases, the developers just need to replace the old assembly with the new and recompile the app in order to "see" the new features. -Andy =================================== This list is hosted by DevelopMentor� http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
