Fluther is a free Q&A collective that specializes in getting
fast answers from the right people. Check it out!
I first knew I wanted to learn Django when I saw the DjangoCon 2008 keynote talk by Cal Henderson, subtly titled “Why I hate Django”. I highly recommend watching at least part of the talk.
I’ve been hacking on Python for a while now but until I joined Fluther back in September I had never done Python at work. My previous job at Yahoo! had me building front-to-back Java applications (which isn’t the standard there in case there’s some confusion). I used to have to go through 60 second builds just to test even a minor Java code change (CSS and JS reloaded when they were changed). With Django, that’s no longer the case.
Probably my favorite thing about Django is the shell and the admin interface. The shell is an environment that allows for testing, debugging and fixing things that would have been nearly impossible to do in my previous environment. Instead of writing code and compiling and hoping it works, realizing it didn’t and then hoping to catch a breakpoint and step through things looking at deeply nested variables, I can just pop into the shell, grab an object and manipulate it using auto-completing methods and properties until I can accomplish what I set out to do.
The admin interface—because it understands your models—lets you do all the basic CRUD operations on your data. With a tiny amount of work you can easily add search fields and filtering options. Sorting is already built-in.
What’s great about the shell and the admin is you get so much for free.
I found Django’s template syntax particularly frustrating at first. JSP is a relatively powerful language and you can easily end up putting a lot of logic that should be in a controller or model into the view. Django forces you to put it in the right place by not allowing nearly anything in the templates so that they remain just templates. It’s a frustrating but smart move that’s really helped me in the long run.
Models and migrations are way better than what we were doing in Spring which was entirely custom SQL scripts with no backwards migration capability (unless we manually wrote it). With South, migrating forwards and backwards is pretty effortless. Unfortunately, the learning curve is not insignificant. It’s definitely worth the effort to get to know because in the long run it saves a lot of time (and pain).
So far I’d describe my experience as nothing short of magic (that can’t be removed).
Tim. I honestly wish I knew what you were talking about. Either way, have fun with django and python! Hah! 🙂