Remix.run Logo
_heimdall 5 hours ago

Microdata is also a thing, and if I'm not mistaken supports the same vocabulary as JSON-LD (schema.org is a good resource).

That said, JSON-LD has the default for a while now, much like how we largely abandoned REST for RPC. I'm not actually sure if microdata is still supported by all the important parsers today, I've defaulted to using LD for any site I've built for clients, especially ecommerce sites where I want Google Search exposure.

Edit: its worth noting the comparison with semantic HTML. Semantic HTML helps define the structure of the markup but not real world context like "this is a product for sale" or "this is a train schedule."

angrybards 3 hours ago | parent [-]

HTML markup designed for presentation doesn't always map well to the relationships JSON-LD is used to describe which I imagine is probably why Microdata didn't work out. I have an idea which might use it, but it is a simple use case that doesn't try do too much. Microdata requires the agent supports a more complex HTML parser, Finding a script tag in the document head is probably simpler.

I wouldn't dismiss REST because of RCP though. HTTP and HTML's success probably relate to how Roy Fielding's REST constraints kept the HTTP protocol lean and extendable. It is more like RCP is being used as a layer over top of REST because of HTTP's and HTML's success as being good technologies for web scale.

_heimdall 3 hours ago | parent [-]

Personally I'm of the camp that HTNL schema data should only represent what's visually displayed, much like how accessibility is usually done. In that way I like Microdata because it reinforces that if there isn't a DOM node showing price, for example, I shouldn't be showing that data in a visually hidden way.

For REST, I think the only reason HTML has been useful this long is because of the REST ideas that Fielding gave a name to. Today people just don't use it much, too many sites lean on client side rendering and fetching data from JSON RPC calls that we call REST.

I prefer REST, hell I wish we had proper XSLT 3.0 support for client side rendering logic without JavaScript.

angrybards 2 hours ago | parent [-]

I don't fully understand XSLT, but I've been building something which I believe solves a similar problem (albeit JSON-LD and Javascript). The general XML ecosystem of solutions have always looked really complex to me. You need to understand a lot more types/elements than I think is reasonable for people to author with but they are from before my time. I took a look at XForms 2 and it had its own way of defining functions which on top of the other XML quirks has security concerns.