If this page does not print out automatically, select Print from the File menu.

Make your website work

Nigel Whitfield explains everything you need to know about building a website but were afraid to ask

Nigel Whitfield, Personal Computer World 06 Mar 2008

One thing often said about the internet is that it’s egalitarian, in that anyone can set up a site or start an online store, and compete with everyone else.

Of course, in real life, things are a little more complex than that. While you might have been able to set up a site back in the mid-1990s and take on established brand names – in the way, for example, that Amazon appeared and became one of the most common ways of buying books and CDs – it’s less simple now.

Of course there will still be the occasional success story but, while it may be true that anyone can create a website and get it online, it takes a lot more than that to make it successful, well known, and able to cope with all the visitors it might get.

We’ll explain what you need to know about setting up or revamping a website, and look at some of the tools and technologies that will help you, whether it’s for a business, a community, or just to show off your new-found skills.

Website woes
So you want a better website? Chances are, if you’re on the internet, you have some web space – it often comes free with an ISP’s package and there are plenty of other ways to get a space of your own, such as the free hosting services offered by Yahoo Geocities, Google’s Blogger, or even as basic as creating landing pages (profiles) for yourself on Myspace or Facebook.

But these basic options have drawbacks – set yourself up on Facebook and other people can only find out about you if they sign up too. Similarly, some features on Myspace can only be used by members and, regardless of your views, many people may simply think “I’m not going to sign up just to look at Fred’s info”.

Free web-hosting services, while providing a page that anyone can look at without signing up to something, have their drawbacks too. Those can include pop-ups, over which you may have no control, a less than distinctive URL, and restrictive traffic limits and/or content controls.

These mean any site that becomes too popular may end up greeting users not with your finely crafted home page, but with a message that access has been suspended for a time because the site became too busy, perhaps because Digg or Slashdot users found it interesting.

Sometimes all it takes is word of mouth for that to happen, and suddenly your hilarious animation or song sample gets so many hits that the site goes offline. There may be other restrictions too; for instance, free space may be limited by size, so there isn’t enough space to store all your music clips or videos. You can pop them on other download sites, but then visitors find the experience confusing.

Or you may fall foul of small print in your contract stopping you from using free web space for business, or for the small political party you’re planning to launch.

When it comes down to it, while it has probably never been easier to get a basic web page of some description online, even if it’s just a basic personal profile, whether you’re using a social networking site like Facebook, or free space with your internet access, once you want to do anything more than the basics, it’s time to seriously consider your options.

In fact, even if you’re starting out, if you have an idea for a website and you think it might grow, it’s best to plan for the future. You might not think you need a domain name for your site, for instance, but if it takes off, it’ll be a lot simpler for users if the name or web address doesn’t change after a few months.

Similarly it’s worth researching other things too, to see how they’ll cope with growth – pick a simple-to-configure forum, and you may get up and running quickly now, but face a major headache if you have to migrate hundreds or thousands of users to different forum software when the site is busier.

What’s in a website?
So what do you want your website to do, and what do you need to make it do that? First things first, you need hosting – a web server that will store your pages and make them available to the rest of the internet. For all but the most trivial of sites, you need a suitable domain name of your own, too, so that people can find the site easily.

You need the site itself – and that could be anything from a collection of basic HTML pages to a more sophisticated database-driven site, packed with interactivity, or a multimedia extravaganza, with video clips, audio and the latest Web 2.0 features.

To put all that together, you’ll need the appropriate tools to create and manage all the web content – unless you go down the route of paying someone else to create the site for you.

If you’re making the leap from a simple site hosted on your ISP’s free web space, or on a free service, it might be tempting to sign up for a cheap hosting deal or grab a domain right away and then buy web-design software. But don’t do that just yet. All the decisions you need to make are interlinked and will impact on each other.

It’s far better to plan and decide how you want to build your site than to just grab what looks like a good deal, only to discover further down the road that it’s not suitable for what you want, leading to more expense and hassle.

At the most basic level – and this is something we’ll come back to later – the choice between Linux and Windows operating systems for a hosting server can have a massive impact on how easy it will be to use particular technologies for a website. All these questions have answers, though they might be different for each site.

Ultimately, they come back to the first thing you need to ask yourself about your website – what’s it for? Do you want to share information with people and tell them about yourself or your products? Or do you want to use a site to run a business, allowing people to request information or buy things online? Are you hoping to build a community where people can share information or experiences with each other?

From these basic questions flow others. How often will information need to be updated? Will you need to keep track of users? Will the site need to accept online transactions? Who’s going to design it? Or keep it up to date? How often will it change? How will people find your site? What would make the site a success – lots of visitors, or a few visitors who return regularly, or new contacts for work?

At its simplest, if your aim is a site that’s largely informational and won’t change, then your choice is easy – you can use just about any hosting service, and just about any web design tool – even, if you’re strapped for cash, knocking up the pages in Microsoft Word or Open Office – to create a set of static pages that you can upload from your PC to the website, refreshing the site each time you make a change.

It's pretty much the same as doing a simple home page in your ISP’s space, but with proper third-party hosting. But if you’re reading this article, the chances are you want something more sophisticated than that.

Picture this
Before we look at some of the more complicated options, there’s another type of site that doesn’t necessarily need lots of hard work to set up – a photo site. Whether you want to show off your amateur photography, catalogue the restoration of a classic car, or allow grandparents around the world to keep up with your family, an online gallery is a popular type of site.

Thankfully it’s also one of the easiest to make, with plenty of tools available to take the hard work out of tasks such as generating preview pictures or building index pages.

We look at how to make galleries in some detail here but, in summary, many photo-editing programs, including Photoshop, ACDSee and Irfanview, all have tools built in that allow you to create a web album with just a few clicks.

There are also standalone tools like Jalbum, and the PHP-based Gallery. So if your website is primarily intended to showcase pictures , it’s worth looking at tools like these.

The database is king
Of course, the majority of websites rely on words, not just pictures, and it’s fair to say that for all but a few informational sites, if you don’t keep updating, people won’t keep coming back. As a site grows, so the task of maintaining internal links and keeping everything organised becomes trickier, especially if you decide one day that you want to give the whole site a new look.

One way of managing that is to use templates and Cascading Style Sheets (CSS); change a template in Dreamweaver, for example, and every page that uses it will be updated to the new layout. Similarly, change the colour or type styles in your CSS, and every page that references that stylesheet will change automatically.

They’re both quick ways to update things, and found in most web design tools; you can also use standalone CSS editing tools to help manage your site. And if you have things like a menu navigation bar, that can be put on every page using standard Server Side Includes (SSI), where the server reads a file based on commands in the HTML.

So, for example, you could have a set of news links that appear on most pages held in a single file; update that file with your web editor and the new set of links will appear throughout the site. But once you get beyond a certain level of complexity, there’s little doubt that basing your website around a database makes a lot of sense.

Adding new information means updating the database, with no web design skills needed. Links can be generated on the fly, automatically ensuring, for example, that the five most recent news items appear on the front page, or that a ‘what’s new’ page shows changes in the past 30 days.

Often referred to as a Content Management System (CMS), once the templates are created and the database set up, anyone can update your website, just by filling in a form in a web browser.

More sophisticated systems can give different permissions to different users, so there’s no danger of a club’s social secretary accidentally changing something else when they’re only supposed to be adding diary events, for instance. There are plenty of open-source CMS packages, including Mambo.

Blogging software such as Movable Type is effectively a CMS but without some of the fancier options that you’ll find in a full-blown system for standard websites.

In fact, strictly speaking, some CMS systems, such as CM Simple, just rely on clever scripts and a load of text files – so too, incidentally, do some photo gallery systems, and blogging software. But if you expect your site to become busy, or want multiple people to update it, a database is a must.

Sticking to the script
This is where you have to start making tricky choices. While a database sits behind your website providing the content, the pages themselves – whether they’re part of a CMS or hand-crafted by yourself – will need to be written in a scripting language.

This typically looks at what the user’s request is via what link they’ve clicked, or a parameter in the URL, and then retrieves the appropriate content from the database, fitting it into the page so that what appears on screen is the list of forthcoming events, or product information for your Super Widget 3.5.

There are more scripting languages out there than you can shake a stick at, with a wide range of technologies, though the choice comes down to your philosophy and what you’re familiar with. For example, the open-source languages PHP, Perl and Python are very popular, with PHP especially good for creating websites that query databases. They tend to be used with Linux-based web servers.

Microsoft’s Active Server Pages (ASP) and .Net technologies will be more familiar to people used to programming for Windows, and tend to be used with Microsoft’s IIS (Internet Information Server) web server. That’s not to say you can’t run PHP on Windows, or ASP on Linux – you can, in both cases.

But the heritage of each language and assumptions made in some of the scripts available on the web mean that, on the whole, if you’re using a Microsoft programming technology, it’ll be best to have a Microsoft server.

There are other technologies that are more agnostic, of course. Ajax (Asynchronous Javascript and XML) refers to scripting that runs in the web browser, manipulating data sent from the server as XML, and it can produce some great website effects, regardless of whether your server is Linux or Windows.

To an extent, your choice may be dictated by the web design software you use too – go down the route of using Microsoft’s Expression Web and it’ll be pretty hard to code rapidly unless you want to use .Net.

But choose Adobe’s Dreamweaver and for many tasks you can put together a database-driven site that uses PHP and MySQL simply by running wizards or dragging and dropping, once you’ve entered the details of the database.

For a more hands-on approach to coding, tools such as HTML Kit can help you with a wider range of languages, including ASP, PHP, and many others.

Which platform and host?
Sometimes, the decision about which platform to use might be taken for you; if you decide that you like the features of a particular web forum, or you’re familiar with it from another site, and want to use it on your own site, then that may dictate what sort of hosting you choose.

For example, the popular open-source phpBB forum or the OS Commerce shopping package will probably both work best on a Linux server; they use the PHP scripting language, so you could run them on Windows, but when it comes to finding support and assistance, you’ll have an easier time of things if you go to Linux.

Similarly, you may have an application that relies on Windows services. The actual operating system of the web server isn’t the only thing you’ll need to consider – there are plenty of other questions too, like whether you have exclusive access to the server (dedicated hosting), or shared hosting, where other people may have sites on the same system.

This latter option is cheaper but if a runaway script on someone else’s website eats up all the system resources, yours might go down as well. It’s also worth asking what sort of control options you’ll have – for instance, many web servers offer a remote administration interface that allows you to set up the server through your web browser; it makes even configuring a Linux server simple.

But will you be able to access the Linux command line if you find it easier to do things that way?
You need to be clear about other things too – if there’s a particular application, whether a database or CMS or a piece of blogging software, that you want on your server, does it come pre-installed? If not, can you add extra software? Who’s responsible for applying security updates to the server?

Even if you can add extra software, what about more memory? What happens if your forum gets so busy that performance suffers, for example? It might be possible to ease things by putting more memory in the web server, but not all hosting companies will oblige – you may have to upgrade to a different package instead, which could mean a tedious transferring of all your data from one server to another.

Even if you think these issues are too exotic for you at the moment, there are simpler ones to consider when you choose a host, such as how much data you can transfer each month. Some firms offer unlimited data, while others will restrict you or charge you based on how much is downloaded from your site.

In that situation, the joy of hearing your site name-checked on a TV or radio programme can quickly turn to horror when you realise that you’re going to pick up a huge bill for the excess data traffic or even see your site suspended for excessive use.

On the side
Data traffic limits can be a particular problem if you have high-quality images, or want to put video on your site. Bandwidth can easily be eaten up by just a few visitors, so it’s worth bearing in mind that even some professional sites don’t host all their content themselves.

You can, for instance, use Youtube to host your videos or rely on Ebay to provide the infrastructure that backs an online store – it doesn’t have to be auction-based, either. Photos can be shared with Flickr, and mapping information courtesy of Google Maps. With a little work, many of these elements can be seamlessly integrated into your site, rather than sticking out like a sore thumb.

By pulling together these various elements with clever scripting, it can be much easier than in the past to come up with some genuinely useful sites that would simply have been beyond the means of many – for example, POI Editor allows you to create your own database of useful locations for sat-nav systems, thanks to Google’s mapping API (application programming interface).

You can even use Amazon’s vast S3 storage to provide extra space at a very reasonable cost, if your chosen hosting package can’t hold all the information you want it to.

It’s also worth remembering that, just as you can use services like Amazon S3 or Youtube in addition to your site, you can take a mix-and-match approach to hosting as a whole. You don’t need to buy hosting from the same company that sold you a domain name, for instance – and very often you might find the hosting that comes free with a domain name is very limited.

Pay particular attention to very cheap deals, which may simply redirect web browsers from your domain name to an existing web space. For the greatest flexibility, you should look for a domain registrar that allows you to control every aspect of your DNS (Domain Name Service), even pointing web and email traffic at different servers, for example. It may not be necessary to start with, but it can be essential as a site grows.

You’ll also need to make sure your site appears in search engines. Again, some hosting companies will help, and there are even companies that will submit your site to lots of search engines for a fee. Our advice? Don’t bother. With a few simple extra tags, and filling in a handful of web forms, you can ensure your site is indexed by the search engines that matter, such as Google and MSN.

For more on search tags and Google’s webmaster tools, take a look here and here.

Next steps
When it comes down to it, there’s a clear message – if you want to make the best website you can, don’t rush. Work out what it’s for. Work out the best way to present the information and keep it up to date. Then choose the tools to create it and find hosting that will let you do everything you want to now, and as your site grows.

If nothing else, we hope this feature has given you some inspiration to start thinking a little more in depth about your online needs. Now you can develop your own plan of action, and only then can you start the hard work of actually setting up domain names, servers, software and building your site.

www.pcw.co.uk/2211096
This article was printed from the Personal Computer World web site
© Incisive Media Ltd. 2008
Incisive Media Limited, Haymarket House, 28-29 Haymarket, London SW1Y 4RX, is a company registered in the United Kingdom with company registration number 04038503
Close this window to return to the website