Initial thoughts on Python and Django
Posted on Monday, Aug 27, 2007 at 11:48 PM in Programming, Python, Django
In an effort to learn a new skill and get some much needed exposure to another programming language, I've started learning Python. Its a very neat language, and its use of whitespace to organize code pleases the code style nazi that Sandy has instilled in me. Reading the code itself, its refreshing how uncluttered it can be without curly braces, dollar signs, and semi-colons all about. It takes a little getting used to, as I do find myself looking for braces to delineate a function definition, or an if-block, and still litter an occasional end of line with a semi-colon.
I've learned how to use exceptions to handle errors, which out of habit and lack of necessity I haven't used in PHP. I haven't gotten beyond a simple procedural program yet, but there's a lot of power under the hood in all the libraries available for python.
As a result, I've been reading up, and doing the online tutorials for the Django framework. I chose Django after reading Please Teach me Web Frameworks for Python!, and the comments for that entry. TurboGears was highly recommended, but three things steered me towards the former. First, Django seems to be a more integrated suite of components (DB/ORM, Templating, Controllers), while TurboGears lets you pick and use a "Best-of-breed" component, defined by you. Second, Django provides a useful admin application for free, which you'll be very impressed with if you follow the tutorial. Last, but not least, the Django book, available for free online, was a very accesible, easy to read, and informative resource for learning about the different components and how they work together. I wish more web application frameworks, particularly the one we use at work, had such good introductory documentation for orienting new developers.
I haven't gotten very far with Django yet, but I do plan on using it for my next online project. I recommend you look at it too.
Comments
Oscar says
subconsciously influenced me to try python now. One key thing for me was how productive I could be
out of the gate, something other languages (like C or Java) didn't hit.
Jason Lefkowitz says
that one of the joys of Python is how quickly one can be up and productive with it. I'm at the
point now where just about anything I do that's not Web-facing, I do with Python -- including
lots of stuff that in ye olde days I would have done with a bash script...
Nyk Cowham says
everything currently available. Perhaps it is because it has all the expressiveness of Perl, but
with the clean OO of Smalltalk. I love the fact that it has no primitives and everything is an
object. I find a construct like: 10.times do doStuff end ... perversely satisfying. I would rate
Python & Ruby both above PHP and Perl in terms of overall satisfaction.















Jason Lefkowitz says
;-)