CMS question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm working in a fairly robust content management system for our company's  
websites, and have a question regarding the file and directory structure of  
the site.

Currently, I'm populating all content from each page using data in a MySQL  
DB, and php to call the DB and push out the info. Fairly standard right?  
Well, my question lies in the best approach to take regarding the file  
structure. Basically, as of now, I can make the entire website essentially  
ONE page, as I'm simply filling in content based on the link the visitor  
clicks on. I build the links on the fly using PHP and contentIDs from the  
DB, so even though each page is "different", it's all the same file.

My question is really the disadvantages of this. Though it's very easy  
because I can make code changes on one page, I'm looking for some major  
algorithmic disadvantage here that I cannot seem to come up with as of now.  
The only problem I've found is regarding what happens if the visitor hits  
the page without a query string being passed. In the past, I've ran a check  
on this as each page had a separate file (instead of just one index.php  
page, it would be something like /members/index.php). Outside of this, I'm  
not sure where the problem with his method lies. Can anyone shed some light  
on a major disadvantage I may be missing here?  

Re: CMS question

I personally use a single index.php file for everything, but I have
mod_rewrite setup on apache to convert urls like:


this solution makes it easy to maintain (since it's all in one central
file) and also will make it "search engine optimized".  from what I
understand, for the most ideal SEO, you shouldn't put everything into a
single file, but mod_rewrite will act like it's using a complex
directory structure, even though it's really not. If you're interested,
I can send you the lines I used for mod_rewrite.

Re: CMS question

Adam Plocher wrote:
Quoted text here. Click to load it

I'd be interested in seeing this.


Re: CMS question

The no-query string problem can be solved with sessions.  If they dont
have a session then show the main index page.

As for the single page deal, I really cant think of a disadvantage to
multiple pages.

Re: CMS question

Jon wrote:
   I'm looking for some major
Quoted text here. Click to load it

push all output through a print function that takes a file handle
as a parameter. That way you can run in dynamic mode (STDOUT) or  
alternately and write the whole site out as static html.
With static html you don't have to worry about algorithmic performance.
site_bot at works that way.

Quoted text here. Click to load it

if($query_string == NULL || $query_string == "")
    $query_string = "some default pageID or whatever you need";

Dynamic screen printing from a richly populated database schema is
the easy part. The hard part (in my experience) is
populating the database with good content.
The mechanics of populating the database is hard and the
problem of finding good content is even harder.

Re: CMS question

I had another CMS thought (CMS design and behavior is one of
my favorite subjects).

Slashdot ran a new item a day or two ago, about a UK
study suggesting websurfers judget websites in a few
nanoseconds. In other words, most surfers decide almost
instantly whether they want to continue exploring a
site or not.

That fits my own experience: that's what I do.
And one of the key nano-second decision makers for
me happens when my brower updates to yet another CMS
generated site, that not only looks just like a ten
thousand other such sites, it, like all of its cousins,
looks bad.

To be successful, CMS technology needs to provide more
administrative flexibility in layout design, and they need
to avoid those ugly three column, one or two horizontal
header rectangle layouts that all get filled with
jive random text.

It takes me about a nano second to recognize those sites,
and the first thing I do is click back to another tab, to
get away as fast as I can.

Re: CMS question

I dug up and read this study, very interesting. Though I don't feel our  
sites are aesthetically bad, it's nice to know how quickly a site fails to  
hold a user.

So what's the fix regarding CMS then? On one hand, our users want the  
flexibility of a CMS (instead of the pain of Contribute or other methods),  
but on the other by nature our sites become somewhat static because of the  
CMS - in particular with the 1-page design.

Is it feesable to include different areas on a page that can be activated,  
or deactivated on the fly via the CMS? Say a small table on the right hand  
side of one content area, that is only there if the contentID meets the  
condition? What are you doing to ensure your sites don't fall into the  
aesthetic vs flexibility problem?

Thank you for all the help to all btw - I'm hoping this thread continues a  
bit for more ideas, but there's my thanks now :p

Adam - I'd also like to see that mod_rewrite code - I've never worked with  
this at all, and am kind of interested. I like the fact that we can clean  
our URLs up while keeping the current functionality we have.
Quoted text here. Click to load it

Site Timeline