views:

601

answers:

13
+12  Q: 

Django OR Rails

I am an ASP.NET developer, but want to learn other frameworks/language (open source).

Django and Rails both seem promising, but I am confused which one I should choose to start, or whether I should choose some other framework.

I know learning the language (python or ruby) is a must before starting with Django or Rails.

+3  A: 

Doesn't really matter. Both languages have similar capabilities, both frameworks are fairly powerful. Python does have web frameworks other than Django though.

Ignacio Vazquez-Abrams
As does ruby (Sinatra, Camping).
vise
+5  A: 

Voting for Rails. Cause I tried both, and I liked Rails better...

Kevin Sylvestre
Why do you like rails better than django? I think it's worth writing that to share with everyone here.
jpartogi
Rails has a better community, better routing (especially in Rails 3), better tutorials (Rails Casts, Rails Dispatch, etc.), better syntax (Ruby is gorgeous), better extension architecture (GEM is incredible), easy installation (included in OS X Snow Leopard), better podcasts (Ruby 5, The Ruby Show, Rails Podcast), better hosting (Heroku), and finally a better image. These are my personal opinions (and I'm sure many will disagree).
Kevin Sylvestre
better tutorials? I learned pretty much everything from the intro tutorial. Better community? Thats rubbish, there's alot of nice django guys here. Better extensions? You tried downloading 'app's and plugging them in? Its very simple. Easy installation? I think django was very, VERY simple to install. Hosting? webfaction!
dotty
@dotty Have you tried both? I know that Django is excellent compared to most web development stacks, but I really found anything close to the quality of blogs, podcasts, and video tutorials devoted to Rails. Take a look through some of the Rails Casts (http://railscasts.com/) and if you know of a better Django service I would love to hear about it. Also, easy installation is never as good as no-installation (as with Rails and OS X). For hosting, I can deploy applications online in under a minute (from scratch) using Heroku.
Kevin Sylvestre
One thing I really like about python vs ruby in general is python's pip and easy_install. Compared to the ruby gem system, python packages are far easier to use and install on pretty much every platform. One thing that irks me about ruby is using gems. It always seems like gems are broken by default on every major OS out there, and require some hacking / googling to fix. Python packages just work out of the box.
b14ck
+11  A: 

Try Django, is very simple, easy to learn, very powerful and has a very useful administration interface, which has no Rails. :)

eos87
+7  A: 

Try both--work on a simple tutorial for each, and I'm sure you'll find that you enjoyed one over the other afterwards.

mportiz08
+5  A: 

I prefer the control you get with django. But rails seems to have a larger and extremely active community as well as more deployment options. You have to decide what is more important to you.

Jason Webb
+2  A: 

Having just come from railsconf, I can at least say that the Rails community really does go above and beyond.

John Dyer
What is it that they go above and beyond? Please elaborate? How different is it compared to the django community?
jpartogi
I couldn't really say how it is different or better then the Django community, as I am not part of it. But I can say that the ruby/rails community has been nothing but fantastic since I started developing with rails.
John Dyer
+4  A: 

Django. Easy and fun

Radhakrishna Bhat
+21  A: 

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).

vdboor
This is a beautiful summary of the matter. A+.
Andres Jaan Tack
You rarely use scaffolding in real application. But django generic views is often used.
jpartogi
+3  A: 

I'm ASP.NET developer that moved to Django some time ago. I'm really happy about my decision and choose of Django framework. As other guys say there are no huge differeneces in capabilities of both frameworks (django has nice admin panel, RoR has built-in migration system). At the end of the day they have simillar ammount of pros/cons in my opinion.

I advice you to do tutorial of both and decide which language suits you best (python or ruby).

Lukasz Dziedzia
There is a great migration system for Django also called South. It can be installed via easy_install and you just need to add "south" to your INSTALLED_APPS. It works very well, and is similar to Rails' migrations in a lot of ways.
Matthew J Morrison
Yeah, I know! I use it and it's really good. I just wrote that there is no built-in migration system. You may ask what is the difference? In my opinion South has quite unstable API, it's changing a little every release recently.
Lukasz Dziedzia
+1  A: 

I've worked with both. In my experience Python/Django has a bit of an edge in execution speed and memory usage. This seems to make a meaningful difference in larger applications.

I much prefer the way migrations are handled in Rails.

Jdxdiego
A: 

Django, it's a finished piece of software.

dotty
There's no such thing as "a finished piece of software" (particularly in the world of open source).
Dominic Rodger
+1  A: 

As an alternative you should also have a look at Grails. My top feature of Grails is the creation of a database schema based on you model classes. No more SQL.

For speed, Grails runs in the JVM and you can employ pure Java code whenever you feel the need for extra performance. Like Rails many convention based techniques feel like magic and need a little getting used but compensate the learning curve by boosting your productivity.

OliverS
A: 

You shouldn't be asking which framework you should start learning. Frameworks are very good reflections of the languages they are built in. Hence first you should learn either python or ruby.

"Python vs Ruby" is just another holy war theme, but IMHO it's useless as "Vi vs Emacs". Long story short - try both and see which language fits your mindset best. Once you start mastering the language, the framework will seem more natural to you because you'll be acquainted with the language it is written in, hence knowing why's and how's of the framework itself.

Eimantas