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..."
Ok, and perl has catalyst coming. Now everybodies pet languages have their own rapid development web platform. Can we move on now?
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!
Catchy, no?
"Piter, too, is dead."
The {{ }} syntax is quite readable. I've been waiting for a decent Python template engine to jump on and migrate away from Java. Don't mind a performance hit when I get easier to read code that has a shorter iterative development cycle.
Waiting for WebLogic to compile a JSP is way too painful and having to write strait in Servlet is troublesome as well. Aside from going to Velociy templates, This looks very sweet indeed.
Nice to also have native JSON interpretation in the language to aid client (JavaScript) to server (Python) communication.
Will be keeping a close eye on this one as well.
The Django ate my baby.
The opposite of progress is congress
"... he and his colleagues are releasing into the wild."
Software developers need marketing skills. It's not a good idea to call your prospective users "the wild".
Nitro; another Ruby web framework which seems stronger than Rails in some areas.
Mmmmm, so much choice.
Tcl:
1) Is a very easy language to learn, so it can be used in the templates as well as the backend.
2) Has lots of nifty introspection features, so you can do quite fancy programming if you care to - since the syntax is so simple, you can even write new control structures in Tcl itself.
3) Tcl is sort of a pragmatic Lisp: http://philip.greenspun.com/tcl/
Unfortunately, we don't have the fancy web framework in place just yet, but I think Tcl is still one of the best languages out there for web coding.
http://www.welton.it/davidw/
"I'm new to Slashdot and still not quite understanding the mysteries of the editors."
Their mysteries are written in UTF-8, but they're trying to decode them in ISO-8859-1.
Thats why they often get confused.
I'm currently half-assedly developing a similar deal for PHP, but it lacks a lot of the features of Django. Anyone know of a PHP equivalent? Don't say Prado or whatever it was that won the PHP Coding contest or whatever recently, that seems to me like killing an ant with a nuclear warhead
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'm sure that Rails is spiffy 'n all, but I'd rather use a language that I'm already familiar with.
I realise at that point all the hacks will crawl out of the woodwork and tell me that any programmer worth his salt can pick up a language in no time, but that's not really true. Yes, any decent programmer should be able to get started with another language very quickly, but it takes some time to get used to the standard library that comes with a new language and it takes time and experience to get a handle on what the best way to handle a problem is in a particular language. When you start off with a new language (or even a new module or library), you spend an awful lot of time looking things up in the reference documentation.
I'd rather spend that time getting something done.
Gah! It's grammar, not grammer!
Reminds me of a Post-It I saw on a co-worker's desk: "Remember to check spelling and grammer."
I never challenge the spelling nazi's. There, I simply admit defeat.
That said, how do you pronounce "grammar"? My spelling "mistake" (languages evolve, right?) is due to my spelling it as I say it.
Anyway, either I spelled it wrong, or I was referring to nazis from grammer, IN.
Hey Daniel, Django hasn't even been "officially" released yet, so I apologize that you had troubles installing a pre-release version. We (Django developers) have been using the framework for a long time internally, but creating an installation script is something we've never had to do. That, and documentation, are our top priorities before we actually launch our first version. The cat got out of the bag a bit early, and before we knew it everybody was linking to our Web site, even though we only offer Subversion access to the code at this point. I can't complain that people are excited about our project, but I wish they'd hold off on judging it until we considered it ready for release.
Please. Not Tcl. It's ugly. It's even slower than Ruby. Has bizarre scoping rules (upvar, global, interp - just try chasing variables around in a moderately complex Tcl script where these are all used liberally). OO tacked on as an ofterthought.
I haven't done a lot of Tcl, but when I have had to work on Tcl code over the years it's been exceedingly painful.
Tcl was great in it's day (1989), but now Tcl is tired and needs rest.
+1, Informative.
Sorry that I don't have any real mod points to use at the moment.
It's pronounced gramm-ah, at least in Australia :)