Why bother with Scripting?
If you've been using plain old HTML to build your pages you may be wondering why there is such a fuss about web technologies such as ASP and PHP. The truth is, no matter how good you may be at producing your pages, there are some tasks, particularly related to maintenance, you would rather avoid. Server side scripting can do a lot to automate these necessary but laborious tasks.
Let the Script do the Work
One of the more compelling reasons as to why you should bother with scripting is that it can save you time, a lot of time. A well made script can easily beat even the most proficient "cut and paster" when it comes to adding a link to all the pages of a site, and will win hands down when it comes to rearranging the order of links of all the menus of a site.
The reason why scripting is so good at tasks like these is because it can parse a file containing data and display that based on the nature of the information or pre-defined templates. So if you had a file listing all the links of your site, you could have a script read it and build a site menu while making sure that there are no links back to the page currently being viewed.
Speed is of the Essence
The content on the Internet is in a constant state of flux. If you have the same old stuff on your site, day in, day out, then it will start to look a little stale. To attract and retain visitors, you need fresh content. When making pages in plain HTML, the only way to update the site content is to upload the new content over the existing files; but doing this to a strict shedule can be difficult.
With scripts, you can pre-write content and upload it to the server whenever it is convienient. They can then create the illusion of fresh content by either randomising what is available to them, or display particular files at a certain time of day or date. One way this can save time is by allowing pages and content snippets to be uploaded well before they are published, allowing plenty of time to prepare new content if it is needed.
Other ways that scripts can help to speed up site publishing and maintenance is by generating navigational links on the fly. It is certainly possible to create scripts that can sense where they are and build the links and menus accordingly; to the point where you can simply concentrate on the content and where it will go! Indeed, none of the pages at Web Site Owner that are called directly by your browser contain the code for any menus or search boxes; most are made up of a few server side includes and a call to the occasional ASP function - nothing more!
Ready Made Solutions
You don't need to find the time to create your own scripts to be able to utilise them on your site. Providing that you know where to look, you can find all kinds of pre-made wierd and wonderful site helper scripts doing a wide range of administrative tasks. Some create files that you can include into your page with an SSI call, others are full blown scripts that use templates and databases to create totally dynamic or random content from a fixed database.
Be careful when using scripts to make sure that you take all the necessary precautions to make them as secure as possible. Formmail was widely in use for a few years before it was found to have an exploit allowing spammers to use the script to send out their emails. While free open source scripts are a great way of learning more about a particular scripting lanuage, you might want to think twice before allowing it to run on your server; as most of the free scripts available are provided "as is" with little or no support.
Of course, the scripting language that you use is limited to what is available on your server. Perl usually comes as standard with all paid hosting packages, so is widely supported. PHP is quickly gaining popularity because it is free and integrates well with MySQL and HTML, providing a cheaper alternative to working with Active Server Pages (ASP). Having said that, ASP is probably the easiest way for a complete beginner to learn scripting as the default language (VBScript) is more human readable than the likes of Perl or even PHP.
Still not Convinced?
Without scripting there would be no way that I would be able to look after a site of this size. I would loose my patience with all the cut and pasting I would need to do just to add a single page to my site, and I probably wouldn't be able to forgive myself if I wanted to rearrange the links completely. Maintaining the internal links alone would result in very little new site content at all.
Once you realise just how powerful scripts can be when looking after your site, you may never want to work on a static HTML page again...
