Forum Moderators: coopster

Message Too Old, No Replies

best practice in a homerolled CMS

write to a file or to the db?

         

bofe

3:35 pm on Dec 19, 2006 (gmt 0)

10+ Year Member



Is it preferred practice to write HTML content to a database, or to just read the file?

Here's the basic structure of a site I'd be working with:

>>> HEADER <<<

>>> HIGH LEVEL NAVIGATION <<<

>>> [contextual] NAVIGATION <<<

[[DYNAMIC CONTENT]]

>>> FOOTER <<<

Is it the preferred practice to store [[DYNAMIC CONTENT]] in a database or to just store the content in the filesystem?

Thanks!

henry0

3:57 pm on Dec 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hmmm, Your first sentence mentions HTML
Then below you mention "Dynamic Content"

Are you speaking about purely HTML tags, non-dynamic "fixed" content or a dynamic content DB generated?

If you want to store in your DB HTML tags then I do not foresee any advantages

A good way will be to store "pure unformatted content" in your DB
Then call a template that display DB content while formatting the results and displaying those results within the CSS or HTML/CSS template
Does that make sense

bofe

6:47 pm on Dec 19, 2006 (gmt 0)

10+ Year Member



henry, let me clarify.

the content itself is NOT dynamic. i believe a way to phrase this would be that the CMS would be dynamically serving static content.

henry0

8:58 pm on Dec 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Got it!
if the content is not dynamic per se, you could load it in a DB.
it could be a good practice in order to sometime later going dynamic (if you change your mind)
However I will be very careful in verifying that your CMS will generate clean URLs

Out of curiosity
if the content is static what is the advantage of using a CMS
if you use a CMS it will most certainly call for a templating system which in return will call for dynamic content.

Could you describe the system you envision (CMS)