MT As a DBMS

I don't know what the hell I was thinking - that totally works. For some reason, I kept thinking that MT template tags wouldn't work in a PHP file because they wouldn't get updated. I created two categories just for the side bar: Recently Viewed and Reading. Then I made a new index template that contains everything in the side bar - since index templates are rebuilt when a new post is made (as far as I know, anyway), my side bar file is updated. The CatEntries plugin allows me to filter what categories are displayed. In the side bar, the last 5 posts from Recently Viewed are shown, and the most recent post from Reading. The index page excludes these two categories, but they still appear in monthly, daily, and category archives. It's a neat way to use MT as a database management system.

Originally, I wanted to avoid a PHP include; I was so hell-bent on performance that I wanted to eliminate any PHP and make all pages static (because, you know, thousands of people are checking to see what I write EACH AND EVERY DAY). Realistically, a single file include isn't going to affect performance in the slightest. I may add a couple while(1) loops just to be sure, though.

1 Comments

Static pages are quick but

Static pages are quick but what really kills sites that use all this dynamic voodoo is poorly written calls to a database. Doing dumb stuff like Select * from table kills performance. Only grab what you need and if you are getting hammered (in our dreams right?) setting up a cache-based system will make things much faster.

Syndicate content