Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] django/rails


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

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
database
- 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

etc etc


2009/10/6 david <david@xxxxxxxxxxxxx>

> I'm reading up on both, trying to make an intelligent decision which to
> use.
>
> 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?
>
> David
>
>
>
> PS:
> 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.
> </quote>
>
>
>
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>



-- 
Daniel Bush