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..."
Okay, great.
Now when people talk about Rails you can say "ha ha, I'm better, I use DJANGO!" Or Subway, Maypole, Catalyst, Cake, or Trax, or whatever.
I've tried about half of those and none are *quite* as smooth as Rails. Anything in Perl or PHP is right out. Perl can do everything Ruby can, but with syntax that makes you want to poke your eyes out. PHP is a joke and can be dismissed without further discussion. Python is more verbose than Ruby, doesn't allow the same metaprogramming (closed classes! no anonymous functions!), doesn't allow you to use Python in the HTML templates, because Python is white-space dependent (okay, some people disagree about that last one, but I personally think the same language should be used in the templates).
Is Rails perfect? Hells to the no, Ruby is about as fast as a constipated 80-year old, and doesn't support Unicode, but if you want to talk ease of programming, Ruby is at the top IMO. Except maybe for maybe lisp or smalltalk but Ruby is a lot more pragmatic.
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. Don't be afraid of Ruby!
The Django ate my baby.
The opposite of progress is congress
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