Jacob Kaplan-Moss is one of the lead developers of Django. At his day job, he’s the lead developer for the Lawrence Journal-World, a locally-owned newspaper in Lawrence, KS where Django was developed.
At the Journal-World, Kaplan-Moss hacks on a number of sites including lawrence.com, ljworld.com, and kusports.com. He has co-authored a book on Django, “Pro Django: Web Development Done Right”. In this interview, he tells us about Django, his views on Open Source and about AJAX + Django.
PythonThreads >> Hello Jacob, We are glad to have you on PythonThreads. Could you introduce yourself?
Jacob Kaplan-Moss >> Hey there — thanks for having me. Most people here probably know me as one of the lead developers of Django, but in my day job I’m the lead developer at the Lawrence Journal-World in Lawrence, KS.
PythonThreads >> Guido recently said, his favorite framework is Django and he is using it at Google, he also complimented Django team. According to him, “Django templating language is rich and powerful but it doesnt look very pythonic, in fact its so rich and powerful that it might as well be PHP”, what would you like to say about it.
Jacob Kaplan-Moss >> Yeah, seeing Guido praise Django was pretty amazing. I’m (obviously) a *huge* fan of Python, so getting that praise from the creator himself was fantastic. However, there was quite a bit of fuss about his words; that was a lot less fun. I think many people tried to read some sort of insult to their work into Guido’s words, which is just silly. We all trust Guido’s language design skills, but that doesn’t mean we have to trust his web development chops. Nobody should switch to Django just because Guido said so.
Python’s plethora of web development tools is often cited as a weakness, but for me it’s a fantastic strength. You don’t have to buy into Django (or TurboGears, or…) if you want to use Python, and that just makes the Python community that much stronger.
To move into the second part of your question: it’s precisely that ease of movement that makes us comfortable with being draconian about Django’s template language. It’s one of the most controversial parts of Django, to be sure: people either love it or hate it. Luckily, those that hate it can easily use a different one.
I think many programmers — likely Guido included — feel that the template language doesn’t really fit their brains. There’s a good reason for that: the template language isn’t designed for programmers. Most real-world web projects are a collaboration between designers and developers; Django’s template language is really made to be as designer-friendly as possible. It’s kinda funny that Guido called it “rich and powerful”, though: most people complain that it isn’t powerful enough! Just goes to show that it’s impossible to please everyone.
PythonThreads >> In the media, we see a lot of praise/appreciation for Django and comparisons with other frameworks like Turbogears and Rails. In your opinion, what are the strong and weak points of Django today on technical front?
Jacob Kaplan-Moss >> As you might expect (given that Django comes out of a news organization), Django really shines when it comes to developing “content-oriented” web sites. Django’s
amazingly good at helping you collect, process, synthesize, and display structured data.
If you think about it, most of the really popular and big sites online are “content-oriented”: YouTube, Wikipedia, Ebay, Amazon, Craigslist… it’s pretty obvious to me that well organized content drives traffic. Django’s main goal is to make organizing that content as painless as possible.
I’m also extremely proud of how well Django makes the transition from development to deployment. We’ve always kept performance and scalability at the top of our list of goals, and I think we’ve made out very well. There’s nothing worse than developing a site only to discover that the tool you chose makes deployment or scaling impossible.
As for weaknesses…
Although many people cite Django’s documentation as a strength, I really think it could be *so* much better. I think we look good simply because the state of open-source documentation is so woeful. So it’s not that we’re especially good; it’s that our competitors are especially bad. We need to be constantly improving our documentation; software’s worthless if you can’t figure out how to use it.
I’m glad to say, though, that that the other weaknesses I see in Django are currently being addressed. Form processing is getting much easier with the “newforms“ module; the application of that work will make the admin interface much easier to customize; and support for commercial databases (Oracle, SQLServer, etc.) is also in the pipeline. The next six months or so are going to
be very exciting.
PythonThreads >> Frameworks like ROR make it easy to add simple AJAX functionality to web applications. Any plans of adding similar support in near future?
PythonThreads >> Is Django suitable for the development of SOAP or REST based applications?
Jacob Kaplan-Moss >> SOAP… no so much Django matches REST extremely well, though; the flexibility of the URL dispatch means it’s easy to map your resources out in any way that makes sense. There’s also some cool community projects forming to work on a high-level set of tools for building REST APIs in just a few lines (a la the syndication framework). I’m very excited to see what comes out of that.
PythonThreads >> Developers must be sending a lots of feature ideas and bug reports, how do you manage to handle this workload along with your journalism related activities.
Jacob Kaplan-Moss >> Well, Django’s an all-volunteer project — none of us get paid to work on it –so you’re right that the workload can be overwhelming. The big lesson we learned here is that if you’re an open source maintainer you can’t be afraid to ask for help. A few months ago we asked some volunteers to manage the incoming flow of bugs/feature requests, and they’ve done a *fantastic* job keeping us organized and focused. We’ve also slowly expanded our group of committers so that more can get done. Still, our philosophy values quality over quantity; we’d rather let Django develop slowly than add dubious features just for expediency.
PythonThreads >> Ruby did not have much of an impact until the arrival of “Ruby On Rails”. So a killer application is required for a language to become really popular. Do you see “Django” a Python based killer application?
Jacob Kaplan-Moss >> No, not really. Python is used *everywhere*, and that use has very little to do with Django’s success or failure. I think we tend to forget that web development is just a small part of the overall programming ecosystem. Python’s huge strength is that it spans disciplines so well — Google, NASA, and ILM all use Python.
PythonThreads >> How do you see Django in the short and long term future? Any recent developments you would like to share?
Jacob Kaplan-Moss >> We just released version 0.96, which includes the “newforms” work that I mentioned above. In the short term we’re going to keep improving that library and patch a few holes in it.
In the long term, the stuff that’s exciting me the most these days are the applications starting to spring up in the community. The past few months have seen the creation of apps to handle tagging, registration, blogging, REST APIs,etc. As those mature I’d like to (where possible) bring them into Django as “contrib” apps.
PythonThreads >> Developers often say that they are indebted to open source projects and wish they could contribute. However very few manage to contribute. What do you think are the reasons and how does one overcome those issues? How did you start contributing to open source?
Jacob Kaplan-Moss >> I think that open source can be intimidating if you’ve never been involved before. Geeks aren’t especially known for their social skills, and when you combine that with the severe lack of time you get some pretty terse emails flying by on mailing lists. The only advice I can give is that people are a *lot* friendlier than they seem online. Just go ahead and submit that patch or make that suggestion; the chances of getting flamed is actually really low.
PythonThreads >> Are there articles describing the best deployment practices/patterns for Django sites that experience large traffic on a daily basis? Even articles that share the existing setup of similar Django sites today (like ljworld.com) will be helpful.
Jacob Kaplan-Moss >> Pretty much everything I know is in Chapter 21 of my book: http://www.djangobook.com/en/beta/chapter21/. That chapter describes how you’d take a typical Django site from development to many millions of hits.
PythonThreads >> Your book “Pro Django: Web Development Done Right” has just been published. Congrats! What do you think are the highlights of the book?
Jacob Kaplan-Moss >> It’s actually not *quite* published; we’re still in the process of copy-editing it (but thanks anyway :). As for highlights… I think I’ve been so close to it for so long I have a hard time finding which parts are better than others, so I’ll just say it’s all pretty good.
PythonThreads >> Thanks Jacob. It’s been good talking to you. Could you share your blog url or email address with our readers?
Jacob Kaplan-Moss >> My blog’s at http://jacobian.org/.