9 ms·
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 muc
by maxklein 15y ago
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, and I had to undjango my way out of the various restrictions it placed on me.
And the community in general seems to agree - there is not much different in the django ecosystem, comparing 2 years ago to now.
My advice, go for Ruby On Rails or Bottle. Leave Django alone.
- deleted 15y ago[deleted]
- deleted 15y ago[deleted]
- simonsarris 15y agoThis is what I did (Django for one project -> moved to Rails) and second this. I think Django is a lot easier to get started with, but RoR is much more thought out. OP should also read: http://www.scribd.com/doc/37113340/Why-Django-Sucks-and-How-we-Can-Fix-it http://www.scribd.com/doc/37113340/Why-Django-Sucks-and-How-... Which summarizes some of the problems I had with it. Getting components to work was always a custom job; a stark difference compared with the ease of getting Rails components to work.
- andybak 15y agoI'll just point out that was one of the major talks at DjangoCon 2010 and the title was meant to be provocative and in good humour. Eric Florenzano was and is a major player in the (allegedly non-existent) Django community.
- chrisgo 15y agoAny experience with web2py?
- maxklein 15y agoI never tried anything else, but my next project will be with Bottle.
- icey 15y agoWhy Bottle instead of Flask (http://flask.pocoo.org/ http://flask.pocoo.org/)? Bottle looks fun for little experiments, Flask seems like it's a little better suited to web app development given that it has plugins for all kinds of useful libraries.
- th0ma5 15y agoflask is really great!
- code_duck 15y agoYou've never tried anything else, and out of everything available for Python, you picked a framework I heard of for the first time two days ago? Without trying it, either? Hey everyone, can we get a top comment on this thread that is something other than nonsensical flamebait, please?
- hswolff 15y agoWeb2py is great for those brand-spankin-new to Python MVC web development. That said past that stage I found it to be constricting in the amount of hand-holding it required, seeing myself begin to pour into the source code when I realized I was fighting with the framework and not enjoying it. But truly, for beginners, it's top notch. Great teaching tool.
- AnthonyB3 15y agoMany experienced developers use web2py and find it to be quite flexible and powerful. For example, see comments here (http://harrywolff.com/2011/01/web-application-development-frameworks-part-1/ http://harrywolff.com/2011/01/web-application-development-fr...) regarding questions about function re-use and form customization. In web2py, I don't think the complicated stuff is generally any harder than it would be in other frameworks, yet many things are often much easier. Granted, though, sometimes documentation is lacking for some of the more complex stuff. A recipes book is due out soon, so hopefully that will help.
- halayli 15y agoweb micro frameworks are evil although they don't look like that in the beginning, I advice to avoid them by all means. IMO, even though pylons 1.0 is now frozen, it is still one of the most flexible frameworks out there.
- tmhedberg 15y agoCare to qualify this highly general and rather hyperbolic statement? Which specific aspects of "micro" frameworks do you find to be "evil"?
- fragsworth 15y agoYou tend to need to add features in unforeseen ways. Popular large frameworks can facilitate this more than micro-frameworks can, resulting in less work on the developer's part.
- halayli 15y agomicro frameworks provide incomplete feature set. You tend to reinvent the wheel many times. I see no advantage in using them when I can have something more complete and feature rich.
- espeed 15y agoBecause as your app grows and you need more custom behavior, you find that you start stripping out the full-stack framework features and you end up with using it like a micro framework, which it wasn't designed to be so you have now have a framework mismatch.
- halayli 15y agopylons is a glue framework. It allows you to replace whatever you want, easily and without losing other framework features.
- jiri 15y agoI like pylons a lot and I am using it for few projects, but I hate dependecy on many libraries, things get complicated this way very soon. For smaller sites I recommend web2py - it is one package and it is very straightforward and easy although Pylons seems to be more flexible.
- endlessvoid94 15y agoI couldn't agree more. Django's inability to deal elegantly with, for example, development vs. testing vs. production SETTINGS is an obvious drawback. If I have to use third party middleware or apps to deal with inadequacies of a framework, that's a pretty big alarm that something bigger is wrong. I saw bottle just this past week on HN and I'm itching to give it a shot.
- true_religion 15y agoThis is rediculous. Everyone's app is different, and so Django is rightly agnostic as to how your settings are stored, and which are loaded. As for the scope of the problem: dealing with multiple development settings is Section 1, Page 1 of professional programming. It's a solved and trivial problem. This isn't like coding your own ORM or templating language.
- endlessvoid94 15y agoOkay, 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 hosts Django apps, I can tell you that serious, hardened, services are not as trivial as you think to build with Django. There are countless headaches, and at this point it makes sense to use Rails over Django if you care about making your life easy. I'm not saying Django isn't without its advantages, but those advantages tend to pale in comparison to some of the problems when you scale past 10 users of a trivial app like a blog.
- ericflo 15y agoThis is the best trolling I've seen yet in this thread.
- endlessvoid94 15y ago
- peregrine 15y agoAgreed. I've been using Django for 3months now and while the documentation is top notch, the examples are piss poor for things that are pretty much required to make anything past a simple blog. And I actively reached out too, went to the IRC room, went to the forums, read the mailing list. And it feels dead, most blog posts with tutorials are years old and obsolete, there most of the applications we've tried to incorporate use deprecated methods. Its a real pain in the ass. Not to mention the applications are all over the place, just look at this list https://code.djangoproject.com/wiki/DjangoResources#Djangoapplicationcomponents https://code.djangoproject.com/wiki/DjangoResources#Djangoap... it has lots of components but most of the "suggested" are not on there? Even worse is that most of those links are to dead projects with no activity. I would go with Flask, Bottle, or tornado and if you need an ORM go with sqlalchemy or Mongo. /rant sorry its been a hard few months.
- andybak 15y agoI think you were looking for http://djangopackages.com/ http://djangopackages.com/ Makes it very easy to find out which packages are actively maintained (also - just see which ones have recent commits on Github!) And remember some projects have little activity because they were born perfect :)
- glimcat 15y agoHere's a true fact about programming: Following the herd means that there's a better chance that someone will have already solved any given problem you encounter and released documentation or a drop-in implementation. I like the idea of Django/Bottle/etc. because I use Python for a lot of my non-web stuff. But RoR has a bigger and more active population. Unless there's something specific to your situation which changes this equation, you'll save yourself time and effort if you go with the more mainstream option.
- zeemonkee 15y agoOK, then, I'll go with PHP sigh.
- philipn 15y agoIn what ways is Django clumsy, inflexible or restrictive?
- aidos 15y agoI'm not an expert on it but we used it for half a dozen projects and I have to say I found it to be all of those things. It's a typical scenario really. On the surface it gives you a great framework for creating a website that works in a certain way but if you deviate from that you tend to find yourself in trouble. In our case it was mostly the admin section that created the issues. I'm sure that if you know the framework well enough there are ways around the inflexibility but the fact of the matter is, the Django admin is heavily based on configuration. Where you have configuration you have limitations. Things may have changed (it was about a year ago when I last worked with it) but at the time I struggled with simple things like; customising the auth system, easy debugging / error handling, clean outgoing email switching between dev / live, the templating system, etc. I seem to recall spending most of my time ripping code from the core framework into my views.py and tweaking it so I could get the behaviour the client was asking for. As I say, it's been a while since I worked with it and I'm sure people have solutions to the issues I encountered but if you're planning on going off piste at all it's probably not for you.
- andybak 15y agoI'd loved to have exchanged emails with you a year ago. The admin is amazingly malleable. Almost everything can be overridden and replaced. There's plenty of nice debugging/logging solutions (Werkzeug+Django Extensions being my favourite). Email switching between dev/producution is trivial (unless I'm misunderstanding you). There ARE some clunky parts to customizing auth - mainly around extending the User model - but it's not that terrible.
- aidos 15y agoYup, just as I say, I'm sure there are solutions to these things if you know the answers. I did look long and hard at the time though. We were using a version of Django where the auth/user stuff had just changed and there were no good examples of how to extend the user model (frustratingly there were good examples for the previous version). Regarding the email stuff, my criteria for a framework is that I'd like it to send real emails on live and fake ones on dev. That is, email everything to me on dev along with a little header showing who the email was going to etc. Invaluable for testing.
- andybak 15y agoWow. 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's code (and the Django source) I've improved hugely. Should you be blaming your tools? "And the community in general seems to agree" - the Django community agrees that Django sucks? Or did you mean the web dev community in general? If so - can you back that up with anything more substantial?
- asnyder 15y agoPHP 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.
- andybak 15y agoPartly a slip of the keyboard. But PHP is language + web-oriented 'libraries' (actually built-ins) so the it's a blurry distinction.
- KnightWhoSaysNi 15y agoIn the context discussed in this thread, "framework" means code that includes MVC, URL routing, and often an ORM. PHP in itself doesn't offer that; you need a framework such as CodeIgniter or Zend Framework on top. So no, PHP isn't a "framework" in itself (at least not in the way that Django is).
- seanp2k 15y agoWhy did this get downvoted? This guy is 100% correct and not being offensive. WTF, HN? See: post today about downvotes.
- Terretta 15y agoHaving 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 http://www.php.net/manual/en/history.php.php
- zeeg 15y agoDjango works just fine. If you want to build your own framework (e.g. use Bottle) then go for it. Waste [Invest?] the time while the rest of us are busy getting things done. I don't think that you can compare ANY Python framework (or any framework in any language) with Ruby on Rails. If you write Ruby, use RoR. If you write Python, don't use RoR. Also, for anyone recommending something like Tornado, please stop. It's NOT THE SAME THING and completely off topic. If you want something micro for a small concise project use Flask.
- StavrosK 15y agoI tried to use Flask for a GAE project a few months ago. I stopped two views later, when I realized I'd started reinventing half of Django. I switched to Django for GAE at that point, and I'm very happy so far.
- ubernostrum 15y agoIf you have specific constructive criticism I'm quite happy to hear it.
- ladyrassilon 15y agoAs 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 problem with ruby as a language, even if it takes flexibility a step too far, however the style of coders, and the general "I did something clever and unreadable so I'm awesome" attitude seems to permeate the ruby-verse. Also while many improvements have been made on the ruby interpreters... the performance is STILL lagging behind Python, which as a dynamic language with compiled backend elements, gives languages like Java a run for their money. Both systems are very powerful, Django has certain batteries included that I find it strange that rails fails to do (namely a plugabble extensible flexible user authentication system) and both have their adherents. The writer of this original piece is clearly not very up on Django development, the strong community apparently how to write well implemented MVC code. Having spent years working with a variety of frameworks, I've yet to find a place where Django stops you doing what you want (unless its a fundamentally stupid idea).
- deleted 15y ago[deleted]
- jjayl 15y agoI agree with you that Django is a great framework, but to be fair, at least a part of the reason why there are so many bad Rails coders is that there are more of them - law of large numbers. I've also met far fewer junior-level Django developers. > ...the general "I did something clever and unreadable so I'm awesome" attitude seems to permeate the ruby-verse. I don't think it's as pervasive as you make it out to be, I haven't encountered this much.
- Qerub 15y ago> coders who think that return is an keyword What makes you think it isn't?
- gcampbell 15y agoReturn is absolutely a keyword in Ruby: http://www.ruby-doc.org/docs/keywords/1.9/files/keywords_rb.html#M000032 http://www.ruby-doc.org/docs/keywords/1.9/files/keywords_rb....
- zeemonkee 15y agoI have my own pet gripes about Django, but then I have gripes about any framework I've used, Rails included. However, when I've seen a Django project that's a "huge mess" that's largely due to the incompetence of the developer. A more "rails-y" framework probably suits such developers, as it gives them less leeway to screw up.
- alebairos 15y ago"All my Django projects ended up being a big mess". maxklein, it seems u lack descent programming skills, since my experience with django is completely different. Most of the time the problem is with who codes, not the framework or tool.
- jdost 15y agoActually, in my recent job hunt (in Chicago no less) I saw a very even distribution in RoR and Django centric jobs. I believe outside of the Chicago area, it may even move towards a more Django dominant role. I am unsure of whether this is due to the abilities of the framework or if Python is more accessible and widely used a language than Ruby.
- benatkin 15y ago> My advice, go for Ruby On Rails or Bottle. Leave Django alone. Bottle has far fewer features than Django. It's hard to believe that Django is tripping you up if you aren't using its advanced features. You're welcome to discard the Django ORM, auth, models, and even have middleware return requests before it gets to django's router in some places. I've had similar sentiments before, but ultimately I realized that I would have to fight with this kind of frustration no matter what tools I picked. The details would have been different, but my immaturity as a programmer would have been the same. As time goes on I get better at substituting custom functionality if a framework doesn't do what I want. This can mean custom css, overriding templates, subclassing, or just placing my own objects in place of inbuilt functionality. Finally, for a counter-example - not sure why convore split up and slowed down, but they were absolutely crushing it with Django when they first started. They were having Django handle some requests and a more low level server handle other requests (can't remember if it was Tornado or Twisted). There are countless other counter-examples.
- flashingpumpkin 15y agoI've got to disagree with you. It's clumsy, inflexible and restrictive. Pretty much anything can be swapped out with custom code. Need a custom auth backend? Just write a class. Need custom session backends? Just write a class. Need to customise a certain view of an application? Just override the url. Don't like the ORM? Just use something else. Have special caching needs? Write a backend. A look at the release notes are full of good things and following them is definitely worth it. Since 1.3 you've got class based views that make it dead easy to create RESTful views for example. There's new logging support, you can have multiple databases with different backends. The community is pretty much dead. It's true that there was a lot more blogging happening in the earlier days. I suspect that the community is simply busy building new things - but a look at the CheeseShop shows on any day a healthy amount of new and updated Django components. Right now there are 7 Django projects on the main page. All my Django projects ended up being a big mess, and I had to undjango my way out of the various restrictions it placed on me. I'm a big fan of how Django creates structure through its applications. It makes it very easy to build parts of functionality on a plug and play basis and use them across projects. Django offers a lot of functionality and it can be difficult to pick the right ones being a newcomer. But once you get the hang around applications and repositories and start working with "advanced" Django and Python features and apps like the built in signals, Celery, Fabric, GUnicorn, etc building and deploying apps becomes a breeze.
- malero 15y agoI think RoR and Django are both great frameworks. If you think that Django is too restrictive or inflexible, you are relying too much on the framework and not on your own abilities as a programmer. Django gets you up and running quickly, Python is where the real magic happens.
- robbles 15y agoI can't believe I've read this far into an epic flamewar already, but thank you for making the one comment I can get behind. My experience with most development teams is that they have their own custom version of whichever framework(s) they use with as much of the warts removed as possible, in their own style. There's just no way you're going to get around this part, no matter what framework you use.
- orblivion 15y agoI complain about Django all the time, it seems like things could be done better. But I think I'm better with it than without it. It takes care of the vast majority of security issues out of the box. Does bottle do similar?
- espeed 15y agoIt's not so much Django is dead as is using a relational database as the primary datastore is dying. Django (and Rails) both came from a time when the RDBMS ruled so they were built around an ORM and are very ORM centric. People are moving away from using a relational database and onto using Mongo or a graph database as the primary datastore. Graphs are a much more elegant way of storing relational data, and so I prefer a framework that isn't so tied to the RDBMS. Now I use Flask as my Web framework and Bulbflow (http://bulbflow.com http://bulbflow.com) to connect to the Neo4j graph database.
- StavrosK 15y agoI'm pretty sure that, once you populate a class instance with your data, the rest of Django is usable with very few changes. It's pretty loosely coupled, generally.
- espeed 15y agoYeah, but most of the libraries that make up Django (and Rails), such as auth, are based around the ORM so if you don't use the ORM, you have a framework mismatch.
- mnutt 15y agoI don't know about Django but in Rails ActiveModel works pretty well to bridge the gap and let you use any Rails auth system on Mongo, etc.
- wisty 15y agoIMO, 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 using them from the start feels like premature overengineering. I like Tornado. In the overview (http://www.tornadoweb.org/documentation/overview.html http://www.tornadoweb.org/documentation/overview.html), it gives you - auth (using OpenID), secure cookies, XSRF protection, templates, localization, UI modules (really basic, compared to generic views), running in prodution with Nginx, and aync programming. It doesn't have much database stuff (just a wrapper around MySQL), but you can use SQLAlchemy, or some other ORM. Only the auth stuff feels over-engineered, because it uses async programming to call a general interface for Facebook OAuth, OpenID, Twitter OAuth, and so it's a bit of a dog's breakfast.
- masklinn 15y ago> 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/ 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.
- alexforget 15y agoIn my experience, I found it difficult from time to time to do certain thing, but when you dig deeper you almost always find that the hooks you need and the functionality you need is already there. I come to think that the Django team must have the Guido's time machine. If you need something, take a good look, the solution might be under your feet.
- shabda 15y ago> The community is pretty much dead. http://groups.google.com/group/django-users?pli=1 http://groups.google.com/group/django-users?pli=1 20245 Members, 126619 Threads Last 12 hours, 14 new threads, 27 new messages https://code.djangoproject.com/log/django/trunk https://code.djangoproject.com/log/django/trunk 16546 changes, last change 28 hours ago. > ....Django projects ended up being a big mess, Are you sure it was not the result of the team you worked with, and not Django itself? Everything else is hand wavy, but if you would bother to explain "clumsy, inflexible and restrictive" technically, I would be glad to respond technically.
- geekam 15y agoFrom where I see, Django has a decent community. I have been helped a lot, I regularly go to meetups with a turnout of 20+ Django devs at a time. Django is a Python framework. It has some nice features of Python like explicitness over implicitness rather than depending on a lot of magic. But in no way I feel it is a clumsy, inflexible or restrictive.
- nvictor 15y agothe 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.
- justhamade 15y agoI am involved in Django and love it and the community. I only do RoR work when I have to and I hate it. It comes down to personal preference. To me Django was much easier, more flexible, and "funner" to work in.