Tuesday, February 11, 2014

Differences Between Rails And Django

As I launch into the world of Python/Django, I am going to be comparing and contrasting it to Ruby/Rails.  One significant difference is that in Rails you work on just one app.  When you work on Django, you create a project that contains multiple apps, and in fact, if you are smart, you can then reuse apps in different projects.  Of course, with great power comes great responsibility.  You will need to wire up the apps in the project.

Django puts what I consider controllers in an app's views.py file.  What I consider views are put in a template folder.  Both frameworks have template engines.  Rails uses embedded Ruby.  Django has a template engine that looks like embedded Python.  

From what I can see, Django does not have any scaffolding.  Strangely enough, I do not miss it.  I guess the frameworks reflect the philosophy of each language.  Ruby has multiple ways to do tasks and has many shortcuts.  In Python, you can only do a task one way, and that language seems to value clarity over shortcuts.  I have heard that packages might exist that allows scaffolding, but I would have to do some research.

I am sure I will be able to find more differences and similarities as I travel further down this path.

No comments:

Post a Comment