3 ms·
If you're going to do API only apps then there are much better alternatives than Rails. Rails is heavy. It's like using a cruise ship to navigate a small creek.
by coenhyde 14y ago
If you're going to do API only apps then there are much better alternatives than Rails. Rails is heavy. It's like using a cruise ship to navigate a small creek.
- VeejayRampay 14y agoRails is "heavy" because it does a lot of things that you'll end up having to recode by hand with any other "lighter" solution.
- coenhyde 14y agoSure. 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.
- VeejayRampay 14y agoPeople 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?
- coenhyde 14y agoWell 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.
- grabastic 14y ago"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.
- coenhyde 14y agoIt'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.
- uxp 14y agoLike 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).
- hosh 14y agoCheck out https://github.com/intermodal/intermodal https://github.com/intermodal/intermodal
- dragonwriter 14y agoNot 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.