6 ms·
It's become fashionable to hate on rails, and honestly I understand the motivation--it isn't cool and cutting edge anymore. It's slow. It doesn't do concurrency
by danenania 14y ago
It's become fashionable to hate on rails, and honestly I understand the motivation--it isn't cool and cutting edge anymore. It's slow. It doesn't do concurrency well. Ruby is nice for what it is, but it lacks the power and stability of functional languages, and lacks the performance of go or javascript on v8.
But rails is just doing what it's always done: trying to optimize developer productivity for front end web dev and routine web tasks. In this it's far ahead of the pack, and for many businesses, both small and large, this is exactly the right thing to optimize. Say what you want about github, but they push a lot of features and push them fast.
Rails is not for crafting algorithms, but when you need to crank out 6 new pages with various complex crud views and forms by Friday, and by the way can it be exportable to cvs and oh can you also do paypal and oauth integration and user avatars with thumbnails, and keep it all reasonably readable and organized... the sad fact is that for all of rails' heft and lack of cs cred, trying the above with any other framework after you know rails will drive you insane, because despite how great the language is or how many connections your server can handle, you are again and again spending days on things that take an hour in rails.
Ultimately, I don't think the way forward from rails is to search for a partial reimplementation of rails in some other language. Rails is the best we've got for rapid front end and shallow back end work. So use it for what it does well. For what it doesn't do well, use something else. Personally, I think it's silly to have an ORM written in ruby. ActiveRecord is for the most part a lovely api, but its guts should be a separate service written in go or something. Building a complex recommendation engine or game AI? Write clojure or haskell services. But when the data comes back and you need to dice it up and lay it out as html, with a hundred little ohs and ifs and buts, it's not a fun time without rails.
- eru 14y agoIntereting. Your arguments sound a lot like the usual arguments in favour of PHP.
- rtwtlkj 14y ago>>It's become fashionable to hate on rails, and honestly I understand the motivation Well, they were pretty vocal about calling everybody, in no uncertain terms, for using frameworks other than Rub/Rails, an idiot. There is plenty of bad will that they've been accumulating because of that and this is simply the backlash. If you really think you are the best there is no need to insult developers who do not use your frameworks. Unfortunately that is exactly what they did. People have long memories. And in my opinion they deserve every bit of it. The comment below by user mhartl demonstrates the attitude of pretending everybody else is shit. >>Ah, so following Greenspun's tenth rule [1], perhaps we >>have this: >> Any sufficiently complicated web application contains >> an ad hoc, informally specified, bug-ridden, slow >> implementation of half of Ruby on Rails. >>[1] http://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule http://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule The nerve to call other frameworks bug-ridden as if their shit didn't stink. Specially in light of all the security problems with Ruby/Rails that have come to light recently.
- tomjen3 14y agoI 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 ago
- sc0rb 14y agoAll that stuff by Friday... I can do that in Java / Spring. It will also be high performance, extendable and maintainable. Rails brought very little to the table in that respect. Not to people who actually know what they're doing anyway.
- jimbokun 14y agoAre you using the same Java/Spring I'm using? Would be nice to see some side by side code of Rails and Java/Spring doing roughly the same things, both written by people experienced in those technology stacks. These debates aren't very useful without code to look at.
- sc0rb 14y agoI'm sure Rails would be less code and quicker to production. That's not to say that it can't be done quickly in Spring - Java. The whole 15 min blog thing is a good example of fast Rails, it's also a good example of non production ready i.e. maintainable and extendable, rails.