Monthly Archives: June 2005

What is document oriented?

Don Smith (belatedly) wonders what it means to be document oriented;

To me, document-oriented (also called message-oriented or message-centric) is less about programming models or on-the-wire representations and more about the developer’s mindset. I recommend all Web service developers try to change the way they think about distributed solutions … especially if they’ve come from a DCOM, Remoting, etc. background. When you’re not thinking in terms of messages, certain inappropriate concepts can seep into your service. For example, object-oriented concepts like inheritence and polymorphism don’t belong in a service interface. Don’t get me wrong, there are ways to acheive the benefits these concepts provide, but it’s done differently. Developers with an RPC mindset also think in terms of object instances which don’t really apply to the messaging mindset. Lastly, RPC is largely dependent on the request-response exchange pattern. Messages can be one-way, pub-sub, solicit response, or request-response. Okay, one more thing to distinguish these mindsets … messaging scenarios are better equiped to handle async, store and forward, and queuing scenarios.

It amazes me that I can agree so emphatically with with what’s written above, yet also know that Don, like other Web services proponents, is missing the point; if you’re not doing state transfer, you’re just putting lipstick (XML) on a pig (RPC). How can you tell the difference? If there’s an operation name in your “document”, then you’re not document oriented.