When building a small web site, it is natural to think of it as a set of pages. As a designer, you lay out each page and insert the content, much like you would for a printed brochure.
As the site grows, however, this approach becomes problematic. Information that you want to show on several pages needs to be entered on each of those pages, so updates require making the same change multiple times, increasing the effort required and the chances for errors. Since the content and the HTML markup are intertwined, it is difficult for anyone to edit the content unless they have HTML skills.
Suppose we have a site that lists projects, and then has a page for each project. Adding a project requires building a new project page, with all its markup, and then adding the project to the project list page, with the proper markup there as well.
If the content editor mis-enters a tag, they can easily destroy the entire page layout, making the site fragile.
There is a better way: store the site’s information in a database. Each page is created from a template that provides the page structure, with content drawn from the database. This approach puts the information at the center of the site, rather than its presentation (the pages). It brings many powerful advantages over the static HTML approach:
Given these compelling benefits, why aren’t all sites built this way? Many sites start out small and grow over time, so they end up pushing the simple, static approach to creating web pages far beyond the realm in which it works effectively. Since most web designers have neither the expertise nor the desire to write back-end (server-based) software, or design database architectures, moving to a database-driven site structure can be a big hurdle.
The first step toward moving a site’s content into a database is to build the site using a content management system (CMS). A CMS is essentially a database system designed to manage web pages.
When a site is created in a content management system, a “page” becomes a more abstract construct; it is not, as in a static site, simply a file stored on the server. Instead, each page is assembled from a variety of components, including a template that defines the structure of the page and various blocks of text that are stored in the database.
There is a tremendous range of approaches to designing a content management system, with widely varying degrees of capability and sophistication. Some content management systems provide complex workflow support for organizations where content is created by writers and then must be edited by editors and approved by mangers before being published. Others focus on providing tools to simplify layouts.
With a database designed to reflect the site’s information, add a project, for example, is as simple as filling out a form.
The system automatically updates the project list page and creates a new project page. The user entering the project information never has to be concerned with HTML markup.
Most content management systems fall short when it comes to organizing content in sophisticated ways, especially when the site has content that has its own particular structure. Consider, for example, a site for a home builder who wants to showcase as assortment of their past projects. Using a basic content management system, you could create a page for each project, but all of the content for that page would have to be manually placed there, as in the example earlier in this article.
A more powerful approach is to create a custom database structure to store the project information. Now the person entering the content can do so via a database input form, with fields for each of the elements of the page. These might include the name of the project, the city, its cost, and the date of completion. Some advantages of this approach:
Taking this approach a step further, the type of a project can be identified by assigning tags or categories to each project. Now multiple project list pages can be automatically generated, one for each type. There’s never a need to enter the same project information twice; just assign it to two categories, and it shows up on two list pages.
This is but one example of how a custom database structure can make a web site easier to maintain and more useful for its visitors.
There’s many ways to build a database-driven web site. You can code it all from scratch in PHP, use a CMS like Drupal, or build it upon a web application framework such as Ruby on Rails. All of these solutions share some common drawbacks: they generally require developers to create (or at least configure) the software; the development cost is usually much higher than clients would like; and the web designer has to deal with contractors, additional complexity, and reduced control.
Webvanta provide a better way for web designers to create database-backed sites, enabling them to gain all the benefits without having to contract with a developer or learn database programming. Webvanta empowers designers to build powerful, database-driven sites, while keeping development costs low and retaining complete control.
With Webvanta, you can create custom database structures just by filling in a form, and you can display information from the database by inserting simple tags into your HTML markup. If you haven’t played with it, sign up for a free trial and give it a spin.