I am a django fan and I am using it for a while and very successful in a couple of projects. But reading this article fortunately makes me take a step back and rethink some of the things and be a little more critical with the blindness that sometime just sets in when you are into one topic.
Not that I completely agree with all the points, but it just lets me clear my view a bit. I.e. the template approach of Django is in my eyes a very good one, we (also as developers) don’t want all the power of python in the template, it would just get us into other problems, that other known languages have. And the extensibility of django templates is just very simple and not a reason for me to really complain about it.
Let me say up front I will use Django in my next project again and I think it’s great for quickly coming up to speed and getting things done and to be honest most things are about that. A while ago I developed a very DB intense application, that used a lot of difficult joins and I wouldn’t know if Django would have been the right choice for that. On the other hand I think that some customization would make me able to get all the good stuff Django provides and combine the needs with the luxury.
I actually wanted to list some problematic items that came along my way while working with Django:
- no support for aggregation in SQL, we did that all by hand or using triggers or view, which was a quite efficient solution in our case, I am not to unhappy with it
- some limitation in the model and SQL building sometimes step on your feet, i.e. creating a n:m relation creates a relational table that can not be adapted in any way, to store additional data in there, which is sometimes needed
- Extending the user model is a bit tricky by using the UserProfile approach and actually having two models for user data, we ran into this trap a couple of times. But a possible solution, which we haven’t tried yet but discussed and found to solve the problem was creating a view which provides all the user data as one model and read only from there, that will surely work perfectly and have the advantage that you can even provide additional data that the User and UserProfile models don’t provide. Just be careful to not blow up your DB :-).
- The I18N approach of Django is pretty easy to use, but it gets to it’s limits when it gets difficult. Translating strings that are made up of HTML chunks gets difficult.
Don’t see this post as a rant against Django, it’s not meant to be at all. I could probably make a much longer list of advantages.