Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rails is "heavy" because it does a lot of things that you'll end up having to recode by hand with any other "lighter" solution.


Not so much recode by hand as actively choose components that provide the functionality. Sure, you might have to recode a bit of the between-components wiring if the separate components you choose don't natively support each other, but its hardly as if you'll generally have to recode the major components themselves.

Sure, Sinatra doesn't come with ActiveRecord like Rails does, but you can use ActiveRecord on its own with Sinatra -- or use Sequel or DataMapper or whatever other ORM [or non-ORM persistence solution] you prefer -- with Sinatra, you don't have to code your own by hand. Similarly with other components.


Sure. If you're building a traditional web app. The sort of web app Rails is good at. But if you are constructing an api, you can use ligher and alternate technologies that will get the job done faster and better.


Like what? Rails is great for APIs, because APIs, especially RESTful and Hypermedia APIs, can literally be a standard webapp with JSON views instead of HTML.

I've never built a SOAP API in Ruby, so maybe Rails wouldn't work with that very well. XML-RPC might also be a little tough, but I honestly can't think of any significant difference between a "traditional web app" and a RESTful API. They're a perfect example of code reuse in MVC (or Model2 if you want to be pedantic).



People keep repeating that like it's some commercial gimmick, but what does it really mean? How is Rails or rails-api not suited for APIs? What's lightweight? What's easy?

And more particularly since you seem to know about this, what other option would you favor?


Well Sinatra seems pretty nice. I'm a node.js developer so I use Restify and Express. But I practically build api's exclusively. I've spent a lot of time cleaning up after terrible Rails applications. Replacing bits that are too slow or difficult to maintain with smaller more nimble node applications.


"what does it really mean?"

It means he's a node troll. They take a shot at the dominant frameworks any chance they can get. Node trolls have reached the level of obnoxious arrogance that early Rails developers were once mocked for. Don't feed the trolls.


It's about using the right tool for the job. Most developers never seem to understand that. Everyone seems to want the same magic bullet for everything.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: