View Full Version : how do you structure your sites? includes? seperate pages?
02-03-2004, 04:31 PM
i recently did a site where there's a master index page, and then each main area of the site is a file with only markup for content that is included in the body of the index file when needed.
typically, i like some form of this modular approach, but i did realize today that this makes it a little trickier if, say, i want a popup to open on only one page. the friendly onLoad option isn't available for most attributes, and putting it on the body is obviously not an option since all areas of the site are loading index.cfm.
what are others' thoughts on these things?
Up until now I've mainly resorted to just SSI, and using includes for the repetitive parts of a page. I've played around with PHP/mySQL and a few template systems, though for me, SSI is good enough in most cases. And you can't beat the reliability and performance of SSI pages versus dynamic.
Personally I use a templating system everywhere I can these days. It makes it easier for sitewide changes with minimal work, as well as easily skinning the site for new updates. Using PHP/MySQL combinations along with intuitive JS includes, I can use that same templating file but still serve up unique pages (keywords, description, UI considerations such as your individual popups, etc.) without much alteration. It also allows me to completely separate my code from my content. Although there are considerations for caching, depending on how much traffic you expect, but that is something that can be added into a site fairly easily.
Includes, such as WA mentioned, is the predecessor to my method, and I used them myself in the past. I simply find the more advanced options do a better job, especially with large or data-heavy sites. You certainly can do this through simple includes or executables, though it may not be as streamlined or easily customizable as options that flow from a templating system with a DB backend. But it certainly can work, at the appearnce level, just as well. Even though I keep trying to talk WA into letting some of us do a templating or full-blown CMS for JK =]
02-07-2004, 07:17 AM
I've been playing with entirely dynamically generated sites using a "clean URLs" approach - http://af.brothercake.com/dropdown/ - other than the demo pages, the main site is just one page, with all the data passed in query strings - like "c" for the URI of a content file, and "s" for subcontent - but over the top of the that I'm using mod_rewrite so that the URLs in the status bar make it appear to be a static site - which is better for google, and easier for people to remember the URLs.
The data source itself is include files - the main HTML content is merged into a template. The beauty of this approach is that I can change that in the future without the front-end appearing to change at all - call my data from a DB, or from XML.
There is a performance hit there by the amount of pre-processing I'm doing, and other lesser disadvantages, but I don't mind that for how much easier it is to maintain.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.