Hacker News new | comments | ask | show | jobs | submit login

I just returned to Rails after a brief stint with Django. I was working on a stackoverflow-ish site and wanted to make use of an existing OS project if possible. Django has OSQA, and Rails has Shapado. Shapado would've naturally been the better choice for me, but they use MongoDB and at the time I started the project, I questioned the wisdom of that decision. Learning Django (since I already know python) and using OSQA seemed like the better option, as it would allow me to use my beloved PostgreSQL.

Bias warning...I've used Rails for far too long now, so it's very familiar to me and I'm comfortable with it. That said, here's the heavily opinionated and subjective reasons why I'm back:

* urls.py - the python regular expression syntax makes your route definitions very ugly as they grow. I find Rails' route DSL much more intuitive.

* Lack of model-level validation - OSQA uses Form objects to validate models rather than letting the models validate themselves (as Rails does). In OSQA, the Form objects are rather heavily bound to the UI interaction, so if you need to create models outside of the web app itself (I did) it gets painful. I kept having to hack these form objects to get them to validate properly. I've been told that Django now provides model-level validation, but OSQA doesn't use them (for now).

* ORM - I find ActiveRecord to be a much cleaner and intuitive ORM.

* Django's template language - I don't work with designers, so I don't need to be hobbled by a template language that is limited by design. I know you can use other template engines, but I was working with what OSQA provided, so I was stuck.

* Community - the Rails community in general is more active.

* Language preference - at the end of the day, Ruby just feels more natural and clean to me. You could attribute this to familiarity, but I actually knew python long before I knew ruby. I do like python, but tend to "think" in ruby.

I re-assessed my progress after a month and realized I was just not reaching the same level of productivity I was used to. I decided to switch course and learn MongoDB, which was probably the decision I should've made to begin with, and my productivity instantly improved. I was able to move the features I'd created in Django over within a few nights of focused effort, and I couldn't be happier with Shapado (and, surprisingly, mongodb).

This is simply my experience. If it were a completely new project, my experience might've been different. YMMV.




With regards to urls.py, I would greatly recommend using surlex. It makes it much nicer and much more readable.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: