Just a few of the things I didn’t like about it. But when the system worked, it was quite capable.
The negative feelings about XML are not due to the lack of glossy pitch pages and hypemen pushing XML and XML-based technologies; they developed whole XML had those far more than React ever has.
Some people may be too young to remember that, but...
They were the kinds with a bunch of worthless certifications who go everywhere in suits. I expected nothing but expensive clunky broken complicated bullshit from them. And that's exactly what they gave you when they pitched XML so I ignored it for over a decade as some tedious wasteful time-consuming thing that dumb people use to rake in hourly contract dollars.
But then, maybe 15 years ago or so, I started hitting use-cases that it was designed for and everything changed.
As a way to ultimately render a view, it has never been elegant.
I’ve done it every possible way:
- Templating libraries
- XHTML with embedded XML data
- XML and XLST
- XML embedded in JavaScript (EMCAScript), aka React before React existed
- React, which is similar EMCAScript
I used the first public releases of React. I was immediately sold. No one had to sell anything to me. I knew it was going to win.
I can’t imagine anyone with strong experience in all these ways possibly think that these other ways are more enjoyable.
p.s. I’m not talking about Redux. I was never sold on Redux/Flux.
Just to emphasize this: Why has XML been losing as the standard config format? Why did JSON win on web APIs? It's not because JSON is better, but because it's simpler and very-javascript-compatible.
If you like XML, there is a strong argument to support JSX because it's a way to keep XML around!
In APIs you're talking to 1 server, calling 1 function, that returns 1 kind of thing at 1ce.
XML starts becoming useful when you increment those numbers - any of them.
People (including me) have been trained not to think in those ways. The web still isn't a web - it's merely a collection of computers with individual relationships.
The 90s internet had fleeting attempts at other paradigms. We should probably put serious effort into a second bite at that apple since by every measure our technology is at least 1000x better in the same way we've revisited neural networks
The short answer, as you answered it, is:
> there are 1,000 page books on XML alone.
The long answer: it was over-engineered for the intended use-case.
It's easier to fix under-engineered stuff (like JSON) than to fix over-engineered stuff (like XML).
> If you like XML, there is a strong argument to support JSX because it's a way to keep XML around!
Well, this is basically pivoting XML to a different use-case. It'll still be over-engineered unless you stick to JSX only, in which case it's not XML anymore, anyway.
Things like XSLT are really quite good if you can get past "ew xml icky"
You can inline different schemas in modular, bazaar like ways from a variety of sources and pull in different parsers that do different tasks.
For instance you could have, say an object subtype and pretend you, a spreadsheet developer made something compatible with it.
As the tool parsers the XML, it sees the spreadsheet, which it has never encountered however, the schema tells it where to get the parser so it dynamically loads it, passes off the subtree it doesn't recognize and lets your spreadsheet parser do its things.
It's remarkably clean and elegant clockwork for distributed modular applications.
Things like a mobile phones share feature would be a perfect use case: a wide variety of objects from different applications passing through the same schema with a share directive invoked that allows you to share in a variety of ways. XML can handle this quite magically.
I've built systems like this with XML, it just works. I was like "damn. XML... Who would have thought"
People just never learned XMLs killer features because it got a bad reputation as being the thing that out of touch enterprise Java bozos make messes with - which is true.
But that's also why JavaScript was shat on for 15 years. You gotta be adult enough to look past that. Try to separate the merits of a technology from your perceptive competency of its users.