Live data from Hacker News

How to build cross-platform mobile apps with JSON

medium.freecodecamp.com

21–30 of 43 posts

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

#23

Earlier quoted context omitted.

can you elaborate on s-expressions?

Sure. S-expressions[1] are a notation for nested data structures. They can be used to spell out data as well as code. In fact both code and data look the same when expressed using s-expressions.[2] When the article's author describes both code and data using JSON, it sounds a little strange to me. While JSON is capable to describing nested data structures, JSON's syntax is much more verbose than s-expressions. I feel…

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]]]

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

#25

If it can be done in JSON it can also be done in YAML. I pick YAML.

Have you read the specs for both? You should read the JSON spec. It will take you ten minutes. The YAML spec (http://yaml.org/spec/1.2/spec.html) may take you a little longer. . .

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

#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.

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

#27

I've seen so many projects like this over the years that claim that they're the one that will allow for true cross platform app development, and they've developed a simple abstraction for doing so. I've never seen any succeed at anything more than the most basic apps. I put more stock in projects like Xamarin or MOE (and even they aren't perfect).

I understand the sentiment, which is why I approached Jasonette with some curiosity mixed with scepticism... which I quickly turned into obsession!

The platform is incredible and I've been able to build a complex app in no time at all. Give it a try, you'll be surprised. I'm in the Slack room too if you need trouble shooting.

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

#28
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.

Except XML has no evaluation rules and no semantics. It allows you to build languages that can be processed by third-party tools, which then give a precise meaning: for example, SVG expressions are written in XML, but the meaning is not expressed in XML.

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

#29
post #9

So why JSON of all things? When I reached the "write a full declarative program in JSON" section I was internally screaming "but s-expressions!"

Same thinking, I expect, that gave us XSLT.

Using JSON seems far more pragmatic than the mindset that gave birth to XSLT, so I don't really see the connection.

JSON is widely used and understood, easy to parse and serialise to, and fundamentally simpler than most alternatives.

You could argue that S-expressions are 'simpler' than JSON, but they didn't take off, for whatever reason - I'm not going to go into opinions on why I think that is, because that never tends to go well on HN :)

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

#30

If it can be done in JSON it can also be done in YAML. I pick YAML.

If the idea is to reduce verbosity, I'd much prefer CSON. YAML just has way too much "magic" parsing behavior.

Not bad, a second close just behind YAML in my picks.

Nothing can beat this:

    name: Taylor Swift
Absolutely nothing, no matter how you dress it.
Post reply on HN