Django: Python on a PlaneBy Darryl K. Taft | Print
Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers
The Django Python-based Web application framework brings to Python developers the same kind of ease of use and rapid development capabilities that Ruby on Rails brings to Ruby developers.The Django Web framework makes it easier for Python developers to create Web applications more quickly and with less code, said the lead developer of the open-source project.
Indeed, the Django framework is known as the Web framework "for perfectionists with deadlines," as the technology comes out of a newspaper operation where its developers created Django out of the need for technology to help journalists meet deadlines.
Adrian Holovaty, the principal developer of Django, and himself a journalist, said, "We had spent a few years building and perfecting a framework that let us create intensive database Web sites quickly."
Indeed, if Ruby on Rails speeds up Ruby-based Web development, Django could be considered as "Python on a plane" for what it provides Python developers, one observer said.
Django originated when Holovaty was working at the World Online, the online arm of the Lawrence Journal-World newspaper in Lawrence, Kan. In the fall of 2003, Holovaty and a colleague, Simon Willison, decided against using the PHP language and began using Python to develop World Online's sites. They soon created a framework to help the organization turn out Web applications under deadline pressure. Sometimes they only had a matter of hours between coming up with the concept for an application and the time it was publicly launched, Holovaty said.
Then, in July of last year, World Online open-sourced the software that became known as Django, he said.
Holovaty, who now works for Washingtonpost.com, said the initial purpose for Django was "to automate the repetitive stuff and make it fun and easy to build database-driven Web sites. We decided to open-source it for a variety of reasons, including getting development help and bug fixes from programmers around the world and marketing our commercial news CMS [content management system] product, Ellington."
Ellington is a Django-powered content management system.
Next Page: Python creator prefers Django.
In a keynote at the recent SciPy conference in mid-August in Pasadena, Calif., Guido van Rossum, the creator of the Python language, proclaimed Django as the preferred Web framework for Python development. SciPy is a conference on scientific programming with Python.
In an e-mail exchange with eWEEK after the SciPy conference, Van Rossum said: "I was pressed to pick one frameworkwhich I think is actually a silly thingand I reconfirmed my preference for Django."
What Van Rossum says he meant by the pronouncement at SciPy is, "Simply that if I were to need a Web framework today, I'd use Django unless it was clear that Django isn't right for the task.
"I don't do a lot of Web programming, and the Web programming that I do isn't very complex, so I'm not sure that my vote should count very strongly," he added. "But people keep asking me to pick one, and I like Django because I like the way its authors run their project: They really 'get' open-source development."
Of Van Rossum's pronouncement, Jacob Kaplan-Moss, one of Django's core developers, said in a blog post: "Obviously this makes me pretty damn happy. I'm sure this will help people trying to choose a Web framework to come to Django, and I think they'll like what they find. Personally, I think Django's the best tool to develop Web sitesbut of course I think that."
Holovaty said he and the core group of Django developers "chose Python because we'd fallen in love with its beauty, elegant syntax and power. Python is like poetry."
The plan for Django is to continue improving it, with its worldwide community of users and developers, Holovaty said.
"Our goal is to solve the real-world problems that Web developers face every day, and to make it fun to build Web sites," he said. "We're hoping to reach Version 1.0 toward the end of the summer, and we're working on a Django book to be released in the fall."
And while Django can be compared to frameworks like Ruby on Rails and other Python Web frameworks, "something that makes Django different from similar projectssuch as Ruby on Railsis our interest in abstracting things to a very high level, automating large chunks of Web development," Holovaty said.
For example, Django can automatically create an "administration" Web site, saving developers days to weeks of mundane development, Holovaty said. "We've got some other examples of high-level automation coming down the road, within the next few weeks."
In addition to being a boost on the development side of things, Django is also quite scalable, Holovaty said. Django is designed to take advantage of as much hardware as you can throw at it, he said.
Moreover, Django "uses a 'shared-nothing' architecture, which means you can add hardware at any leveldatabase servers, caching servers or Web application servers," said an FAQ on the Django site.
Holovaty, who plays guitar, said he named the Web framework after Django Reinhardt, a jazz guitarist from the 1930s to the early 1950s. Django is pronounced "Jang-oh," he said.
Being a journalist who programs is a "nice niche," Holovaty said. "And, boy, does the journalism industry need help in this department," he added.
In an interview with the Online Journalism Review, Holovaty said of his dual role: "The main value in understanding programming is the advantage of knowing what's possible, in terms of both data analysis and data presentation. It helps one think of journalism beyond the plain (and kind of boring) format of the news story."
Indeed, programming helps to automate what Holovaty said are the three basic tasks of journalists: gathering information, distilling information and presenting information.
"'Doing journalism through computer programming' is just a different way of accomplishing these goals," Holovaty said in the OJR interview. "Namely, the technique favors automation wherever possible."
Among the sites that use Django are lawrence.com, a local-entertainment site for Lawrence, Kan.; chicagocrime.org, a freely browsable database of crimes reported in Chicago; LJWorld.com, the web site of the Lawrence Journal-World newspaper; washingtonpost.com, the Washington Post's Web site and collection of Web database applications; Tabblo, a photo-sharing site; Toronto Life, the Web site of Toronto's city magazine; and lawrencechamber.com, the Web site of the Lawrence Chamber of Commerce.
Check out eWEEK.com's for the latest news, reviews and analysis in programming environments and developer tools.