Django Works in the “Real World,” We Spoke with (Well, Emailed) a Handful of People Who Have Complete, Deployed Django Sites Under Their Belts
Total Page:16
File Type:pdf, Size:1020Kb
PART 3 ■ ■ ■ Appendixes APPENDIX A ■ ■ ■ Case Studies To help answer questions about how Django works in the “real world,” we spoke with (well, emailed) a handful of people who have complete, deployed Django sites under their belts. Most of this appendix is in their words, which have been lightly edited for clarity. Cast of Characters Let’s meet our cast and their projects. • Ned Batchelder is the lead engineer at Tabblo.com. Tabblo started life as a storytelling tool built around photo sharing, but it was recently bought by Hewlett-Packard for more wide-reaching purposes: HP saw real value in our style of web development, and in the way we bridged the vir- tual and physical worlds. They acquired us so that we could bring that technology to other sites on the Web. Tabblo.com is still a great storytelling site, but now we are also working to componentize and rehost the most interesting pieces of our technology. • Johannes Beigel is a lead developer at Brainbot Technologies AG. Brainbot’s major public-facing Django site is http://pediapress.com/, where you can order printed ver- sions of Wikipedia articles. Johannes’s team is currently working on an enterprise-class knowledge-management program known as Brainfiler. Johannes tells us that Brainfiler . is a software solution to manage, search for, categorize, and share information from distributed information sources. It’s built for enterprise usage for both the intranet and the Internet and is highly scalable and customizable. The development of the core concepts and components started in 2001. Just recently we have redesigned/reimplemented the application server and Web front-end, which is [now] based on Django. 297 298 APPENDIX A ■ CASE STUDIES • David Cramer is the lead developer at Curse, Inc. He develops Curse.com, a gaming site devoted to massively multiplayer online games like World of Warcraft, Ultima Online, and others. Curse.com is one of the largest deployed Django sites on the Internet: We do roughly 60–90 million page views in an average month, and we have peaked at over 130 million page views [in a month] using Django. We are a very dynamic and user-centric Web site for online gamers, specifically massively multiplayer games, and are one of the largest Web sites globally for World of Warcraft. Our Web site was estab- lished in early 2005, and since late 2006 we have been expanding our reach into games beyond World of Warcraft. • Christian Hammond is a senior engineer at VMware (a leading developer of virtualization software). He’s also the lead developer of Review Board (http://www.review-board.org/), a Web-based code review system. Review Board began life as an internal VMware project, but is now open source: In late 2006, David Trowbridge and I were discussing the process we used at VMware for handling code reviews. Before people committed code to the source repository, they were supposed to send out a diff of the change to a mailing list and get it reviewed. It was all handled over email, and as such, it became hard to keep track of reviews requiring your attention.We began to discuss potential solutions for this problem. Rather than writing down my ideas, I put them into code. Before long, Review Board was born. Review Board helps developers, contributors, and reviewers to keep track of the code that’s out for review and to better communicate with each other.Rather than vaguely referencing some part of the code in an email, the reviewer is able to comment directly on the code. The code, along with the comments, will then appear in the review, giving the developer enough context to work with to quickly make the neces- sary changes. Review Board grew quickly at VMware. Much faster than expected, actually. Within a few short weeks, we had ten teams using Review Board. However, this project is not internal to VMware. It was decided day one that this should be open source and be made available for any company or project to use. We made an open source announcement and put a site together,which is available at http://www.review-board.org/. The response to our public announcement was as impressive as our internal VMware announcement. Before long, our demo server reached over 600 users, and people began to contribute back to the project. Review Board isn’t the only code review tool on the market, but it is the first we have seen that is open source and has the extensive feature set we’ve worked to build into it. We hope this will in time benefit many open source and commercial projects. APPENDIX A ■ CASE STUDIES 299 Why Django? We asked each developer why he decided to use Django, what other options were considered, and how the decision to use Django was ultimately made. Ned Batchelder Before I joined Tabblo, Antonio Rodriguez (Tabblo’s founder/CTO) did an evaluation of Rails and Django, and found that both provided a great quick-out-of-the-blocks rapid development environment. In comparing the two, he found that Django had a greater technical depth that would make it easier to build a robust, scalable site. Also, Django’s Python foundation meant that we’d have all the richness of the Python ecosystem to support our work. This has defi- nitely been proven out as we’ve built Tabblo. Johannes Beigel As we have been coding in Python for many years now, and quickly started using the Twisted framework, Nevow was the most “natural” solution for our Web application stuff. But we soon realized that—despite the perfect Twisted integration—many things were getting a little cum- bersome and got in the way of our agile development process. After some Internet research it quickly became clear that Django was the most promising Web development framework for our requirements. The trigger that led us to Django was its template syntax, but we soon appreciated all the other features that are included, and so Django was pretty much a fast-selling item. After doing a few years of parallel development and deployment (Nevow is still in use for some projects on customer sites), we came to the conclusion that Django is a lot less cumber- some, results in code that is much better to maintain, and is more fun to work with. David Cramer I heard about Django in the summer of 2006, about the time we were getting ready to do an overhaul of Curse, and we did some research on it. We were all very impressed at what it could do, and where it could save time for us. We talked it over, decided on Django, and began writ- ing the third revision to the Web site almost immediately. Christian Hammond I had toyed around with Django on a couple of small projects and had been very impressed with it. It’s based on Python, which I had become a big fan of, and it made it easy not only to develop Web sites and Web apps, but also to keep them organized and maintainable. This was always tricky in PHP and Perl. Based on past experiences, going with Django was a no-brainer. Getting Started Since Django’s a relatively new tool, there aren’t that many experienced Django developers out there. We asked our “panel” how they got their team up to speed on Django and for any tips they wanted to share with new Django developers. 300 APPENDIX A ■ CASE STUDIES Johannes Beigel After coding mostly in C++ and Perl, we switched to Python and continued using C++ for the computationally intensive code. [We learned Django by] working through the tutorial, browsing the documentation to get an idea of what’s possible (it’s easy to miss many features by just doing the tutorial), and trying to understand the basic concepts behind middleware, request objects, database models, tem- plate tags, custom filters, forms, authorization, localization . Then [we could] take a deeper look at those topics when [we] actually needed them. David Cramer The Web site documentation is great. Stick with it. Christian Hammond David and I both had prior experience with Django, though it was limited. We had learned a lot through our development of Review Board. I would advise new users to read through the well-written Django documentation and [the book you’re reading now], both of which have been invaluable to us. ■Note We didn’t have to bribe Christian to get that quote—promise! Porting Existing Code Although Review Board and Tabblo were ground-up development, the other sites were ported from existing code. We were interested in hearing how that process went. Johannes Beigel We started to “port” the site from Nevow, but we soon realized that we’d like to change so many conceptual things (both in the UI part and in the application server part) that we started from scratch and used the former code merely as a reference. David Cramer The previous site was written in PHP. Going from PHP to Python was great programmatically. The only downfall is you have to be a lot more careful with memory management [since Django processes stay around a lot longer than PHP processes (which are single cycle)]. How Did It Go? Now for the million-dollar question: How did Django treat you? We were especially interested in hearing where Django fell down—it’s important to know where your tools are weak before you run into roadblocks. APPENDIX A ■ CASE STUDIES 301 Ned Batchelder Django has really enabled us to experiment with our Web site’s functionality.