Live data from Hacker News

Ask HN: Where is the Django community?

news.ycombinator.com

141–150 of 167 posts

Re: Ask HN: Where is the Django community?

#141

Earlier quoted context omitted.

As someone who's been using Django since the magic removal branch, its documentation is top notch, not to mention the lack of magic makes it very usable, supportable, and build-able on. I can say definitely what's going on from the top layer to the bottom layer without any black box behaviour. Rails is full of sloppy coding, lots of magic, coders who think that return is an keyword, and bad practices. I have no probl…

Return is absolutely a keyword in Ruby: http://www.ruby-doc.org/docs/keywords/1.9/files/keywords_rb....

Its a keyword, but its not needed (as its not needed in many modern languages) but many rubyists I've worked with said that it was a nice feature that the return keyword was unnecessary and did not use it.

Re: Ask HN: Where is the Django community?

#142

The best book I've found for picking up rails was the latest edition of the Agile Web Development book, which I actually own 3 different editions of it, for differing versions of rails. The lack of a Django book, probably has more to do with the fact of the community being more focused on tutorials and Blogs rather than cashing in, although there are a few django books out there. That said with the documentation and…

There is a Django book.

Re: Ask HN: Where is the Django community?

#143
I worked for four years in my startup in which we decided to go with django; four years ago RoR (v1.2.3) and django(0.97) were almost at par. Even though RoR had a slightly bigger community, django was clearly emerging as a leader. Both were equally good but we went for django because it had better performance, the explicit style seemed better than the inflexible conventions approach, Python's one-clear-way-of-solving syntax seemed better suited for teams and django's performance was certainly better than RoR.

Fast-forwarding four years and coming to 2011 with django 1.3 and Rails 3.0: I happened to work in another team to build a product in RoR from scrach. I was blown away by what Rails community has achieved while django is lagging behind a lot and is least likely to catch up.

Here are a few highlights:

* As a generic statement, to achieve anything in RoR, usually there is one clear and simple way of doing it. On the other hand in django you can do in many ways and most of the programmers have their own preferable ways. This is ironic considering Python endorses the very same principle but Ruby has a flexible syntax to cater different styles.

* In RoR, you can find a gem for almost anything. Plugging gem in your app is usually extremely simple. On the other, comparatively there are very few usable django apps and integrating them in your django project usually turns out to be painful. * Resolving and maintaining gem dependencies across the team is a piece of cake with bundler. However when it comes to django, I couldn't find a good tool. There is virtualenv but I couldn't find it comparable with the power of bundler.

* Deployment is fun in Rails. In django, it was and still is painful.

* Rails has a far better support for Backend databases, including some support for NoSQL. On the other hand it was just a while back django started supporing multiple databases and that too is hackish approach.

* Databases migrations in Rails are straightforward and explicity. django doesn't have anything like that builtin but does have a django-evolution app which can be really troublesome in some cases.

* Django's restrictive templating system theoretically lets you not shoot yourself in the foot by imposing a new language. But having to learn a new language and dealing with its quirks sometimes makes you pull your hair. Rails approach of embedding Ruby in templates is much more powerful and practically useful. Sure you can override templating systems in both frameworks but defaults are the ones almost everyone uses.

* There are very few hosting services specifically tailored for django. But Rails community boasts services such as heroku which save you so much time that a django fanatic cannot understand.

* I haven't seen testing in Rails in depth but from the bird's eyeview, automated test-cases in Rails seem much more powerful than in django. I might be wrong here.

* Rails has much better documentation and a much stronger community. Compare the Rails and django books on Amazon, questions asked on SO, blogs, tweets, everywhere Rails now dominates.

Its just that I really love Python and prefer it much more over Ruby. Even then I'll probably completely switch to Rails.

Re: Ask HN: Where is the Django community?

#144

Earlier quoted context omitted.

Return is absolutely a keyword in Ruby: http://www.ruby-doc.org/docs/keywords/1.9/files/keywords_rb....

Its a keyword, but its not needed (as its not needed in many modern languages) but many rubyists I've worked with said that it was a nice feature that the return keyword was unnecessary and did not use it.

> but its not needed

Depends. It's needed for non-local returns (returning from within blocks), and it's also useful for early returns within methods.

It's not needed for the final return of a method, or a normal exit from a block (not a bad thing in my opinion, and Python's lambda do the same)

Re: Ask HN: Where is the Django community?

#145
post #52
post #30

Earlier quoted context omitted.

Wow. That's bit harsh. I'll try and stay civil. "The community is pretty much dead." - not from where I'm standing. I live in a tech-savvy town and there seems to be more Django devs here than Rails devs. Of course - it's not a popularity contest otherwise PHP would be the best web framework ;-) "All my Django projects ended up being a big mess" - that used to be the case with my own code but by reading other people'…

PHP would be the best web framework PHP is not a web framework like Django, it's a language like Python.There are however, many good Django like PHP frameworks. Just wanted to clarify.

Having been writing web interactivity since before PHP, I'd disagree with you that PHP "is a language like Python".

Look at how it started, as personal home page template processing scripts in Perl, and you'll see it started with much more in common with a templating tool or web framework than with a formal language.

"PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl scripts for tracking accesses to his online resume. He named this set of scripts 'Personal Home Page Tools'. As more functionality was required, Rasmus wrote a much larger C implementation, which was able to communicate with databases, and enabled users to develop simple dynamic Web applications..."

"PHP/FI, which stood for Personal Home Page / Forms Interpreter, included some of the basic functionality of PHP as we know it today. It had Perl-like variables, automatic interpretation of form variables and HTML embedded syntax."

http://www.php.net/manual/en/history.php.php

Re: Ask HN: Where is the Django community?

#146
post #98
post #6

Let me tell you the truth, though this will not be popular: Django is not a good framework. It's clumsy, inflexible and restrictive. The community is pretty much dead. If you want to work in ruby, go for ror. If you want to work in python, go for a micro framework like Bottle. I made the mistake of investing a lot of my time in Django. It was not worth it in the end. All my Django projects ended up being a big mess,…

IMO, Django had great documentation in it's time (i.e. the django book), which is why it's so popular; but the competitors have caught up, and people are questioning how good Django really is. The main advantages of Django are - lots of libraries, and the generic views. But I personally dislike generic views. They just feel a little like magic, and a little over-engineered. They might be good for larger projects, but…

> IMO, Django had great documentation in it's time (i.e. the django book)

The "great documentation" is not and has never been the django book. It's the official documentation on the website.

> but the competitors have caught up

Uh... no it has not. Even in the Python sphere, where Sphinx and Django have led to drastic improvements in documentary quality. One of the few projects which could lay claim to that would be Pocoo's/Armin's (Flask, Werkzeug, Jinja) and in my experience the API still feels much more like APIDoc than the craft I feel when I read Django's docs.

As to Rails, it's still a joke. The first documentation link on the rails website is this: http://api.rubyonrails.org/

> But I personally dislike generic views. They just feel a little like magic, and a little over-engineered. They might be good for larger projects, but using them from the start feels like premature overengineering.

That sounds very strange, especially for the older non-class-based generic views: they provide very simple behavior and usually end up replaced over time as it's not possible to customize them sufficiently (a major reason why class-based generic views were introduced).

I have to say I'm not sold on the class-based generic views, they feel far more complex than the old ones (because they are) and the documentation does not help and does not remove that feeling of complexity.

Re: Ask HN: Where is the Django community?

#147
post #90
post #28

Earlier quoted context omitted.

In what ways is Django clumsy, inflexible or restrictive?

I don't want to be defending the OP's position, but. . . settings.py is a mess. Even Simon's written a post bashing it ( http://simonwillison.net/2009/may/19/djng/ ). I cringe a little starting up a project and having to dive into the settings.py file. In some ways, Django tries to be flexible, but it's clumsy. For example, you can have your templates in your app directories. So, you have /path/to/project/posts/templ…

> In some ways, Django tries to be flexible, but it's clumsy. For example, you can have your templates in your app directories. So, you have /path/to/project/posts/templates and /path/to/project/people/templates. However, you can't just put your templates in there because Django doesn't namespace them. Like, if I do {% extends "people/base.html" %} it will look in both those template directories for a people folder. It won't be like, "oh, I should look in /path/to/project/people/templates/base.html". I have to put the template in /path/to/project/people/templates/people/base.html. That's clumsy.

That one I completely disagree with, especially considering the idea of reusable applications.

While the repetition of 'people' does feel redundant at first glance, it means a second application can have its own `people/base.html` template which will be used instead of the one originally provided by `people`, and without needing any magical manipulation of paths/namespaces in the template loader. The path within the templates folder is completely independent from the path outside of it. And I think that's a fine behavior for the app_directories and the eggs loaders.

Furthermore, note that you could write your own template loader based on these which will do the namespace munging for you. How is that "Django tries to be flexible, but it's clumsy"?

Re: Ask HN: Where is the Django community?

#148

Earlier quoted context omitted.

Okay, let me rephrase. It's not trivial. In rails, it's trivial. The framework has knowledge of these separate states of applications. Deploying a serious, hardened service on top of Django is an order of magnitude more complicated than something like Rails. Schema migrations are yes, a "solved" problem, if by "solved" you mean a third party application that isn't baked into the framework. Having built a service that…

This whole comment is rife with ignorance. > Deploying a serious, hardened service on top of Django is an order of magnitude more complicated than something like Rails. That's funny. How so? I just start gunicorn, point nginx at it, and I'm ready to go. Of course, you could just as easily do it 500 other ways that might make sense to you more. > Schema migrations are yes, a "solved" problem, if by "solved" you mean a…

About PCI compliance... It matters to mention which level you are.

PCI 4 is far different from PCI 1.

Re: Ask HN: Where is the Django community?

#149
post #6

Let me tell you the truth, though this will not be popular: Django is not a good framework. It's clumsy, inflexible and restrictive. The community is pretty much dead. If you want to work in ruby, go for ror. If you want to work in python, go for a micro framework like Bottle. I made the mistake of investing a lot of my time in Django. It was not worth it in the end. All my Django projects ended up being a big mess,…

the problem is simple, most people come to django with no previous web development knowledge and no python experience. they expect it to "just work" like php.

this ain't gonna work that way. if you know python, you will always find your way out by looking at the django code (there lie the best examples of how to write django.)

and if you have web development experience, you will recognize the time you've wasted on boilerplate stuff django gives you for free.

'nuf said.

Re: Ask HN: Where is the Django community?

#150

Earlier quoted context omitted.

>However, migrations are a tad fundamental. FYI, I think the South authors are the ones preventing South being part of Django, not the Django maintainers.

Honestly? I don't think either "side" (if there is such a thing as "sides" here -- South's lead developer has a commit bit on Django) wants to just transplant South into Django directly. The plan, which got hashed out secretly behind closed doors in a shadowy back room (on our public mailing list), is to work the low-level support for migration-ish stuff -- APIs for DB manipulation, etc. -- into Django, but not offic…

Ah, my recollection was that the Django guys wanted to include South in a previous Django version (maybe 1.3?) but that the South developers didn't want that to happen. I had a quick look and couldn't find where I read that, and you seem to know better than I do, so I'll assume I'm misremembering something.
Post reply on HN