November, 2005

Querying the Context

An important part of any ORM is being able to easily query the objects contained in the database. Not every ORM handles this particularly gracefully.

Probably the most graceful I’ve seen is the Pythonic query in Dejavu where you literally write Python code which gets disassembled and turned into queries under the covers.

One of the least graceful is the SQLBuilder module which is part of SQLObject. While I recognise the vast amount of really clever code that goes into making SQLBuilder work, I just find it icky. Note: This is just my personal opinion. Read Querying the Context »

Counting Pythons In My Sleep

In my professional life, I work with COM (pity me). One of the things I really like about JavaScript and Java is the fact that they use garbage collection rather than reference counting.

I just discovered that Python also uses reference counting, but includes a garbage collector. From my primitive tests, the garbage collector doesn’t seem to be turned on by default.

Google Analytics Online

Well, it looks like Google has finally started feeding data into Analytics.

Unfortunately, it doesn’t seem to support Safari.

That’s annoying. I suppose I’ll fire up Firefox and see how newburyportion.com is doing.

Everybody’s Got An ORM

If you look at the python.org Web site, there are quite a few different object relational mapping (ORM) libraries for Python. The only one I’m really familiar with it SQLObject, because that’s what’s included with TurboGears.

Ian Bicking, the principal author of SQLObject, has done a really great job creating a library that supports Python back to 2.2, lots of different databases, and probably more features than I understand. However, SQLObject differs significantly from other ORMs I’ve used, like Hibernate and CoreData.

My goals for an alternative ORM are the following:

  • No Magic — The dynamic nature of Python lends itself to magic solutions, metaclasses and twiddling under the covers.
  • Conservative Network Traffic — In order to scale smoothly, Web applications (and any other application) must be extremely careful to optimise communication with the DB server.
  • Rich Support for Idiomatic Programming — Reducing the number of compromises necessary just because the data will live in a database will make developing applications quicker, easier and ultimately more robust. Read Everybody’s Got An ORM »

Google Analytics

Wow! Google just doesn’t rest. I just noticed on Micro Persuasion that Google is offering a free Web analytics package. The site seems to be a bit slow at the moment (surprise!) but I’m willing to give it a whirl here on newburyportion.com.