Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2009
    Posts
    115
    Thanks
    2
    Thanked 10 Times in 10 Posts

    Content Management with MySQL

    I'm doing a site and my client wants to have the ability to change the content of the different sections of the website.

    There's more than one way to do this, but I think the way that would be easiest for them (because they don't have web design experience) would be to just have the unique content of each page stored in a database. They can pull it up in their control panel and edit it, and when you visit the webpage it would just pull the info out of the database. It makes more sense than giving them a directory of files and giving them an interface to edit all the HTML and PHP code (which also means they could potentially destroy the site).

    It's easy enough have each page grab its contents from the database, I'm just worried about load times and bandwith. Does any of this stuff get cached, or would we have to take a trip into the database every time we load every single page? If so, is it fairly negligible?
    Last edited by Dean440; 02-01-2010 at 03:06 PM.

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    This is what the big content management systems do. The difference is that they tend to provide a WYSIWYG editor for content creation (see TinyMCE and CKEditor, for example). You really don't want to make site files available to your client - they will break the site and screw up everything they touch. If you insist on building your own CMS, give them a user interface for content creation.

    Regarding the db storage, the performance will depend upon the host. I've used Drupal on Dreamhost. Don't make that mistake - their database servers are painfully slow, and if you get more than one site hitting the database at the same, the requests may time out. Miserable performance. There are other hosts that will provide a respectable db experience, unless you're skimping on price.

    Caching is up to you. If you build it in, it can save load times. Otherwise, you'll hit the database fresh each time. This is something else that is included in the big CMS projects.
    Last edited by tomws; 02-01-2010 at 05:41 PM.
    Are you a Help Vampire?

  • #3
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    If the content is fairly static, making it dynamic, (i.e: not caching it), would be pointless. No use connecting to the DB unless necessary, and you can easily update the cached version when the master copy in the DB is edited/updated.

  • #4
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    Drupal or Wordpress would be my personal choice for this, depending on just how big and fancy the site is. Both have caching addons available to help performance and response times
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •