Hacker News new | ask | show | jobs
by tptacek 5671 days ago
I thought the same thing after living with Rails in a shipping product for 2 years or so. We embraced Sinatra, which does away with all of your Rails concerns. Sinatra is still very popular; probably the most popular framework after Rails.

However, for my last several projects, I've been back in Rails and happy to be there. Once you understand why things work the way they do in Rails and stop trying to bend it to your own design, it turns out that they mostly got it right. It is, for instance, so much easier to code up preauth/postauth pages in Rails, or to implement permissioning.

2 comments

I looked into Sinatra, entirely at Thomas' suggestion. My experience after coding up a toy web application was that, if I wanted to build a non-toy application, I'd end up building a half-complete, undocumented, poorly tested version of Rails 1.0 prior to actually being able to work on the stuff people pay me money for.

It is a wonderful microframework if you want to either a) build a web framework because you want experience doing it or b) have some huge honking system which you just want to drizzle a bit of glue code onto and expose pretty much unmodified to HTTP.

Have you looked at Padrino? I recently experimented with it and was surprised that it was an extremely awesome middle ground, to the point where I'll probably use it for my next project. It's very fast, close to Rack and easy to use with Rack middleware, has Rails-style view helpers, has sinatra-style controllers, very simple and elegant mountable apps, a focus on DB agnosticism, among many other things
Question: Have you experience with it on heroku? Does it work well there? Any difference between its behavior and the "normal case" of RoR as far as what heroku is designed for to your knowledge?

(Like I've said, got nothing about ruby, just don't feel rails is a good fit for the stuff I do; something lighter weight like this could be a good substitue on heroku).

I haven't, but I know it works fine. Heroku is more of a Rack host than a Rails host, so any Rack-based framework (AFAIK, all Ruby frameworks at this point) run seamlessly on it.
Amusingly, I don't recommend Django even for first timers like the guy, however I'm not usually one of those people who answers a different question when asked, for the same sorts of criticisms in some areas as I have about rails. I like itty bitty frameworks usually. Sintra runs on Heroku, and will definitely be brought up before I hear about another project about to be backended there.

Honestly, I think Rails will give you a cleaner project with most groups of devs. There is a lot to be said for that. I think if you took a lot of people who are successful as rails devs, they'd struggle with the "having your own opinions are necessary" issues you have when you hit the open country of python webdev, and not perform as well. If the guy asking is just wanting to make something, I think RoR is a better material, cept it can't do some things. I think Django is a less good "base material" which many people will make an inferior product, but if you're highly competent, it's softer, less rigid structure allows you to be a better rapid developer rapidly dealing with changes to environment and project spec.

I, particularly speaking, happen to be a rapid developer of pretty complex systems. A long rails project is probably going to be a better system, and is almost DEFINITELY going to be a better hand me down from someone else, but a Django system will almost always allow a small change.

Rails is building a house of granite with no other materials. Django is using a bunch of softer stuff.