Live data from Hacker News

Rails is just an API

blog.alexmaccaw.com

1–10 of 114 posts

Re: Rails is just an API

#2
The cherry on top is just coffescript and the new sourcemaps functionality coming from browsers.

Even if you prefer vanilla javascript, still is an awesome combo.

Re: Rails is just an API

#3
One thing I find interesting is the balance of the Rails model and the Backbone model. On a new project, I generally have fat Rails models and skinny Backbone models. On legacy projects, I put most of the logic into Backbone (since I'd rather not tamper with a legacy backend) making liberal use of parse() and toJSON() in order to get the model the way I want to use it.

Rails/Backbone will work well for the time being but I wonder which way the balance will swing? Will we have fat Rails models or fat Backbone models? If it is a fat Backbone model, then maybe direct database queries is the solution, cutting out Rails entirely. CouchDB and others already support this and could make it even simpler in the future.

Re: Rails is just an API

#5
Nice article... very timely and fits in with my perception of where I'm headed with my own Rails development.

I usually just go with wherever the Rails team is taking the framework. For some legacy sites, I may stick with wherever they're headed.

For new projects, I really view Rails as just the web api that feeds my Backbone framework.

Re: Rails is just an API

#6
The caveats in moving state to the client is that it's a huge perceptual shift for developers, with a steep learning curve.

From my perspective we're coming full circle back to client/server desktop apps... only instead of C++, we're doing it with js inside a browser container... I've done ActiveX controls and Flash components... It's not that much of a stretch.

Re: Rails is just an API

#7
post #4

This is how I feel about Flask. I've been using it with Backbone.js and they make a great combo: Flask API serving JSON, and the rest of the logic on the client.

You might find these demoes of Flask with pjax interesting then:

http://flaskpjax.herokuapp.com/automobiles

https://bitbucket.org/a2c/pjax_flask/overview

Re: Rails is just an API

#10
post #6

The caveats in moving state to the client is that it's a huge perceptual shift for developers, with a steep learning curve. From my perspective we're coming full circle back to client/server desktop apps... only instead of C++, we're doing it with js inside a browser container... I've done ActiveX controls and Flash components... It's not that much of a stretch.

We're also taxing browsers more, while simultaneously trying to run on less-powered devices. It almost defeats the point of a thin client.
Post reply on HN