Live data from Hacker News

Thoughts about Rails from a Django guy

lenni.info

1–10 of 42 posts

Re: Thoughts about Rails from a Django guy

#2
there are drop in admin options for rails similar to what django provides as well as a i massive number of templating engines including ones like liquid which address the concerns in the article.

as a general rule, i think you should probably do more than 1 simple project before evaluating any framework or language.

Re: Thoughts about Rails from a Django guy

#3

there are drop in admin options for rails similar to what django provides as well as a i massive number of templating engines including ones like liquid which address the concerns in the article. as a general rule, i think you should probably do more than 1 simple project before evaluating any framework or language.

As a pretty novice programmer who is trying out Rails for the first time after learning to code with Python and Django, I really enjoyed this. Sure, there may be ways around all of the issues he mentioned, but I think that his initial observations are pretty much right on.

Re: Thoughts about Rails from a Django guy

#4
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

#5
Just like Rails has some drop-in "fixes" (i.e. the admin) that don't come with the core, Django does as well.

Dependency management: pip requirements files. Migrations (which the author doesn't like, but are pretty useful on a non-trivial project): South Various other goodies: django-extensions

There are constant debates over whether XYZ should be in the core (see: South), or at least better discoverable, but if you're going to use a framework seriously it's worth it to evaluate as "framework + its stable and commonly accepted extras".

Re: Thoughts about Rails from a Django guy

#6
The difference between ActiveRecord and Django models, is ActiveRecord reads the schema. When you're developing, having an ORM create tables and add colums willy nilly is fine.

DataMapper took this approach initially, and was basically unusable in production because all it could do was create and drop tables. They've since added a handy upgrade method, and even ActiveRecord style migrations.

Personally, I like keeping the model and schema separate. I rarely need a giant list of columns at the top of my model. Luckily, Rails 3 will work great with DataMapper or Sequel (two fine alternatives to AR) if that's how you want to roll.

Re: Thoughts about Rails from a Django guy

#8

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 do…

> 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

#9

    I subscribe to the view that the template language is
    for designers and should only allow safe constructs.
As someone who does both design and programming, I hate template systems that do this with a passion. I don't want to have to learn another language just so I can write templates. Especially when that language makes me jump through hoops to do various simple tasks the designers didn't anticipate--which is the case with every such language I've used.

Erb is one of the nicer templating systems I've used. I've never had any trouble getting it to do exactly what I want it to do, and I've never had it behave in a way I didn't expect--which is another advantage to having it just use Ruby.

It doesn't have anything on Haml, though.

Re: Thoughts about Rails from a Django guy

#10
post #9

I subscribe to the view that the template language is for designers and should only allow safe constructs. As someone who does both design and programming, I hate template systems that do this with a passion. I don't want to have to learn another language just so I can write templates. Especially when that language makes me jump through hoops to do various simple tasks the designers didn't anticipate--which is the ca…

I wrote something, better described as an attribute language, that fits the idea of a 'template language is for designers' called RuHL. http://docs.stonean.com/page/ruhl
Post reply on HN