SLUG Mailing List Archives
Re: [SLUG] django/rails
- To: david <david@xxxxxxxxxxxxx>
- Subject: Re: [SLUG] django/rails
- From: Daniel Bush <dlb.id.au@xxxxxxxxx>
- Date: Wed, 7 Oct 2009 13:34:22 +1100
- Cc: slug@xxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=qrYwcrV2bIhveB7OGoYhZWGwEhCWWKVrQ5wXVBaHXjY=; b=T+8q2RBFnSgV79ykZKNM6QF2106oASykwtyPLhdosYui7VViscfTkt4y/1uRrubODF xjrKKo5CvkwNnlj+Ch8NHxcBjmsq0t6r1aBp913ZnLWkvZjiTOyaxCRy19N9Bq8KibfX AbTP8aJwvF8tiTabDVd9OtLpK8B/rujK7q8E4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=IX2NDeA1Qt9etMGXQVLHH4hAFTM3boTJEfs5SshJ8EwW8UYjKYduL4mSTdBnkkhUE2 H5feHjCh/k7vwX/DxCzlUBkR+cLUgwYCjUP7/wBq96ebnpfHKCuLtu10ZKihZlRbZuuj kPpGQiD6MlRtq3frDztNIAxwsLGp+KJ++yGfQ=
I'd like to venture something but I can't really because I only know one
side of this - ruby/rails.
I think you could probably flip a coin and just go with one or the other.
It might come down to picking a language. If python grabs you, then django
is probably the way to go and vice versa. (If you like oop or iterators,
ruby is probably your thing :) ) Both languages run on jvm and probably
.net; I think jruby is maturing well from I what I've read (not done); don't
know about python.
That being said, I think rails has more recognition than django although
both are probably not considered even close to "mainstream" yet and are
likely to attract blank stares from grizzled verterans hunched in their
If I were looking at django based on rails I'd be looking at:
- testing: not only models but controllers and integration
(sessions,cookies, moving around); also integration with more behaviour
driven testing via rspec if you prefer that to TDD
- handling of test, development and production environments including the
- migrations - incrementally adding stuff like new columns etc
- authentication and other plugins like pagination etc
- models/orm - activerecord is nice (you've got get your head around:
associations, validations and callbacks - and it takes some time if you like
punching out sql) although it's easy to end up generating large wodges of
sql without you realising it
- templating/views; I like erb and how easy it is to print and/or execute
statements within a template; there are alternatives like haml which look
cool; I can't believe how clunky php is by comparison
- partials - rendering blobs of html within a template or other blob; this
is a nice way to organise your templating
- caching: page caching, fragment caching etc; so you can do expensive
things and not feel bad about how wasteful they are :)
- controllers: filters, sessions; subclassing controllers
- debugging: ability to debug a live controller/model; although I rarely
need to do this
2009/10/6 david <david@xxxxxxxxxxxxx>
> I'm reading up on both, trying to make an intelligent decision which to
> I'm agnostic about ruby/python, although I have a faint feeling that python
> may be better. In either case I have to learn the language.
> Does anyone care to venture an opinion? Flame war anyone?
> I've noted that Ruby has a DB migration facility which looks useful.
> <quote from article>
> There are two key advantages to Rails' incremental migrations compared with
> Django. First, Rails provides a standard mechanism for deploying new
> releases to already running production systems while preserving data. For
> example, if a database column's type is changed from char to integer, the
> accompanying Rails migration script would specify the steps required to move
> the data from the old char column to the new integer column. To perform
> similar operations in Django, the developer would need to write an ad-hoc
> SQL script.
> The second advantage is that, being easily rolled back, migrations
> encourage a certain amount of experimentation with the model classes and
> database schema. Certainly some experimentation with models is possible in
> Django, especially if the model code is kept under source code control, but
> as data is not preserved through such changes, it is less attractive unless
> there is a mechanism for quickly loading test data.
> At the time of writing, the Django development community is working toward
> introducing a schema evolution mechanism.
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html