Live data from Hacker News

Why Django Sucks

speakerdeck.com

41–50 of 206 posts

Re: Why Django Sucks

#42

Earlier quoted context omitted.

You sound institutionalized. Django is indeed awesome for having a ton of features immediately. Of course, once you need to start changing those features you realize you have to dislocate your shoulder to do so. Django is badass for what it is intended to do: be a kitchen sink. Flask is badass for what it is intended to do: be a platform for composable applications. If you ever need to reason about the internals of y…

Exactly. This was a presentation for a room filled with Django developers that likely use it for just about everything. The purpose of the talk isn't to bash Django, it was to introduce Django developers to some interesting concepts that are worth exploring and a tool that may suit their needs.

And the purpose of the title is to get eyeballs

Re: Why Django Sucks

#43

Thanks for posting this. I use Django extensively and I never really felt any pain from the tightly coupled monolithic approach, but I always like improving my tools. I will check out Flask. Any suggestions for making it easy to build REST style APIs? Is piston the #1 choice still?

I've used all 3 and I settled on "django rest framework". http://django-rest-framework.org/

The issue I have with piston is that it didn't turn my objects into JSON automatically for me when I returned from the call. I also had to map each and every call (GET/PUT/POST/DELETE) and there was no default out of box behavior. I felt like I was violating the DRY principle over and over.

Tastypie was great when I started but I wanted to do some non-RESTful things with it. Like POSTing to /article/{id}/{action}. Yes it is not REST...I don't care. It makes a lot of sense to POST to /article/15/publish to publish an article. I had to override so much inside tastypie it was getting to me.

Django restframework is a bit different. Default behavior is centered around mixins (basically multiple inheritance). I created a mixin for actions being specified and basically added it to any resource I wanted to have that. If you want to know more feel free to ask.

Re: Why Django Sucks

#45
post #42

Earlier quoted context omitted.

Exactly. This was a presentation for a room filled with Django developers that likely use it for just about everything. The purpose of the talk isn't to bash Django, it was to introduce Django developers to some interesting concepts that are worth exploring and a tool that may suit their needs.

And the purpose of the title is to get eyeballs

It's a DjangoCon tradition. There's one every year.

Re: Why Django Sucks

#46

I'm an inexperienced web programmer wannabe, but what's the difference between Flask and Sinatra?

Largest different is age and ruby vs python. That said Sinatra is built on Rack which has a ton of extensions to add things like sessions or auth. Where as flask has specific flask modules. Really apples to apples in my opinion.

Re: Why Django Sucks

#47

What fonts were used in this? I like.

Thanks! Titles are High Tower Text (Flask Logo Font): http://www.fontyukle.net/en/High+Tower+Text.ttf Text is Gaudy Bookletter 1911 (Open Source!): http://www.theleagueofmoveabletype.com/goudy-bookletter-1911 And code examples are Monofur: http://www.dafont.com/monofur.font

I rarely say this, normally preferring a scannable transcript to one-dimensional media, but... is there a video or even audio of the presentation?

Re: Why Django Sucks

#49

Earlier quoted context omitted.

Thanks! Titles are High Tower Text (Flask Logo Font): http://www.fontyukle.net/en/High+Tower+Text.ttf Text is Gaudy Bookletter 1911 (Open Source!): http://www.theleagueofmoveabletype.com/goudy-bookletter-1911 And code examples are Monofur: http://www.dafont.com/monofur.font

I rarely say this, normally preferring a scannable transcript to one-dimensional media, but... is there a video or even audio of the presentation?

It was recorded. I'll try to update this thread when it's posted online.

Re: Why Django Sucks

#50
post #14

Personally I'd say: - Error handling: Django error page is great, unless of course it's a AJAX request. Pylons does this in a much smarter way - Django ORM is awful. Easy to use yes, but awful - Django Auth is a "good intention" but awful implementation - Django templates are sloooooow. Jinja 2 is an order of magnitude faster Amongst other warts Also, the author apparently found the hard way: don't use Django as an a…

I think you are being a bit harsh by using the quickness of Django as a 1 line throwaway - the entire purpose is for it to produce quick, simple applications. There is an entire class of problems (mainly enterprise-related) for which the simplicity (ORM / Auth / etc..) is great. I managed to tie Django Auth into Active Directory which made the user's experience (relatively) seamless, as opposed to the previous realit…

You can use Jinja2 with Django, but you lose the ability to use any prebuilt Django templates. Which isn't much of an issue in practice since those are often the first thing you write yourself from reusable apps.

You also can't use templatetags from reusable apps (or Django itself) but it's easy enough to write a wrapper for those that allows you to.

We switched to Jinja2 for Canvas because the Django templates were atrociously slow, and it was absolutely the right decision for us.

Post reply on HN