Python/Django vs Ruby on Rails

Need help with programming? Feel free to ask anything. Answers are welcome as well!
  • Author
  • Message
Offline
User avatar

chickendude

Staff Member

Topic Starter

Python/Django vs Ruby on Rails

Post07 April 2015, 06:21

I remember NanoWar had a class or seminar or something on Ruby on Rails a while back and was impressed by it, i haven't touched Ruby or Python really, though i've been reading through Python 3 tutorials for the past couple weeks. I recently bought some webspace (a VPS) and got LAMP all set up and started writing a simple forum in PHP, but now i'd like to actually do something with the space. I've been thinking that i'd like to try to do some sort of language-learning thing for Basque, a mixture of different websites like Duolingo and lingvist.io. When i read that Duolingo was written mostly in Python, that seemed like a good excuse to learn it. But i'm still not really sure what's possible in each language or what the advantages and stuff are of each.

Is there some place where you can look at online samples?
Offline
User avatar

NanoWar

Site Admin

Re: Python/Django vs Ruby on Rails

Post07 April 2015, 16:45

The "new" web programming languages are really fun to work with. When I tried RoR it seemed very fast and agile to program. I am not sure if you can get it to work on your LAMP stack, though. You can make a forum with it in no time without doing it from scratch. Oh wait, I remember that you love to do that, starting from zero. With Ruby on Rails you have access to many gems out there.

Of course Ruby is just another programming language and RoR is where the web thing starts. Ruby -> RoR is like Python -> Django.

This was my gemfile back then, you can see all the different gems we used, some for testing only and some some just to try them out:
Code: Select all
source 'https://rubygems.org'

gem 'rails', '~> 3.2.12'
gem 'sqlite3', '1.3.7'
gem 'jquery-rails'
gem 'bootstrap-sass'
gem 'haml'
gem 'simple_form'
gem 'devise'
gem 'inherited_resources'
gem 'foreigner'
gem 'cancan'
gem 'rolify'
gem 'spork'
gem 'thin'

group :development do
  gem 'haml-rails'
  gem 'quiet_assets'
  gem 'better_errors'
  gem 'binding_of_caller'
end

group :development, :test do
  gem 'rspec-rails'
  gem 'faker'
  gem "factory_girl_rails"
end

group :test do
  gem 'capybara'
  gem 'spork'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  gem 'uglifier', '>= 1.0.3'
end

group :production do
  gem 'mysql2'
  gem 'exception_notification', '~> 2.6'
  gem 'therubyracer', '0.10.2'
end

group :deployment do
  gem 'capistrano'
  gem 'rvm-capistrano'
end


I also wanted to try out and compare Django to RoR, but I haven't found the time yet. Maybe you can? :D
Offline
User avatar

add

Re: Python/Django vs Ruby on Rails

Post07 April 2015, 22:07

Chickendude, you should have a signature mentioning "NIH" or Not Invented Here (and maybe so should I).
It essentially means you don't like using others work or in this case, love making things from scratch, even when there are perfectly good solutions already out there :-)

On Topic:
I've recently been hearing stuff like Ruby is a dying language, but well.. I dunno, I've been using lisp for a couple of years (read 4,5) and people have been saying it's a dying language for the past 30 or so years, so I wouldn't put too much thought into that.
Maybe you could look at Rosetta code or something..
Example from Rosetta code that I was looking at (but in another language): http://rosettacode.org/wiki/Mandelbrot_set#Ruby

I had a classmate who was really into Ruby, but I don't know much about Ruby on Rails.. sorry to say.
Offline
User avatar

chickendude

Staff Member

Topic Starter

Re: Python/Django vs Ruby on Rails

Post08 April 2015, 16:20

Heh, yeah i'm pretty satisfied with what i've done so far with the forum (i recently added markdown formatting in addition to bbcode, as markdown is much easier to type). Right now i'm still reading through the Python documentation and an online course so it might be a while, but perhaps you're right that it'd be worthwhile looking into both. At the very least i can share my thoughts when i start to play with Django some.

I haven't really gotten far enough to really get an idea what i can do with Python/Django, but some stuff, dictionaries in particular, seem like they'd be really useful in a language learning site. Ruby seems more web-oriented than Python, though looking through various (offline) scripts/projects online i see Python pop up more often than Ruby.

And i guess the charm of these (super) high-level languages is that you can get started working on more abstract stuff earlier, the gritty stuff has largely been taken care of by others. For example, i was thinking of writing a simple RSS feed parser as a practice project and saw there's a Python package called 'feedparser' which does pretty much everything for you. It might not be much fun and is probably a lot more overkill than i need, but i guess you can get stuff done more quickly. Though i don't care at all for prepackaged stuff like online forum software that takes away all the fun...

I've never learned a computer language to a useful state, so i suppose it's about time. Ruby and Python both seem like good choices to start.

And add, that does seem like a pretty good fit for me, or perhaps the "reinventing the wheel syndrome" :D For the TIs, i often like to write my own code so that i can release the whole thing in the Public Domain without worrying about other people's "give me credit" clauses and stuff. That and it's just more fun to know what everything does.

EDIT: I also hadn't thought about problems integrating Django/RoR with LAMP as i haven't tried either yet. Hopefully it'll be pretty straightforward.

Return to Programming Help

Who is online

Users browsing this forum: No registered users and 1 guest