4 ms·
I don't care about cool or cutting edge or even performance. I hate rails because it is built by people with no understanding of security. But most of all I ha
by tomjen3 14y ago
I don't care about cool or cutting edge or even performance. I hate rails because it is built by people with no understanding of security.
But most of all I hate it because it uses so much magic.
- rimantas 14y agoWhat makes you think RoR was built by people with no understanding of security? Rails was one of the first frameworks to do things right (CSRF protection comes to mind).
- batiste 14y agoI was looking for the date when RoR changed their templating so it always output sanitized content and I found this: http://stackoverflow.com/questions/698700/escaping-html-in-rails http://stackoverflow.com/questions/698700/escaping-html-in-r... Correct me if I am wrong but it seems to me that RoR still isn't shipped with a safe default? Edit: RoR added auto-escaping around February 2010, Django had it since November 2007 http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/ http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/ https://code.djangoproject.com/wiki/AutoEscaping?x=52&y=9 https://code.djangoproject.com/wiki/AutoEscaping?x=52&y=...
- grey-area 14y agoYou're wrong. It has auto-escaped since Rails 3. http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/ http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/
- rscale 14y agoRails changed the default to safe output about three years ago. 3.0 escaped output out of the gate, and 2.3 switched the default in the 2.3.6 neighborhood. Prior before that, the standard way to sanitize html output was to write <%= h foo %> instead of <%= foo %> in your templates.
- tomjen3 14y agoTheir (abuse) of the Yaml parser. It is one thing to use a potentially dangerous parser on a file that you aren't going to let anybody touch either (your database config); it is downright stupid to use a dangerous parser on untrused user input (json) a format it shouldn't even parse to begin with. And as of late tons of similar bugs have been found. CSRF and database parameterization was well known issues when Rails was written, so yeah props for that. It is just not enough anymore.
- danenania 14y agoWell, the magic is what enables the big productivity boost. It's a higher risk, higher reward approach. In some domains that added risk is unacceptable, but for many applications it's a very worthwhile tradeoff. I think often when people say "I hate rails", they are really saying, "I hate building the types of apps that rails excels at". Which is fine, and makes sense, because rails excels at making apps that can be very cool and innovative on the product side, but are usually pretty boring on the engineering side--it doesn't really get interesting for the engineers until it's time to start replacing the lower level tiers of rails with something else. And while secure best practices are certainly stressed (and included as defaults), conservatism isn't seen as a valid reason to hold up progress. So you get both the speed and the occasionally bumpy ride that strategy entails.
- entropy_ 14y agoThat has nothing to do with it whatsoever. They specified why they hate about rails, the magic. Personally, I simply cannot stand magic in frameworks I use. That's because I don't become truly productive when using a framework until I fully understand how everything works. It is not enough that it does work, I have to understand how it does. Otherwise, I'm constantly bogged down when implementing every single feature thinking about possible security and performance issues down the line. The performance thing might be premature optimisation in some cases, but the security definitely is not. That's why I hate when frameworks or IDEs have so much magic -- I'm looking at you Xcode, I can't count the times I was wondering if a particular statement would cause a memory leak or not before I finally understood most of the related magic Xcode and the toolchain for iOS dev do. For me at least, magic saps my productivity, it doesn't boost it. It also offers a steeper learning curve to proper mastery to get to that point where I'm actually productive. So yes, I haven't tried ruby on rails but I can definitely see myself hating it if it has too much magic.
- manojlds 14y agoI can somewhat relate to what you say, and that is perhaps why I prefer Django, as it has just the right amount of magic for me.
- 14y ago