← Back to context

Comment by paulsutter

11 years ago

JSON/Javascript is just easier to learn and work with than XML/XSLT. For starters, you don't need to learn a special language that you'll never use for anything else.

Just in case you /do/ need to use XML every day: the primary benefit of XSLT is that it lets you avoid using XML libraries to munge some XML. Because the XML libraries are so horrendous to use from any language.

I am sorry but Javascript is not much better than XSLT. Horrible legacy technology full of bugs nobody was bothered to fix.

  • JavaScript isn't full of bugs nobody has bothered to fix. It's full of specified behavior that cannot be fixed without breaking backwards compatibility. That said, the issues are well known and actually bypassable.

    Whether you should be using it for the problem XSLT tries to solve is another question. Probably not, since there are other templating languages.

> JSON/Javascript is just easier to learn and work with than XML/XSLT.

Unfortuntely running Javascript on the back-end for this purpose is not something most companies do.

  • You're joking, right? There are JSON libraries for every back end language and ecosystem you could imagine.