Hacker News new | ask | show | jobs
by danieldon 5662 days ago
How is Django not dramatically more opinionated? It is, we all know it and we know that it's a virtue in that it produces consistent, readable code code. Why are you trying to pretend otherwise?

With Django, there's a whole philosophy behind the right way to do templates. There's a whole explicitly written philosophy behind the specific coding conventions. Whole sections of the framework still assume you are using SQL, ideally Postgres.

Meanwhile, Rails 3 doesn't just support, it increasingly encourages doing things however you want to. Not only that, the community accepts it. Try to use anything but Django templates in your Django project and you'll likely get strong resistence from others on your team or someone who picks up the project after you.

    I'd still go python over ruby, cause I'll take libraries
I use both Ruby and Python for web development and, frankly, this is utter nonsense. Even in situations where there is a larger quantity of libraries, such as template engines again, it doesn't translate to greater breadth of viable options since the widely used Python templating engines are mostly variations on the same theme. There is no widespread adoption of something like Haml because, again, the Python community is opinionated. There are good reasons for this, but if you like a template language like Haml and work on anything other than personal projects, you are SOL.

In general, there are far more situations when using Python for web development where I'm pining for a Ruby library than vice-versa. Thankfully some, like Sass and Chef, don't require that the project itself is in Ruby.

1 comments

What happens when you do a django template "your way" or "they way we can do it in 2 hours instead of 12"? What happens with the same thing in a Rails project?

People may dislike that you did it, but you still CAN. That's the difference. With Ruby on Rails, you can't necessarily due it without the wheels coming off.

>I'd still go python over ruby, cause I'll take libraries

This is a comment about the non-web components of the language.

>how is Django not dramatically more opinionated?

The Django community is perhaps more opinionated. The actual software isn't. That's the issue with Rails. The actual software has strong opinions (aka, intentional inflexibility) baked into it. I honestly wouldn't pick Django either (preferring even less strict frameworks), but the OP asked a question X or Y, and I told him of those two I feel is better.

    What happens when you do a django template "your way" 
    or "they way we can do it in 2 hours instead of 12"?
I've worked on a lot of projects and can't imagine the situation where you'd have this kind of a variation in time to create two remotely similar versions of a template. If you are talking about a fully designed template + CSS + JS, then you could possibly get up to 12 hours, but there would be no way to shorten that to 2 hours without doing something completely different.

    This is a comment about the non-web components of the 
    language.
And this entire discussion is about web development. The OP, who already knows multiple non-web-centric languages, asked specifically about web frameworks.

    The Django community is perhaps more opinionated. The 
    actual software isn't.
Depends on what you mean by the software. The framework overall is very opinionated, even if you can use parts of it in a modular way.

    The actual software has strong opinions (aka, 
    intentional inflexibility)
Let me take the opportunity to give you a heads up that Rails 3 has been out for months now and is widely used in production. One of the most significant design goals of Rails 3 was intentional flexibility.
>Depends on what you mean by the software. The framework overall is very opinionated, even if you can use parts of it in a modular way.

Also, Django is WSGI. WSGI is very easy to add layers to to get the job done. (Side note, does everyone pronounce that Wizz Gee in your part of town? They sure as hell do in Atlanta and it slightly confuses me every time I hear it in conversation but can't figure out they're saying WSGI).

You're thinking web apps. Think "apps that have some views which are to the web, but most data feeds for other services" and you'll be in the zone were in. Json and Xml feeds and the like.