- Deciding What to Buy or Not to Buy
- Questions to Ask a Potential ColdFusion Provider
- Exploring ColdFusion Server Varieties
- Installing ColdFusion Server on Windows Platforms
- Installing ColdFusion Server on Unix-Based Platforms
- Verifying Server Setup
- Understanding the ColdFusion Administrator
- Datasource Options and Setup
- Starting and Stopping ColdFusion Service
- Summary
- Q&A
Questions to Ask a Potential ColdFusion Provider
If you've settled on hosting your ColdFusion site with an outside Web provider rather than on your own server, it's important to compare prices and features.
TIP
To find providers offering ColdFusion as an option, start with a search in your favorite Web index. Use terms such as ColdFusion (obviously), service, provider, hosting, Windows NT, and Solaris. Several good provider indices supply price and feature breakdowns of several major Web hosts.
It's vital that you take the time to seek out a provider who really knows the software. ColdFusion is a very hot property in today's Web-service market, and plenty of fly-by-night hosting services want in on the action. For every knowledgeable provider who knows the ins and outs of ColdFusion service, there are at least as many who installed the software yesterday and don't have the faintest idea how it works. When you start asking pointed questions like those that follow, it won't take long to find out which providers know their DSNs from their DNSs.
ColdFusion Version
For obvious reasons, it's important to know what software version your potential provider is running before you start creating templates. Although most templates you write will be compatible with older versions of the software, there are a few nifty features in versions 4.5 and 5 that won't seem so nifty when they don't work and you have to edit them out of all your pages.
Because the ColdFusion boom developed fairly recently, you'll find a majority of providers working with versions 4.x or 5. Beware those who use anything older than 3.x, because the first and second versions of the software are vastly different from recent releases. With ColdFusion versions 1 and 2, templates use a different file extension (.dbm instead of .cfm) and must reside in a single, predetermined directory. I've migrated older ColdFusion sites to newer servers, and, trust me, it's a task best left to the sort of people who enjoy repetitive, menial tasks such as arranging their sock drawers by color and style.
TIP
If you're migrating an extensive ColdFusion site that was built in an earlier version of the software, your CF server's administrator might be able to help out with a few tricks to speed the process.
E-mail or phone potential providers and ask them what version(s) they support. If they don't know, take that as your first hint to keep looking elsewhere.
Number of Datasources Supported
So far, I've discussed ColdFusion applications only on a conceptual level, and all my examples have used only a single datasource. I should mention here that there are certain advantages to having more than one datasource, particularly if you plan to use a file-based database such as those created in MS Access, and so on. Unlike server-based apps such as MS SQL Server and Oracle, file-based databases aren't really designed to handle many concurrent users.
For example, an online store with several "departments" will gain much by keeping a separate product database file for each department and setting up each as a separate datasource. Why? Picture yourself inside a physical department store and you'll understand. If I sent you inside to find a pair of red cotton Underoos with a Spider-Man logowaist 34, pleasebut didn't tell you in which department to look, you could be in there all day. If I narrowed the search by first pointing you to Menswear, you'd be back in a flash, and I'd soon be at home sipping iced tea in my new underpants.
Now extend this delightful metaphor to ColdFusion. If the online department store lists thousands of products in a single datasource, the software might be in your database blundering around all day looking for the specific product requested by a query. Well, maybe not all day, because computers are pretty quick at that kind of stuff, but you get the point. You can cut down on the time it takes for ColdFusion to return pages to your users by keeping your databases small, and by using multiple datasources when necessary.
As an example, take a look at two ways to configure a store's data in Figure 3.1 and Figure 3.2.
Figure 3.1 A sample data structure for a store, with all departments sharing one datasource.
Figure 3.2 A second sample structure, this time using a separate datasource for each department.
In Figure 3.1, I've illustrated the layout of a ColdFusion site that lumps everything into one datasource. All the store's operations, including customer databases, shipping information, and products, are handled with a single datasource. Each time ColdFusion searches for a record, it must begin by navigating that massive collection of data.
In contrast, Figure 3.2 shows a site organized with several databases, each set up as an individual datasource. When ColdFusion searches for data on a product, it needs to search only the datasource that contains information on products, and not those that contain shipping information, customer names, and so on.
TIP
Server-based database apps such as MS SQL Server and Oracle are equipped to handle lots of data and lots of traffic. When using them, you don't need to worry about subdividing datasources as you do with file-based databases such as MS Access and FileMaker Pro.
It's important to have some idea of how many datasources your site will require. Small- to medium-sized sites will do fine with just one datasource, and coincidentally that's the number that the vast majority of Web hosts allow. If you anticipate your site someday needing more than one datasource, some sweet talk or additional host-shopping might be required.
If your potential provider doesn't know how many datasources it allows, or the host seems confused by the term datasource, draw a sad face next to its name and continue down your list of potentials.
Updating File-Based Datasources
Updating datasources is an important factor that's often overlooked when shopping for a ColdFusion Web host. Ignore it and you might find yourself pecking away at the keyboard during all those hours you hoped to save by building your site with ColdFusion.
When you host a remote ColdFusion site, times will come when you'll need to update your file-based datasource. Most of the time, your database will get its input from Web pages on your ColdFusion site, but there will be occasions when this isn't practical; for example, if you've manually added data to a local copy of your database, or you've added new tables or columns.
NOTE
Server-based database apps have their own methods for synchronizing data and don't require files to be uploaded or overwritten.
Either way, you want to have the database on your Web provider's machine synchronized with the one on your local system.
With most providers, it's as simple as uploading your modified database and overwriting the older file that resides on the provider's server. Your database-driven pages will be unavailable while the file is in transit, but it's fairly easy to compensate for this by scheduling your uploads during "off peak" hours in the middle of the night, when all but the true geeks are asleep. When the upload finishes, your Web site will automatically reflect the new database entries, and all's well.
I say most providers offer this feature, because a surprising number haven't yet caught on to the simple wisdom of this method, and still others can't offer it because they run older versions of ColdFusion or have super-strict security requirements. With providers such as these, the update process is not so simple. Each time you need to update your data, you'll upload your database and then have to e-mail or phone your provider's tech support employees to ask them to update the datasource manually.
If your database doesn't change often, the latter method probably won't bother you much. However, if you've built a ColdFusion site for a client whose sales department wants to add five new products on a Friday afternoon for a special promotion, you might spend your weekend testing the true limits of "round-the-clock tech support." Similarly, if you have to call and update your datasource two or three times a day, you might earn a spot on your techperson's "Cubicle Wall of Shame," right next to the pic of Bill Gates with the inked-in devil horns.
Ask potential providers what they require you do to update an existing datasource. Ask them to be very specific and don't settle for vague answers such as, "Well, you just upload it and then we do some stuff here..."
Where to Put Your Database
Many providers require that your file-based database be uploaded to a certain directory or folder on their server before they'll initialize it as a datasource. Ask potential hosts where this directory resides, and whether it is directly accessible by you, the developer.
NOTE
If a host uses a server-based database app such as Microsoft SQL Server or Oracle, you'll be given a server path rather than a file location.
For security reasons, some providers won't let you upload your database right into the directory where ColdFusion expects it to reside. This means that, after uploading, you must e-mail a techie and wait for him to make the changes for you. This puts you in a position similar to the one in the last section: Every time you make a manual change to your database, you rely on your provider's tech support folks to do additional work behind the scenes.
Again, if your database doesn't change often, a couple e-mails back and forth won't slow you down much. On the other hand, if you're constantly updating data or adding new tables, you might want to seek out a provider that offers direct database uploading.