Friday, January 16, 2009

Python Preview

In order to do much with Google App Engine, Python server programming awaits with its strange mix of being an old programmer's program and being of the future with a direction that will carry us away from everything as we've known it. Python is different from programs like PHP or Perl or ASP because it isn't a scripting language. It's a real meat and potatoes programming language that can go toe to toe (maybe, almost) with the likes of C++. To work with Python, server side developers will spend the most time figuring out how to put data in a list or a dictionary or some combination of the two. The Python book is 5 inches thick but I spend most of my time around page 20, preview about lists and dictionaries because to get my data processed, this was the only way. (My data being strings of json-like recordsets)

And there is a good reason for that. It is not necessary to name fields or columns or components. Python doesn't care. Just stuff the data into a lists, put the list in a dictionary and follow a few rules to iterate through it. It's not even necessary to declare the data types. Python does that invisibly at run time based on what it finds in the containers.

It works beautifully with Google's Big Table. Formal database records with their keys and nomalized relations are out the window. Goodbye to recordsets and table joins. Who needs a table schema? The process of defining the list and dictionary in Python creates dynamic objects. Which are all any reasonable server needs to manipulate the data before sending it off to any of its possible destinations.