Dynamic vs Static

Preparing the way from the dynamic system that's going to be coming in MT 3.1 lets discuss the differences between a dynamic and static way of managing content and clear up any doubts.

Static templating is how MT has been all these years. Everytime you make the smallest change or post a new entry you need to rebuild every single page it is connected to for the change to show up. Rebuilding these pages cause physical files to appear in various directories.

With dynamic templating this is all resolved. No more files, no more rebuilding. With 3.1 you can chose how you want MT to act ie:

  • Fully Dynamic - every single template is taken and parsed from the database when requested

  • Fully Static - there are physical files on your server taking up space.

  • Partly Dynamic - some physical files but others are dynamic

What am I going to do when 3.1 is released ? All my index templates I'm going to leave static whilst the all the archives are going to turn dynamic. Why ? Well the archives are the ones that take up the most space and take the longest to rebuild.

Dynamic vs Static

What are the benefits and disadvantages of each:

Dynamic

  • No Rebuilds - on templates that you have set to be dynamically published, changes will instantly be live.

  • No Files - many people complained about the space all these archives took, on my personal blog - where I've been blogging for just over a year - my archives total to around 10 megs. However this does have drawbacks. Since there are no files, when a page is requested, MT generates the page on the fly from the database. This means if you have a very prolific site that gets many hits, your database is going to be under tremedous stress. Also as dynamic content is reliant on your database, if your database goes belly up (ie crashes) and you don't have backups the chances of you getting your data back are less.

Many people have been asking me, since there are no more files will links still be picked up by spiders like Googlebot. I am not sure about other spiders, but Googlebot will still pick up the dynamic content, but again I am not sure about other bots (thanks to Aine for confirming this !)

Static

The only good thing I can think of with static content is that if your database suddenly crashes you can still recover your posts from the files. Also with spiders and bots, since static content produces physical files, they will pick up all the content as usual.

In the end, with MT 3.1 the choice is left completely to you, you can chose how you want MT to publish even on a template-to-template basis.

3 Comments

Richard said:
on Aug 11, 2004 2:07 AM | Reply

I have a half-dozen MT weblogs. Some have about 1500 posts with slightly more comments. Lots of internal tag use to slow down rebuilds.

Since I pay for adequate servers the rebuilds are quick enough and painless. Anybody who has been to a php drive site when MySQL takes a vacation knows that all they'll see is "can't connect to socket."

I wish people who want dynamically built pages the best. But there's an advantage in having already built pages resting on your server's hard drive.

I also have sites built using WP and TxP but don't think of the dynamic pages as a special feature.

Jay Allen said:
on Aug 13, 2004 8:25 PM | Reply

As Richard said, static pages front-load the work of compiling the MT tags so that each page load is faster. Not only that, and in the case of RSS much much more important, static files can be requested via conditional GET meaning that if the content hasn't changed, you're webserver doesn't have to serve up the whole file. That's a big bandwidth savings and one of the main reasons that you should never, ever, ever have a dynamic RSS feed.

Arvind Satyanarayan said:
on Aug 13, 2004 9:23 PM | Reply

Yeah I know about the RSS bandwidth problem, that's why I'm going to leave all my index templates to static - they're the ones that get hit the most !

Leave a comment

Preview