Live data from Hacker News

How to build cross-platform mobile apps with JSON

medium.freecodecamp.com

41–43 of 43 posts

Re: How to build cross-platform mobile apps with JSON

#41
post #9

Earlier quoted context omitted.

Same thinking, I expect, that gave us XSLT.

XSLT was proposed as a limited transformation language, and actually (still) does a very good job of that. And since we're doomed to repeat the past we now see various XSLT-ish languages being developed for JSON/YAML/etc, relearning all the edge cases that drove XSLT into its current form. On the other hand, students of the past will notice that Jsonette looks awfully similar to Ant build files, which sucked. JSON/XM…

I spent a lot of time with Ant and was pretty good at it because I understood the tragically backward 'first writer wins' decision they made and had an elaborate set of techniques to work around it. That decision and the attempt to keep all conditional behavior entirely out of the build process wounded it gravely. The fact that they kept making compatibility breaking changes in minor version numbers was the genesis of my dim view of Jakarta projects. Once I started noticing the pattern I couldn't stop.

I think we are finally starting to accept that Turing-complete data is a bug, despite what the Lisp people have been saying for 50 years, and is not a feature on the Internet. Microsoft served as the poster child in the 90's.

The tension, I strongly believe, comes during debugging. When you are trying to figure out why the data doesn't look right, the less the code resembles the data being emitted, the harder it is to locate the source of the error. Templating engines get pretty close to addressing that concern, in ways that transforms or generators don't. So we keep trying to invent a better one. But once you let a little logic in, everybody wants all the logic.

Ant found the Uncanny Valley, in a way that few other tools have managed. I think I'm okay with your implication that it was actually worse than XSLT, which is saying a lot.

[edit] Ant is also the reason I shift uncomfortably whenever someone announces proudly that a tool was 'designed and implemented on a plane trip'. I'd rather have code you wrote when drunk than code you made while stuffed in a sardine can, subjected to noise levels that OSHA would have issues with, and suffering from altitude sickness. You literally designed this while your brain wasn't getting enough oxygen.

Re: How to build cross-platform mobile apps with JSON

#42
post #34

Earlier quoted context omitted.

Although I'm also skeptical of coding in JSON, s-expressions are pretty close to a JSON subset (with the caveat that everything needs to be quoted). (x . (y . (z . NIL))) ['x', ['y' , ['z', null]]]

The first one is the flat list (x y z); the JSON one seems to be equivalent to (x (y (z nil))).

You're right! My scheme is rusty I guess.

I should have said:

  (x . (y . (z . NIL)))  ['x', 'y', 'z']

Re: How to build cross-platform mobile apps with JSON

#43
post #26
post #20

JSON is the new XML. Except XML was actually designed to have semantics, while similar attempts in JSON are just hacks. In general, JavaScript is becoming the new J2EE. Ambitious ideas, clueless implementations, insane complexity.

1. OP article has nothing to do with JavaScript. 2. It's not like the JS community is anti-XML, most JS libs/frameworks still use HTML/XML markup for rendering. 3. The JS community is vast and diverse - generalisations around 'clueless implementations, insane complexity' don't make a lot of sense.

>1. OP article has nothing to do with JavaScript.

JSON is a format directly derived from JavaScript. The affinity for using JSON for things that have nothing to do with object serialization or simple data structures is characteristic of JS mentality.

>2. It's not like the JS community is anti-XML, most JS libs/frameworks still use HTML/XML markup for rendering.

Of course JS community is anti-XML. They don't use XML even when it makes sense to do so. And they use HTML only as a rendering layer, completely ignoring its other use (e.g. semantic document format).

Post reply on HN