Hacker News new | ask | show | jobs
by orangechicken 5196 days ago
Nowhere was this implied. The article says that Rails makes excellent RESTful APIs. Of course your API should do validations, access control, etc. But, Rails doesn't have to do (much) of the HTML given client-side MVC/MVVM libraries like Backbone and KnockoutJS.

Leave the rendering of the app to the client. Leave the ins and outs of the data to the API (driven by Rails, Node/Express/Railway, Django, what-have-you).

That's definitely applicable to mobile and web apps.

2 comments

Right. I guess what I meant is that the backend is still responsible for everything it's always done except for generating HTML views. The rest still applies.
So, tell me again why we should be using HyperText Transfer Protocol for doing something that has nothing to do with transferring hypertext?

It would make more sense just to pipe JSON through IRC since it's much less verbose and was designed to be symmetrical (and session based) from the start.

>So, tell me again why we should be using HyperText Transfer Protocol for doing something that has nothing to do with transferring hypertext?

Because its the best option. When WebSockets what whatever socket protocol becomes ubiquitous you'll probably see less HTTP use.