News for hackers. Stuff that matters.
Re:Thoughts about Rails from a Django guy by micaelwidell on Sunday July 25, 2010 @12:06PM (#1545747)
About two years ago I tried a lot of different frameworks and languages to find which one would suit me best. After having tried various PHP frameworks, J2EE, Perl I arrived at Django/Python. The plan was to continue on to Rails after Django, but I loved Django so much that I couldn't imagine that Rails could be any better. Seems like I was right ;)

Like the author, I too think Django's default directory structure doesn't work very well once you start doing bigger projects. But luckily, everything is so loosely coupled that you can change the directory structure entirely without too much work.

Re:Thoughts about Rails from a Django guy by jules on Sunday July 25, 2010 @05:28PM (#1546394)
As somebody who has used both Rails and Django commercially I can safely say that I prefer Rails over Django even though I like Python more as a language.

This guy marks several advantages of Rails as weaknesses.

Migrations for example. In Django you have to migrate manually, or lose data. Lack of migrations is not an advantage.

Templates. The Django template language is one of the worst in existence. It is utterly inflexible and hard to use. It is slowly getting better: now you can use `if a == b` instead of `ifequal a b`. Why not go all the way to a usable and powerful template language?!

Re:Thoughts about Rails from a Django guy by bad_user on Sunday July 25, 2010 @06:20PM (#1546492)
> As somebody who has used both Rails and Django commercially ... In Django you have to migrate manually, or lose data

If you've been using Django "commercially", then how come you haven't heard of South? ... http://south.aeracode.org/

Everybody in the community that wants migrations is using it.

> Why not go all the way to a usable and powerful template language?!

In Django components are more decoupled than in Rails. You can replace that templating engine.

Also, Django's templating system is really not that inflexible or hard to use ... quite the contrary, it comes with many things out-of-the-box that aren't standardly provided by other web frameworks ... like the ability to cache page fragments.

Re:Thoughts about Rails from a Django guy by jules on Sunday July 25, 2010 @06:48PM (#1546534)
Of course those are valid points but we are comparing default feature sets here. Otherwise Rails has a crippled template language, database generated from model and automatic admin too.

Have you actually used Rails? Rails has fragment caching built in and you can use a different template engine very easily (just install the engine xyz you want to use and write templates with extension .xyz instead of .erb)

Re:Thoughts about Rails from a Django guy by catch23 on Sunday July 25, 2010 @08:46PM (#1546727)
It's kind of odd that the default subsystems that come with Django are always replaced with something else -- why doesn't Django include some sane defaults instead?
Re:Thoughts about Rails from a Django guy by bad_user on Monday July 26, 2010 @04:47AM (#1547487)
This implies that Rails has "sane defaults".

From my experience that's hardly the case ... ActiveRecord (pre 3.0 at least) sucks big monkey balls compared to Django's ORM. And Rails also doesn't have anything like the forms API in Django.

Re:Thoughts about Rails from a Django guy by jonknee on Sunday July 25, 2010 @12:16PM (#1545762)
> Like the author, I too think Django's default directory structure doesn't work very well once you start doing bigger projects. But luckily, everything is so loosely coupled that you can change the directory structure entirely without too much work.

Some of it doesn't even work well for small projects--the first thing I do after ./manage.py startproject is change around settings.py so I can have local settings (namely db stuff) and not have to change things around when I push it to a server.

Re:Thoughts about Rails from a Django guy by limist on Sunday July 25, 2010 @02:02PM (#1545980)
For useful, non-trivial directory structure examples for Django projects, be sure to see the Pinax project:

http://pinaxproject.com/

Pinax comes with quite a few example projects using a common directory structure, which is very well thought-out, separating media, reusable apps, common templates, etc.

Re:Thoughts about Rails from a Django guy by cdr on Sunday July 25, 2010 @03:40PM (#1546165)