This should come at no surprise, although I don't see anyone criticizing Rails anywhere.
I've never written a line of Ruby, but trying to read Rails code evokes me all this: it seems like a framework created with the sole purpose of hiding everything possible from the programmer.
Conventions is something I try to avoid at all costs. Conventions are usually things that are hard to find in documentation. Conventions are things that every experienced user says that "oh, this is common knowledge" and conventions are the reason why things seem to work magically.
Obviously if you follow a framework from day 0 you don't even notice it. For newcomers, it's a source of frustration.
Frameworks should be designed for experts as well as newcomers. I was a Ruby-only developer and, after starting a full time Rails job, picked it up quickly enough.
That's not really what convention refers to here. Rails' motto "convention over configuration" simply means that boilerplate should be avoided, and that code should use sensible defaults whenever there isn't information.
For example, ActiveRecord class names map to table names through a simple pluralizer (UserProfile -> user_profiles). That's a convention, no configuration needed. Just write a class and off you go. You can override this behaviour, but you can also write huge apps that just follow the convention. Other frameworks would typically make this mapping explicit. You do need to read the documentation to see what the conventional behaviour is, but it's not very deep knowledge. It's not much worse than other frameworks, where you need to find how things are configured.
Your complaint is more about implicit vs. explicit. Implicit behavior is bad when it's surprising. When it's what you would have done anyway, then making it explicit creates an unthinking, tedious ceremony that you repeat daily.
Some of my favorite Rails devs are former Python devs. They appreciate conventions and the freedom they give you.
Rails has plenty of critics. You just aren't looking hard enough.
The most common criticisms are: it's slow and it has too much "magic." At the end of the day, it comes down to this: every framework has its pros and cons. When you use a framework, you gain certain benefits but sacrifice certain things and have to conform to the framework's opinions. In the case of Rails, the primary benefit is extremely fast prototyping. But that's only possible because the framework hides a lot of complexity from you, which can bite you in the ass if you try to go outside its conventions.
This. One fine example is Gitlab: It's full of features and does many nifty things. But it's painfully slow and the developers now have a hard time trying to fix this.
The slowness is not due to Rails. It is mainly due to us not scaling up the infrastructure team fast enough and now having problems with the file serving backend. We're working on it in https://gitlab.com/gitlab-com/operations/issues/42
Comments (438) 69 threads
Show all comments
Showing thread 34 of 69
I've never written a line of Ruby, but trying to read Rails code evokes me all this: it seems like a framework created with the sole purpose of hiding everything possible from the programmer.
Obviously if you follow a framework from day 0 you don't even notice it. For newcomers, it's a source of frustration.
For example, ActiveRecord class names map to table names through a simple pluralizer (UserProfile -> user_profiles). That's a convention, no configuration needed. Just write a class and off you go. You can override this behaviour, but you can also write huge apps that just follow the convention. Other frameworks would typically make this mapping explicit.
You do need to read the documentation to see what the conventional behaviour is, but it's not very deep knowledge. It's not much worse than other frameworks, where you need to find how things are configured.
Continue this thread — 10 replies
Continue this thread — 1 reply
Some of my favorite Rails devs are former Python devs. They appreciate conventions and the freedom they give you.
Continue this thread — 1 reply
The most common criticisms are: it's slow and it has too much "magic."
At the end of the day, it comes down to this: every framework has its pros and cons. When you use a framework, you gain certain benefits but sacrifice certain things and have to conform to the framework's opinions. In the case of Rails, the primary benefit is extremely fast prototyping. But that's only possible because the framework hides a lot of complexity from you, which can bite you in the ass if you try to go outside its conventions.
[1] https://gitlab.com/gitlab-org/gitlab-ce/issues?scope=all&sor...