Someone recently asked me about how to handle an internal product debate around REST vs. SOAP.
In hopes I never have to address this debate again, here's a record of what I told them.
The following design decisions are orthogonal, even though people often conflate two or more of them:
- Whether one uses SOAP or POX (plain-old-XML).
- Whether or not one publishes an XML schema for their formats.
- Whether or not one generates static language bindings from an XML schema.
- The degree to which one relies on HTTP-specific features. That stated, screw with GET at your peril.
- Whether one adopts a message-centric design approach or a resource-centric design approach.
Some of the decisions (specifically 5) are architectural and sometimes philosophical.
Some of the decisions (specifically 1-2) are simple business decisions that are determined by who your target audience is.
- If you want a great experience for .NET/Java devs, you’ll typically publish schemas (through wsdl) and support SOAP.
- If you want a great experience for LAMP folks, you’ll support POX messages and will provide a non-XSD description of your formats.
- If you want to reach both audiences, you’ll do both #1 and #2.
- If you want to reach both audiences before your competition does, you'll avoid indulging in religious debates and ship something.
Posted
Feb 17 2006, 11:21 AM
by
don-box