Ionrock Dot Org

by Eric Larson

My Weblog

Working with Frameworks

Lately, I've been working with Rails. So far it is nice, but getting back to databases is rather frustrating. XML solves the data problem elegantly and while there are issues with indexing to an extend, it really feels solved to me based on my Bright Content/Amplee work.

On the Python front, I've managed to use Bright Content for a CMS in a generic sense. This has been very simple and partly due to my experience writing and throwing away sample applications. Pylons has actually been a huge help in this sense because it has such helpful patterns. Usually, when I get stuck, I can take a look at whatever Pylons did and have a good direction on my own solution.

The result of this experimentation is something of a framework. I would imagine I could take the steps to really push forward my own custom framework, but with so many out there along with my use of XSLT (not a very popular templating system in the Python world), I'll let my grand scheme of becoming the next DHH slide.

I mention all this partly because of a recent article criticizing Pylons' conceptual integrity. Personally, Pylons (and TurboGears) have both been something of meta-frameworks. You wouldn't use them off the shelf most of the time. You would learn how they glue things together and tweak it to your liking. This could be switching out the DB layer for an XML based system or utilizing a custom session handling tool. Really the possibilities are endless. As I've become more opinionated as to what I should be doing with Python web development, I've used techniques and patterns from many frameworks that I found to be valuable. This methodology seems appropriate since this probably how Rails came about, the arguable father of the modern web framework.

The point here is (since it seems like I'm rambling) is that a framework is simply a tool. Some tools are magic as seen on tv tools that manage to do whatever they do out of the box with little effort. That doesn't mean you have professional fashion designers buying Bedazzle machines. As you grow in your craft, your needs change and you sacrifice certain constraints for more control. I'm not saying that Pylons makes and effort to be the framework for the advanced Python web developer, but rather that Pylons just makes an effort to change as you change. Eventually you still might ditch it in favor of your own system, but at the very least, Pylons will have served you well in the mean time.

Posted Wed Dec 19 22:27:34 2007 by Eric Larson
Created using Python, jQuery and Emacs