Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now


Dynamic Web content

Dynamic Web content

Jul 1, 2002 12:00 PM, By William Harrison, Jr.

In these days of dwindling budgets and personnel, improving your Web presence can seem costly, but it may turn out to be a sound investment in the long run. With a larger Web presence you may reach a larger audience, or sell more online advertising. Adding dynamic content is one way to give the impression that you have a larger presence that you really do, and it can be done for next to nothing.

It’s not rocket science to add dynamic aspects to websites. It just takes a little patience and know-how, and the ability to search on Google to find help from those who have gone before you.

Regardless of the type of server you run (Linux, Windows, Solaris),the principles are all similar. The same can be said for programming languages: the correct programming language is the one your server supports, and the one your programmer is comfortable using. Personally, I believe in open source software, so my examples may be slightly biased towards those using Linux variants, but if you have the money to spend, there are commercial solutions available that are ready to fulfill your needs.

Schedule, schedule

Probably the easiest way of using dynamic content is to create it ahead of time, and let the server post it at scheduled intervals. Perhaps you want to change your homepage every Sunday morning, but don’t want to work during the weekend. No problem. On Friday, create the new version of the homepage (for example, let’s call it sunday.html) and use a scheduler (cron in Linux and Unix variants; AT in Windows) to copy the new file over your old homepage file. Just be careful when you set this up; if you schedule it to run every Sunday and you forget to create the sunday.html file, you may end up with no homepage at all when you come in Monday morning.

A site search capability and a date stamp are two easy ways to enhance a website.

The most useful example of dynamic Web content may be the �What’s on Now� or �Now Playing� feature (which is strange, because there are few scripts available for download that do this). People come to your site to look at your programming schedule, but what if they’re only interested in finding out what’s playing now or what’s coming up next? Using the method above, you could create a homepage for each hour of each day, all almost identical except for what’s playing now and next, but that’s a lot of files to have to worry about.

Instead, you could use Javascript to determine the day of week and the time of day, and then use a series of if/then statements to display the appropriate information. As a side note, try to avoid using Javascript for date and time functions because it returns the date and time of the user’s computer, so a user in California viewing a website in Virginia will see an incorrect time. Use a server-side language like PHP or Visual Basic because it will return the server time. There’s a second hidden benefit to using a server-side language as well: you will minimize the bandwidth (and consequently improve load time) because you won’t be sending lots of data that the browser won’t be displaying.

Step up to the mic

Perhaps the most dynamic content is the kind you don’t create yourself. There are a lot of people out there, and most of them would like a place to share their ideas with others, so why not let them be shared on your site? Many good discussion board software packages are free (open source), take up little server space or bandwidth and keep people coming back to read and reply, especially if you use a discussion topic that people feel strongly about. Start a political board, a recipe exchange or even a feedback forum where users can post their comments on concerts given by local bands.

If you’re not comfortable giving people access to post on whatever topics they desire, then limit their options by using a poll. You choose the question and the answers. All the users get to do is vote. Again, it’s quick to set up, inexpensive and takes care of itself once it is running.

Save the date

Try adding a calendar to your site. Include programming schedules and cultural events covering your local listening area. Music stations can create relationships with some of the concert venues in the area, and allow them to enter information for their performances into your system. Promote local appearances by station jocks and other station activities in the community.

There is a lot of free content out there. The National Weather Service provides forecast information for all 50 states, based on ZIP codes, in either a human- or machine-readable fashion. Writing a simple script to request this information, parse it and display it can’t be too difficult because there’s an open source project doing it already (PHP Weather on SoundForce). Look at the examples and it should all be straightforward.

Additionally, there are news services that can provide your site with headlines on a regular basis, using Javascript to pull them from files on other servers. This is useful for getting others’ content to appear on your site, but be aware that you may have to put up with a delay in page load time while the user waits not only for your server to respond to them, but also for the other server to respond to your server. NPR-affiliated stations can use some of the modules available for shows such as All Things Considered, which provide information about the day’s guests and show topics, and display them on your site automatically. Check with your syndicated program provider to see if similar services are available.

Content management systems

Considered to be the holy grail of website management is the content management system (CMS). There are hundreds of options here, from freeware open source solutions such as Zope and Phoundry, to those that cost thousands of dollars, such as Interwoven, Vignette and Microsoft’s Content Management Server. Most of these allow multiple people to have certain access to perform certain tasks, such as upload a new page on your site, schedule content to appear on the homepage or edit and approve a piece of content before it is posted. They can be sophisticated, storing everything in an Oracle database, or simple, storing each page in its own HTML file. They can be flexible or rigid, depending on the product and the people setting it up.

The key to having a good CMS is finding a person or company to set it up correctly from the start. Most of them are not viable out-of-the-box solutions, but rather toolkits to enable you to take various aspects you like and weave them together to perform particular functions. They need to be customized to your particular application to be as flexible as possible in the future.

Words to the wise

  1. Start simple: Display the date on your pages. Yes, it’s cheesy; yes, most people realize it’s being done automatically, but it’s quick and easy and can be done with almost no technical know-how.
  2. Add a search box to each of your pages. It doesn’t have to be big, but make sure your users can see it immediately. The quicker you can get the user what they want, the more time they have to spend looking around your site.
  3. Whatever it is you want to do, odds are it has been done before. Before you go off to create your own version of it, do a few searches and take a look at how others have handled it. Keep what you like, throw out what you don’t like and go from there.
  4. Investigate sharing your work with other stations. If you want to add a particular feature to your site but can’t afford to, maybe you can partner with another station interested in doing something similar.

Harrison is manager of Web technology for WETA-FM and WETA-TV, Arlington, VA.

More online

Sources of ideas and ways to implement them can be found at these sites: