On Sun, Feb 3, 2019 at 2:39 AM Neil Van Dyke <n...@neilvandyke.org> wrote:
>
> David Storrs wrote on 2/2/19 11:57 PM:
> > Are there angles here that I haven't encountered or thought about yet?
>
> As a fellow Racketeer with mixed feelings about XML, let me articulate
> for the list an angle you might've already considered...
>
> One reason you might decide to use XML for a system interface (when not
> required to, nor encouraged by it possibly helping sales to some
> customers) is that you want to help the programmers on the other side of
> the interface to be correct, for very selfish reasons.
>
> (We must remind ourselves not to underestimate the capacity for
> incorrectness in software systems development.  We know it's bad, but
> it's worse than that.)
>
> If everyone's messages have to validate to a particular DTD/schema, that
> lets you throw in what's effectively a bunch of checking they can do
> themselves, on their side, gives them blame-pointing error messages, and
> eliminates some of the phases of incorrectness on their end.

This is, I think, saying that XML allows for typed data, as well as
specified structural requirements.  I granted above that types were a
great feature, and I'll definitely concede to structural requirements.

I see your point, although I'm waffling about it.  I think it would be
easier to have, for example, a JSON interface with good error messages
for when messages aren't accepted.  Still, writing the DTD is a
compact way of writing the error messages, much like contracts on a
function.

> When you're considering XML for a particular real-world case, it might
> be helpful to try to think through scenarios of using XML vs. other
> plausible open standards or semi-standards, like Protobuf, or some
> convention over JSON or CSV.  Who all will be on the other end of the
> interface?  How will they implement it?  What's everything that happens
> when the interface spec gets a new version?  How messy is that going to
> be?  How long does this have to keep working (e.g., medical records that
> might need to be interpreted perfectly 100 years and 10 corporate
> acquisitions later)?  Etc.

Very valid points.  Thank you.

>
> BTW, if you do go with XML, you might find RELAX NG Compact syntax to be
> pleasant.

Oh, nice.  I wasn't aware of that, thank you.

Dave

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to