Evaluating Web Development Frameworks: Rails and Django (part 1/15)
This white paper, presented here as a series of blog articles, is a technical manager's guide to evaluating web development frameworks, with a detailed review of Ruby on Rails and the Django (Python) projects.
In this study we establish a list of evaluation criteria and then discuss and rate how well each framework addresses each criteria.
As your priorities and assessment may differ from ours, this report can be used as a road map for your own evaluation.
If you have already decided to use a specific framework or recently joined a team, this report may serve as a high level introduction, providing valuable context for your learning curve.
Start here: Whitepaper index
Anyone developing a dynamic web site these days should at least consider (if not require) a web development framework which provides a layer of abstraction and provides shortcuts for frequent programming tasks. A generally accepted architecture paradigm for web frameworks is the model-view-controller (MVC) which separates the content data structure (model) from the presentation of this content (view), and the handling of user requests for this content (controller).
There are many good MVC frameworks available for web development, written in various programming languages, with subtle (and not so subtle) technical and conceptual differences. The one creating the most buzz and attention is Rails (written in the Ruby language). Another project gaining momentum is Django (written in Python). Both of these are true MVC architectures.
Another approach to web development is to use a higher level, more complete web application, such as content management systems (CMS), which have a great deal of functionality already built in. The Xaraya project, for example, adheres to the MVC paradigm, has hook-able CMS level modules, and allows easy custom layouts and templates. And with its advanced data modeling (DynamicData) Xaraya also reaches into the framework arena. Having used Xaraya successfully for more than two years, I recommend it as part of anyone's website development arsenal.
However, we at Parkerhill Technology Group increasingly find the need for a lower level, lighter, framework for a number of projects. We have narrowed our alternatives to Rails and Django. This report presents my analysis. I have tried to accurately and objectively describe details of each project (especially those that matter most to us), and then give my analysis and opinion separately.
There are many factors to consider when evaluating a web development framework for your application development project.
Our perspective is that of a web developer, project manager, and entrepreneur, with specific needs that may vary from one project to the next. Our criteria and priorities certainly may not align with yours. Furthermore keep in mind this is a moving target, both Rails and Django frameworks are young, improving continuously, and gaining non-core contributions from their respective communities.
Disclaimer: While I come at this with a significant level of experience, this report is the result of my review without the benefit of having built a real project with either framework.
The following chart outlines my criteria which will be rated on a scale of 1 to 5 (1=worst, 5=best). The final results will be presented in the last section.
Evaluation Criteria Rails Django TECHNICAL Programming Language Framework Concept Directory Structure Database / Model URL Routing Controller / Views Templates Forms Data Administration User Administration (authentication, sessions) AJAX RESTful RSS/Atom/XML Internationalization / Translation Caching Security TECHNICAL SCORE
SUPPORT Project / Community Documentation
User Extensions Development / Debugging Test Tools
Let the Flames Begin!
So let's get the emotions out of the way first. There's no avoiding it, some people are very passionate about their favorite technologies. I've read many blog postings comparing Rails and Django (plus the dozens of comments they generate). Some people are firmly positioned in one camp or the other. Some people say "Hey, they're more similar than different so just choose what you prefer". And others have done some sort of honest comparative analysis. If you're interested, do a Google search on “rails django”. Here are a few good ones:
- Video of debate between Adrian Holovaty, creator of Django, and David Heinemeier Hanson, creator of Rails: http://www.djangoproject.com/snakesandrubies/ (Dec 3, 2005)
- A simple quantitative comparison by implementing a small project in both frameworks http://docs.google.com/View?docid=dcn8282p_1hg4sr9
- A detailed analysis, a bit out of date: http://magpiebrain.com/blog/2005/08/14/a-comparison-of-django-with-rails/ (August, 2005)
- And here's one comparing performance: http://wiki.rubyonrails.com/rails/pages/Framework+Performance
- Someone's personal experience, for what it's worth: http://blog.carlmercier.com/2007/01/30/why-i-moved-from-ruby-on-rails-to-pythondjango-and-back/
- This is funny, kind of sums it up for some people: http://www.djangoproject.com/weblog/2006/dec/06/comparisons/