I think schema validation is a pretty horrible idea, except as a design time debugging tool. Even that role is better served by a validation program. Schema languages are rarely powerful enough to fully specify message requirements (eg, numbers that must be inside a particular range, strings that must have particular structures, etc).
Disadvantages of strict runtime validation:
* introduces unnecessary failures for messages that don't conform but that would be usable by the recipient
* makes introducing new properties awkward. New properties must be optional so as to not break existing clients even if you would really prefer all clients send them.
* inefficient because the message must be interpreted extra times. Once by the recipient to accomplish its goal, and one additional time for each schema validation.
I think schema based message validation provides very little value and requires a fair bit of work. You'd be better off using that time implementing really good error messages on the server side.
Peter
barelyenough.org
> --
> You received this message because you are subscribed to the Google Groups "API Craft" group.
> To unsubscribe from this group, send email to api-craft+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/api-craft?hl=en.
>
>
it's all just prickles and goo:
http://www.youtube.com/watch?v=XXi_ldNRNtM
Priceless! Thank you. :)
So bottom-line, if there's a chance for the request to succeed (you have your required information), do you ignore what you don't like and let it succeed (goo),
or do you throw an error (prickle)?
The answer is found in Postel's law: prickly goo. Figure out whatever you can (be gooey) and if you can't throw an error (be a prickle.)
--
--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group, send email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft?hl=en.
http://www.liquid-technologies.com/FreeXmlTools/FreeXmlValidator.aspx