Django 101
At work I've started working on a portal written in Python using the Django
framework. And I have to say I'm pretty impressed. Django does large
quantities of magic to make mothe model data accessible, the templating
language is pretty spiffy (it's about on a par with ClearSilver, which I'm
more familiar with - each has bits that the other doesn't do), and the
views and url mapping handling is nice too. I can see this as being a
very attractive platform to get into in the future - I'm already considering
writing my Set Dance Music Database in it just to see what it can do.
So how do I feel as a Perl programmer writing Python? Pretty good too. There are obvious differences, and traps for new players, but the fact that I can dive into something and fairly quickly be fixing bugs and implementing new features is pretty nice too. Overall, I think that once you get beyond the relatively trivial details of the structure of the code and how variables work and so on, what really makes languages strong is their libraries and interfaces, and this to me is where Perl stands out with its overwhelmingly successfull CPAN and Python, while slightly less organised from what I've seen so far, still has a similar level of power.
About the only criticism
I have is the way the command line option processing is implemented - Python
has tried one way (getopt) which is clearly thinking just like a C
programmer, and another (optparse) which is more object oriented but is
hugely cumbersome to use in its attempt to be flexible. Neither of these
hold a candle to Perl's GetOpt::Long module.
posted at: 13:53 | path: /tech/web | permanent link to this entry
All posts licensed under the CC-BY-NC license. Author Paul Wayper.