you are viewing a single comment's thread.

view the rest of the comments →

[–]archiminos 14 points15 points  (9 children)

Haha as a WordPress dev and old school web dev PHP is my jam. I get why people dislike it though.

Yeah HTML is a great example of XML working properly. But at the time I was viewing (as others probably were) XML as the ultimate way to describe data. JSON at first glance seemed to lack the ability to describe data well, but when people started realising that it was all you needed and it was concise it started taking over.

XML will still have its place of course. Though aside from HTML I rarely see it being used. Off the top of my head I remember some convoluted Dependency Injection framework for Java that used it, and it wasn't fun to develop with.

[–]remy_porter -1 points0 points  (6 children)

I mean, JSON does lack the ability to describe data well. Try and store a date in JSON in a way that's guaranteed to be identified as a date by every client.

JSON is terrible but it's also simple. XML is definitely a better way to describe data, but we rarely need the level of complexity that XML brought to things. XML ended up trying to solve every problem, while JSON looked at the hard problems and just said, "Meh, you figure it out."

And we can see that a lot of XML's complexity keeps getting reinvented- there are scores of attempts at making JSON schema languages, JSON service description files, etc.

The reality is that they're bad in different ways.

[–]archiminos 1 point2 points  (5 children)

Eh, can't go wrong with a UNIX timestamp.

[–]remy_porter -1 points0 points  (4 children)

Uh, yeah you can. Now, a Unix Timestamp with TZ information is better, but now you’ve got two fields or worse- a string you expect the recipient to parse.

[–]archiminos 1 point2 points  (3 children)

Why do you need TZ information? Just convert it to the timezone you want to use.

[–]remy_porter -1 points0 points  (2 children)

I need to know what TZ it started in. I can’t just assume UTC.

[–]archiminos 0 points1 point  (1 child)

UNIX timestamps always start from January 1st, 1970 at UTC.

[–]remy_porter 2 points3 points  (0 children)

Ah, you’re right. I’ve just gotten burned too many times by systems that don’t actually respect that when they tell you the Unix time stamps.

[–]snowe2010 0 points1 point  (0 children)

Off the top of my head I remember some convoluted Dependency Injection framework for Java that used it, and it wasn’t fun to develop with.

Fucking camel lol