I've just started learning Django, after reading the python tutorial in a few evenings. Things I've noticed:
- In a sunday afternoon, I've managed to create two fully functional list/add pages.
- My code was already pretty short, and could even get more shorter in a few revisions.
- The views API, template language and ORM really allows you to speed up.
- It felt like flying! There is a truth in this one: http://xkcd.com/353/ :D
My take on Django vs Rails, based on what I've read so far:
- In Python, things are more explicit. Using just notepad, you can still tell where a function is imported from.
- Rails will magically create methods on demand when you try to invoke them (e.g.
find_by_...
methods). Avoiding useless method programming, while requiring some more knowledge.
- Django additionally increases productivity by offering generic views (think them as base classes).
- Rails additionally increases productivity by offering scaffolding (generating code).
- Django requires to you specify your model explicity.
- Rails can extract your model at runtime from your database schema.
- Django had performance in mind from day 1.
- In Rails programmer productivity is seen as more important.
This is where IMHO the difference between Rails and Django imho really boils down to: Rails does things "by convention". Django requires you be a little more explicit, which in return allows the framework to perform better. Which one you'll like, depends pretty much on what kind of programmer you are. I'm obviously a Python/Django guy ;)
Both allow you to start a development server directly (like VS offers for .NET). Both allow FastCGI for hosting (like IIS app pools), can be run on the JVM (JRuby, Jython) and both have a specialized solutions for running an app pool (mod_wsgi
in case of Django, mod_rails
in case of Rails).