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?
I forgot to preview.
Okay, and Perl has Catalyst coming. Now everybody's pet language has it's own rapid development 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
if it were perl rather than python.
http://www.pearldjango.com/
Weird, I submitted this story to Slashdot a week ago when Simon first posted. I'm new to Slashdot and still not quite understanding the mysteries of the editors.
But hell, I really wanted to see what Slashdotters had to say about Django and glad to see the thread started.
I'm a web developer and Django looked pretty slick to me for building quick, cheap CLED (create, list, edit, delete) applications to edit simple datasets. We build a lot of these and I'd love to see a tool that allowed us to build them for clients for less than a grand.
We tried installing Django on our dev. FreeBSD box. It installed okay, once it was installed, the paths in the demo apps were not mapped correctly, and the styles were not in a place that apache and mod_python could find it. I'm sure with a few more hours we could have smacked it up, but for a rapid development platform, we just couldn't afford the non-bill hours to spend on it this early in the game.
I wanted to be an early adopter because it looked so cool, but I guess I'll have to wait until it's a little more mature. Plus, to my knowledge, it doesn't have an AJAX library like Ruby.
Perhaps we'll try Ruby on Rails after all. I know how to code in Python, but Ruby seems to be cake.
I've been reading Simon Willison's weblog for awhile, and he's a smart guy. I bet he'll help whip this thing into shape and Django will turn out to be something pretty damn cool.
Slices, dices, eats your lunch.
"... 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 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.
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.