Think of the Web as a window on dataalmost any kind of data. Most Web pages today are created from word processing files and other text data. But many businesses have tons of data in databases to make it easier to retrieve and sort in countless useful ways. Now it's easier than ever to take that data and put it on the Web, or an intranet. One of the most common reasons you'd want to use a database to build a Web site is to offer a catalog of products. Your database might contain information such as a product name, description, price, or even pictures. If you have hundreds of items, and your list of items or prices changes regularly,
building all those pages by hand could be a huge task that requires many people working long hours. But if your Web site is built from the information you already store and update in your database, then your site can always be up to date, at low cost with little manual intervention. Another example of a database-driven site is eFuse.com's own When broken down this way, the site required more than 1,000
pages. Doing this by hand literally could have taken hundreds of hours. But using NetObjects Fusion's database features, the editor created one simple database (which didn't even require a database program; it was simply typed in using the notepad!). The database is really a list with the name of each style, its "impression," and the filename of the screen shot. The designer created one page for each of the impressions and NetObjects
Fusion did the rest, reading the database, inserting that data and the associated graphics onto the pages, and automatically generating more than 1,000 pages in just a few minutes! There are two basic kinds of database-driven sites: static, like
the Stylizer for which standard HTML files are created from a database, and live or realtime, for which the fixed HTML pages are replaced by a "server" that creates pages on-the-fly when someone visits the site and requests certain information. NetObjects Fusion 4.0 supports the creation of live pages. If the information in the database changes by the minute, then so do the Web pages visitors see. They always see the latest version
of your information. NetObjects Fusion 4.0's easy-to-use connectivity features mean no programming is required to connect your database to your Web site, though you do need to use special Web servers such as Allaire Cold Fusion, Lotus Domino, or Microsoft Active Server Pages. If your site is hosted by a remote ISP, you may not have access to one of these special servers. Or, if your data doesn't change as frequently, you might not need this kind of real-time
connection. NetObjects Fusion has built-in data publishing capabilities that allow you to publish data drawn from a variety of desktop database programs, including Access, FileMaker Pro, and FoxPro. NetObjects Fusion achieves this feat by extracting the current data from your database when you publish your site. In other words, although the data is not "live" on your Web site, the current data does get published each time you republish
your site, without any additional action required by you. If you don't have a database program and you still want to use this feature, what do you do? You have two choices. You can, as eFuse.com did, simply type your data into a simple format such as "comma delimited ASCII" so it looks like this: Stylename, formal, modern, serious, cool, C:\styles\stylepic.gif Each "record" or item gets its own line, with each "field" or subitem separated by commas. Notice how you can even point to a graphic image file on your hard disk and have it automatically added to your Web page. For another tip about adding graphics this way, see eFuse.com's Build Tips and Tricks.
Your other choice is to take advantage of the fact that NetObjects Fusion let's you create a database inside itself, so you actually enter this information into NetObjects Fusion one record at a time. While this works, it often makes more sense to use a database program, or type your records in ASCII format. Then you can edit them more easily, which lets you take more advantage of the database format. NetObjects Fusion's database publishing capabilities can be a little confusing at first, mainly because of the unique terminology the programmers at NetObjects came up with to describe the process. There are three important terms with which you need to become familiar before you can master NetObjects Fusion desktop database publishing.
This might make more sense if we go back to the press release example. In this scenario, the data list might include only the date and headline for each press release. More than likely, the headline would serve as the hypertext link to the stacked page. After you've created the data list, you can jump down one level in the hierarchy. Here you'll find only one page, which includes the first record in your database. You format this page however you want. Then when you publish the site, a separate page formatted to this specification is created for each database record. Here's another area of possible confusion. The way I described the three main components, you'd think the first step in the process is creating a data object. However, that's not exactly correct. Instead, you start by creating a data list. It's while creating the data list that you actually create the data object. Don't worry if you're still a little confused by all this. I tried and tried to figure out this process by reading the documentation, but it didn't make a bit of sense until I actually tried it. I suggest you do the same. However, before you get started, you should make sure you have everything you need.
If you use Windows, you need the following: If you use a Mac, you need the following:
To help you practice, I've provided an
I'm going to assume at this point that you already have NetObjects Fusion running and you're in Page view on a page where you want to create the data list. I've used screen grabs from Windows, but the Mac interface is nearly identical. I'll be sure to point out any variations. Although this article cannot thoroughly explore your sorting and filtering options, I'll touch on them briefly here. NetObjects
Fusion allows you to sort your records, thereby controlling the order in which your stacked pages are created. This works much like the sorting feature in a typical database program. You can also create data filter. This allows you to include only certain records based on criteria you define. For example, with the database of press releases, you could create a filter that excluded all but 1999 press releases. The most important area of the Data List Properties window is
the Fields list. By marking the check box in front of each field, you control whether that particular field is included in the data list. By selecting a field and then clicking the Link/Unlink button, you control whether that particular field serves as a hypertext link to a stacked page. You can also adjust the order of the fields by clicking the arrows on the right. Your Stacked Pages options are also very important. If you check the "Automatically display all fields" check box, all fields
from the database will appear on the stacked page. Otherwise, you'll have to manually add fields to the stacked page. It's easier to check this box and then remove the fields when you format the stacked page. Checking the "Add next and previous navigation buttons" check box causes NetObjects Fusion to automatically add navigation buttons for poking around your stacked pages. This is a nice touch. After you've specified the desired options in this window, click
OK. This takes you back to your page, where you'll find your new data list, like the one shown below. The little icon in front of the list is whatever image was specified as the Data List Icon for your current SiteStyle. Note that at this point, the data list contains no actual records; the complete list is generated when you publish the site. You can resize, format, and move the data list just as you would any other table. The next step is to format the stacked page. By whatever means you prefer, navigate down one level in the site hierarchy to display the stacked page. Once there, you can move the fields around and format the page pretty much any way you want. You may have noticed that the NavBar and Banner read something like "Untitled Stacked Page." Since NetObjects
Fusion treats all stacked pages for one data list as a single page, they all share the same banner and are represented by one icon on any NavBar. After you're done formatting your stacked page, click over to the Site view and use the Custom Names button on the Properties palette to change both the NavBar and Banner names for your stacked pages. The final step in the process is publishing your site. Just to make sure it looks the way you want, I recommend local
publishing first. In addition to letting you verify the formatting, this also lets you confirm that your sorting and filtering worked as you expected. Once you've double-checked the local publish, wrap it up with your remote publish. The next time any information changes in your database, all you need to do is republish your site. NetObjects Fusion will take care of updating all your stacked pages. As with most things, the first time is the hardest, but if you
follow these steps, you can build your first database-driven site in minutes, and after that, it literally is a snap to build more. Once you see how fast and easy this is, you'll start to think of lots of ways that information you already have can be almost instantly and automatically turned into hundreds or thousands of useful Web pages, with almost no effort on your part. Pretty neat, huh? About the author
Illustration: Business Constructions by Russel Thurston of www.artville.com |
|
|