r/programming • • Mar 18 '14

AngularJS 2.0

http://blog.angularjs.org/2014/03/angular-20.html
213 Upvotes

71 comments sorted by

View all comments

Show parent comments

-12

u/passwordissame Mar 18 '14

I hope you heard of semantic markup. And give me one crawler/search engine of JSON resources. I give you few search engines of HTML resources: google.com bing.com duckduckgo.com

9

u/nick_giudici Mar 18 '14

Wow, you are being very immature about this. Are you actually insulted that someone doesn't like html/xml as much as you?

I know about semantic markup but you failed to address the other issues that I talked about with xml and html in general. Also, the industry has spoken and is moving away from having web services returning directly displayable markup. Here's what I was able to lookup for you.

My search: https://www.google.com/search?q=json+vs+xml+web+services

Top 3 hits:

http://digitalbazaar.com/2010/11/22/json-vs-xml/ (tl;dr: Use Json)

http://stackoverflow.com/questions/2636245/choosing-between-json-and-xml (Top rated answer "JSON for web services answering in-browser callbacks, and XML for, well, XML for when, well, hmmm. :-)")

http://www.seguetech.com/blog/2013/04/01/xml-vs-json-web-services-best-choice (tl;dr: Use Json)

Json is smaller, parses much faster with less client cpu usage (great for mobile), you don't have to use xpath which is slow as hell and completely outside the natural paradigms of most languages, and has less edge cases where it fails like empty or single element arrays.

-12

u/passwordissame Mar 18 '14 edited Mar 18 '14

Since you seem to be up for learning, please do:

If you like video tutorials:

Just because mac osx ruby node.js mongodb shit fucks go batshit cray about JSON web scale yolo fest, you don't have to be sold on them. Please use angularjs yeoman bower gruntfiles.

5

u/nick_giudici Mar 18 '14

REST is format agnostic. I have implemented many REST services that allow for both JSON and XML responses. They even use HATEOAS in both!

<order>
   <finalize>http://host/finalizeUrl</finalize>
</order>


{"order" : {"finalize" : "http://host/finalizeUrl"}}

Hey look at that, I can put hypermedia into a document as the engine of application state no matter if I'm using JSON or XML!

As a side note, in our tests parsing the xml and accessing the data through xpath was 10 times greater cpu load than parsing and access of json.

Even your rage is nonsense. osx is just a 15 year old BSD distro. Not exactly cutting edge, ruby and node are direct competitors, and none of these have ANYTHING to do with the choice between json and xml.

0

u/passwordissame Mar 18 '14

yes, I agree. JSON all the way.