Title Image

Don Xml's Grok This

The home of Don Demsak
Welcome to Don Xml's Grok This Sign in | Help
in Search

This Blog

Syndication

Site Sponsors

DonXml's All Things Techie

Send Messages Not Serialized Object Graphs

For those of you that don’t follow Christian Weyer, Clemens Vaster, Ted Neward, Rocky Lhotka, Tim Ewald, Don Box, Steve Maine, Martin Gudgin, Aaron Skonnard or a bunch of others, there has been a lot of talk about the difference between RPC (remote procedure calls) and WebServices (I guess it has to do with the Indigo beta release announcement).  All of this seems a bit old news to me, but I guess I’ve been living in a bubble, because there seems as though a lot of folks are confusing RPC with WebServices.  The problem is that .Net makes it so easy to serialize objects to XML, that people have confused themselves with exposing their object models at WSDL endpoints (and trying to use XML Schema to enforce business rules).  Yes, it is easy to do, but that doesn’t mean it should be done, for the same reasons that you shouldn’t bind your UI objects to a DataSet (only a groundhog would do that, right?), it is just data, without business rules.

So, what are you supposed to do?  Well start with creating a Message namespace within your application, then create a XML Schema for each message, and then generate the classes that represent the message.  You know what?  I’m just starting to repeat Christian’s Contract First discussion, so just go read it. 

One thing I have noticed though is that there really isn’t a good sample app that integrates Contract First with Domain Driven Design.  It really isn’t all that hard to do once you get both design principles straight in your head, but I know lots of people learn better from walking thru code examples.  I’d really like to see it done using the new Enterprise Library framework.  I guess I should add that to my list of thing that need to get done.

Side Note: The opposite of a Groundhog is a Loonie.  Both terms are taken from Heilein's science fiction.  A groundhog can't understand why anyone would want to live in space, and a Loonie is someone that can't understand why you wouldn't (originally came from the term given to people that live on the Moon, aka Luna, thus Loonie).  IMHO, the terms fit better than Mort, Elvis, and Einstein.

Published Thursday, February 10, 2005 3:14 PM by donxml
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Aaron Weiker said:

And why couldn't I have just read this instead of the novel of material that is going back and forth?

It's still interesting seeing the thought process of these guys as they all know more than me about it. But in the end I have to agree with you on this one. It's all about a message, not some object. A message implies so much more than an object ever should. The object doesn't have purpose without being told what to do. The message on the other hand is a command to take this and fulfill your purpose in life.
February 10, 2005 3:47 PM

Li Chen said:

What are the reasons that "you shouldn’t bind your UI objects to a DataSet"? Could you list some or provide links to other discussions? Thanks.
February 23, 2005 12:21 PM

John Askew said:

Lines of Communication, (like playing the game 'gossip' in a circle), can foment changes of the original message.
How is this prevented in a purely message-based paradigm?
Just like humans, systems interpret a message. If the system decides to forward the message on to another system, it may need to translate the message to one the next system understands. This is the Line of Communication where the original message may be lost, yes?
Any formal thoughts for this?
July 5, 2006 1:40 PM

Gil said:

To: Li Chen Because you will be skipping your Business Logic, which leads to a solution that is: 1. not modular. 2. very hard to upgrad. 3. not intuative to other programmers. 4. not layered enough to allow to more than 1 programmer to work on it. 5. non-integratable with other systems or applications. While some will say that this is correct but sometime it's ok to save development time, I'd say - never do that unless you creating a demo or you really hate your boss ;)
July 12, 2009 5:35 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About donxml

I’m an independent consultant, specializing in .Net solutions architecture, based out of New Jersey who also doubles as an evangelist for XML, Domain Driven Design, enterprise architecture and .Net. I do not work for Microsoft, the W3C or any other big company that you may know of (at least not yet). I’ve been an indie for over ten years, and although I’ve been tempted a couple times to take a job with companies like Microsoft, I’ve haven’t found something better than my current situation. I work mostly with the large pharmaceuticals that are based here in New Jersey, and usually find myself on long term contracts. Definitely not the prototypical indie consultant, but it lets me dedicate time to my non-income generating activities like the developer community stuff, plus financing open source projects like XPathmania and MVP-XML. If you would like to talk to me about doing some contract work, just contact me via the contact page. My rates vary widely, depending on lots of different variables, but mostly distance from Jersey, and type of work. Plus, I’ve been known to donate some of my code for various projects.
Powered by Community Server, by Telligent Systems