Django: Python's Rapid Web Development Framework
ucahg writes "Simon Willison has a post on his blog introducing Django, a rapid web development framework he and his colleagues are releasing into the wild. Hailed as Python's own version of a Rails framework, Django looks very promising. I'll be keeping a close eye on it as it gets more and more support..."
as they say, premature optimization is the root of all evil
Precisely. One of the cool things about Python is that you can write your app with it, run it through a profiler, and rewrite the bottlenecks in C/C++ if you really need to.
LOAD "SIG",8,1
Python is more verbose than Ruby,
Example? In fact ruby is more verbose than Python in some ways, because of the need for block delimiters.
doesn't allow the same metaprogramming (closed classes! no anonymous functions!)
The classes are not closed, you can add methods and attributes to classes after declaration (classes are mutable objects). It's just that there is no direct syntactic support, which is not a big problem because normal user code (as opposed to framework code) doesn't need to do it.
And anonymous function are there, (lambda x: x*x), and it's not a problem to give function a temporary name because the names can be reused.
As for blocks (which you didn't mention, surprisingly), python 2.5 is going to have a "with" statement that does mostly the same thing blocks in ruby are used for.
doesn't allow you to use Python in the HTML templates
Come on, there way too *many* templating systems for Python.
Save your wrists today - switch to Dvorak
> I don't mind people reinventing the wheel over
> and over again but whenever you see people saying
> "Language X's answer to Rails" all the time, you
> gotta be thinking to yourself, wow, maybe I
> should try Rails FIRST and then try the
> knock-offs.
Disclaimer: I'm one of the two core developers of Django.
Django isn't a reinvention of the wheel or "copycat" of Ruby on Rails. We wrote it about two years ago for production use at the newspaper Web site I work for and have been using it since then. (I believe Rails was released one year ago.) It's a framework that was derived from our production sites.
Frankly, it's not intended to be an "answer" to Rails, and I'm disappointed (but not surprised) it's being talked-about as such. Rails and Django solve different problems. Django is more suited for content-management, because it gives you a lot of content-management capability for free.