what is the difference between a static web pages and a dynamic webpage? and which is better to use and why?
Static = Words and graphics which need to be changed manually. Dynamic = Either the users and / or admin can make changes through a web interface, or data is retrieved from a database. `````````` Static = HTML Dynamic = PHP, ASP, etc. ```````` `````````` Better? Static is very limited (ie, My Web 1.0 Homepage) Dynamic has endless possibilities.
Dynamic is a bit broader than just web interface to change or data from a database as you could have a non-CMS based site that hooks to a webservice so is consuming XML rather than a database though the overall concept is correct. I wouldnt really say there is a "better". Static is going to be the quickest and lightest if you simply need a brochureware site though making future changes will require editing the HMTL files themselves. If you want anything more then brochureware then it by definition has to be dynamic. The questions comes as to if you want to sacrifice speed, increase server load and increase chances of being hacked etc by having a brochureware site running in a CMS for ease of updating? Reality is that most websites will never get the volume of traffic where the difference will be that noticeable unless they are on the lowest of budget webhosting but it should technically be a consideration
Yes, very true.... I intended to come back and mention server load, and security, then got to busy. 'Good old HTML' still has several real advantages. You can have huge amounts of visitors to a static page (even on shared hosting), but with dynamic sites server load can quickly become a serious problem.