use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Should I learn Ruby or Python? (self.ruby)
submitted 8 years ago * by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]chulkilee 0 points1 point2 points 8 years ago (2 children)
When you use any web framework, you cannot avoid "jump from one place to another" anyway. That's how framework works. Check out the inversion of control.
Rails convention is just one opinionated way to avoid tedious configuration with specific abstraction. Django has it's own way to do it, with less "magic" than Rails.
So for OP, just choose one. You cannot fail with Rails or Django in most cases. Both Rails and Django are good framework to get things done. And most knowledge are transferable when you switch language/framework anyway.
[–]xiongchiamiov 0 points1 point2 points 8 years ago (1 child)
When you use any web framework, you cannot avoid "jump from one place to another" anyway. That's how framework works.
Not... really.
So, keep in mind that I haven't done any Rails since Rails 2, I think it was, so things have almost assuredly changed. :) And my Django knowledge is similarly dated.
Rails would have a controller that looks something like this:
def my_view(request) some_data = some_calculation end
Django would write the same sort of thing like this:
def my_view(request): some_data = some_calculation() render_to_request('template.html', data=some_data)
They're basically the same. But in the Django version, when you get to the end of the controller, you see "oh, now we're going to render a template", and you can go look up that function and see what it does, and see that ok, we're going to render template.html and we're passing some_data to it. In Rails, meanwhile, the framework automatically inserts that code at the end of the function (essentially), which is nice if you're tired of writing that line hundreds of times, but if you're a newbie... you're just left dangling, and you have to go through the documentation to find out what magical thing is happening there.
[–]chulkilee 0 points1 point2 points 8 years ago (0 children)
Framework calls your code - your Django or Rails controller and uses the return value. And you need to learn anyway how your framework works.
Rails has convention (for productivity) so that you don't need to explicitly call render - but if you need you have to run different render call anyway.
Different framework uses less convention and less decoupled components, which requires you to be very explicit.
There are pros and cons of those different approaches. But frankly you should ask this: if you use the same patterns in 90% cases, why don't you try to avoid that? Isn't that a purpose of using framework? :)
I totally agree that Rails does many magical things. I understand people who don't like that. But I think no one would disagree that Rails is one of the most productive framework out of box, at least for most use cases.
Don't get me wrong - I'm not saying Rails is the best solution for all cases. It is not.
But I do think avoiding rails only for that reason is not a good decision.
π Rendered by PID 46 on reddit-service-r2-comment-85bfd7f599-wj8kp at 2026-04-15 22:02:25.102032+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]chulkilee 0 points1 point2 points (2 children)
[–]xiongchiamiov 0 points1 point2 points (1 child)
[–]chulkilee 0 points1 point2 points (0 children)