Forum Moderators: phranque

Message Too Old, No Replies

what is better for server load html or sql

sql html load server

         

auday1982

5:12 am on Jun 5, 2007 (gmt 0)

10+ Year Member



hello guys

i am auday from iraq, i have iraqi sport news website, right now using joomla

little not happy because i want to go without limit, i have many ideas and joomla not giving me the chance

i know no php, but i am about to create a cms or a simple content management ( if you know one similar to what i want please help me)

right now i am confused which one is better fora website got 100 visitors a day

html pages or other mysql data base

i am going to create a cms that works like this

1- admin panel to post news

2- news saved as .html and the name is the topic ID, so we will have 12312312312.html save in folder for example /1 ( section 1) categries can be sub folder

3- when posting news i will make it u have the choice to select template for the page ( as many as we add so every news will look different or all the same but the position of page polls and module will be different )

4- you will have the ability to load special modules or just load the default ones for that news item, so news number 1 will have different poll than news 2 3 4 or maybe advertisement or something else

now should i make the cms save the news as html files or to databse?

i think database s processing and html is memory ( i mean the load )

please let me know from your view and why

thanks

mattur

10:38 am on Jun 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Static HTML pages will generally be faster, since they don't incur db hit(s). The two techniques are sometimes referred to as Baking and Frying. Each method has pros and cons:

Static pages (Baking):

Pros:

  • Pages are only published once, when the data changes
  • Generally faster, less resource hungry
  • Friendly URLs automatically
  • No db dependency, site stays up if db is down
  • CMS can be entirely separate from site (e.g. inside corporate firewall, on different platform)

    Cons:

  • Site-wide changes requires republishing all pages (takes time for very large sites)
  • Db and content pages have to be kept in sync
  • Dependencies between pages have to be tracked to work out what pages need to be republished when content changes (mainly a problem for larger, more complex sites)

    Dynamic pages (Frying):

    Pros:

  • Content on pages is always up to date
  • Site wide changes are easy (just change the generating templates)
  • Easy to customise/personalise content
  • Don't have to track dependencies
  • Probably easier to develop/implement (don't have to publish actual files)

    Cons:

  • Unfriendly URLs unless re-written
  • More resource hungry: each page view requires the page to be built incurring db hits, whether the data has changed or not
  • If db is down due to failure or maintenance then site is down, CMS is integral part of the site

    Or you can statically publish dynamic pages, and get a mixture of the pros and cons of each(!)

  • physics

    7:23 pm on Jun 5, 2007 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Welcome to WebmasterWorld auday1982!

    mattur has done a great job of presenting the pros and cons.

    Personally (and I'm a programmer so I'm biased) I would recommend having a database backed PHP site. 100 visitors a day should not be anywhere near the level where you would have to worry about seeing a big performance difference. If your CMS is done well there shouldn't be a huge difference in performance (remember that even for static HTML pages, the page has to be fetched from disk so it is not instantaneous). This is actually an old debate (whether static html is faster than a database for a large site) but really comes down to finding the right balance of what is fast and what is convenient/maintainable.