About a blog

November 13, 2008

This is the first post on my new blog, so I may as well start out by explaining how this thing got here.

So, I've never actually had my own blog before. I've set up blogs for others and I've played around with different blogging software, but when it came time to create my own, it took me a while to decide how to power it. I started with a list of criteria for I wanted for my CMS:

  • Is secure
  • Allows user comments
  • Provides some sort of caching (of DB queries, rendered pages, whatever) to help the site scale
  • Can be extended and has a code base I'd actually want to extend
  • Stores templates in the filesystem, not in the DB
  • Can be deployed in a shared hosting environment
  • Is free or inexpensive and is open source

I also had one other sort of "bonus" criteria which I didn't insist on but which would be nice:

  • Is written in python

Wordpress was a natural starting place to look. Everyone uses it, it has lots of plugins, lots of themes, its admin interface looks slick. What killed it for me, though, were the numerous vulnerabilities and security holes that made me wonder if their development team knew what they were doing. I also took a look at some of the source code and thought: "this is a mess. No way do I want to use this."

I also looked a Textpattern, which is another php-based CMS and Radiant which is a Rails-based solution. I liked what I saw of each of them (in fact I've used Textpattern as a CMS for a site I built for a friend), but they both have one very annoying feature (one shared by a lot of blogging CMS), which is that they store template code in their database and force you to edit it through their web admin interface. I find this practice annoying; I do get why it's very nice for novices, but I like being able to keep code—templates included—under source control and I like being able to use the text editor of my choice without constantly copying template code from browser to editor then back. Textpattern does have a plugin that kind of works around this, but it feels like a hack. In the case of Radiant, there is also the fact that it does not (yet) have a user comments feature. There has been some development there but it's still alpha.

I have lots of experience writing code in python and I love the language, but I found that there really aren't that many python-based CMS out there. The big exception to this is Plone, but it's being built on top of zope 2 pretty much rules out using it in a shared hosting environment. So I did what any bad programmer would do: I wrote my own. Reinventing the wheel really is an occupational hazard of programmers and normally I wouldn't recommend anyone roll their own blogging software. Even though I probably could have gotten by with an existing CMS, I thought writing my own would be a good project and, once I get the project a little more polished and well-documented, it might be able to fill a niche for a good python-based blogging CMS that's not as massive as Plone.

I chose Django to help get this built. I'll write about my experience with it soon, but, suffice to say using only my spare time I had this blog up and running in about a week (ugly but temporary design included). It has exactly the features I want and is very easy for me to extend and improve. I also did it in less than 500 lines of code, thanks to Django.

Tagged with: , , .

Leave a comment:

Comments are closed for this entry.