Hacker News new | past | comments | ask | show | jobs | submit login

Yes, "the magic" is usually the way it's summarized. Everything is expected to be done exactly their way. Your code is interpreted and modified by Rails to fit its pre-conceptions and assumptions about your program. Neither the framework itself nor the support structure around it are forgiving if you deviate, no matter how justified the rationale.

One of the most prominent examples I remember is developing a form and explicitly setting the form's method in the Rails code, of course precisely according to the documentation because we know how picky it is. However, because of some minor detail in the content of the form (which I unfortunately don't remember specifically), I found that the Rails JavaScript was overriding me and dynamically changing the form's method when the form was submitted. I had to hack in the middle there to subvert that event.

It took forever to track that down, something that should've been so basic and simple. This is exactly the kind of anti-feature that developers resent: it's supposedly there to make things "easy" by assuming you meant something, when you've taken pains to say that you did not in fact mean that because you assume it's going to assume you meant that. When you complain, the Rails community blames you for not believing in magic hard enough.

That's emblematic of the entire Rails experience; it's just one example among many. We all know that any moderately-complex program is going to have unique requirements and want to do things that are a little out of the ordinary; if it didn't, you'd just be using something pre-built like Wordpress.

When you get to that point, you're going to be tearing your hair out and fighting Rails the whole way, as it insists that no, you didn't mean that when you explicitly defined it in the place the docs say to explicitly define it; you clearly meant the thing that Rails says you meant.

It'd be one thing if this type of behavior was acknowledged and respected as a bug, but it's not. The response you get is usually along the lines of "Well, why were you trying to disobey Daddy Rails? You are a very naughty coder. DHH could surely beat you in a street race, and you probably haven't even read REWORK." The Rails community is a cargo cult.

Rails is not to be introspected or customized. It is only to be appreciated and praised. After all, you are not as successful as 37Signals, are you?

And don't you like magic? Are you not entertained? Magic won't work if you change all the stuff. Don't ruin the magic! The great visionary DHH has come down with the visions of what web applications should be. Do not defy him.

They try to cover all of this up by saying that they believe in "convention over configuration". This means that if you question Rails, for any reason, you will be punished for your insolence. They truly despise heretics.

That's not how frameworks are supposed to work! I sometimes don't even like calling Rails a framework because it's so rigid. Frameworks are supposed to give users the tools and flexibility they need and then get out of the way.

If I feel like I'm writing Ruby (or whatever the base language is) and the framework is just helping me get that code onto the web (or provide whatever the framework's function is), then I'm happy. If I feel like I have to write in a special framework-specific dialect, then it's not a framework; it's a platform, and I'm writing a plugin for it.

I think this revulsion from big-magic black box "frameworks" like Rails and CakePHP led to the rise of "microframeworks", or "semi-reasonable ways to put code behind a web site", as normal people call them. ;)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: