Macromedia Coldfusion MX 7 Web Application Construction Kit
The last thing to plan before you start coding is how you will continue to document the project as you go along. After all, if you've worked to create all those great flowcharts and other design documents, it would be silly to not keep them up to date while you work. Charting Page Flow
One of the most valuable things to have at any time is an up-to-date list of important pages and the links between them. Dreamweaver MX can help you with this by letting you organize your application files maintaining links between all the templates in your project (see Chapter 2, "Introducing Macromedia Dreamweaver MX"). But sometimes there's just no replacement for a proper paper document (perhaps a Visio drawing) that you can keep pegged to your wall for reference. If you keep your page-flow document up to date throughout, you'll have that much more to refer to if you need to make adjustments to the application a year from now. And let's not forget that clients and bosses always like to see documents with recent dates on them, no matter what's actually in the documents. Include Files and Custom Tags
Another handy document to keep current while you work is a list of include files and custom tags. You learned about include files in Chapter 9, "CFML Basics," and you will learn about custom tags in Chapter 23, "Building Reusable Components." Although both types of files are handy because they enable you to isolate and reuse your code, it can be easy to forget which files rely on which other files. A simple spreadsheet or document that keeps track of these interdependencies can really help. Commenting Style
Throughout this book, we encourage you to comment your code as much as possible. Any code, ColdFusion or otherwise, is a hundred times more valuable if it is thoroughly commented. And it becomes a thousand times more valuable if all the code for an application is commented in a consistent style. You should decide ahead of time how you will comment your code, and stick to it while you work. For instance, you might make resolutions like these:
Naming Conventions
Some developers are strict about naming conventionsfor very good reason. We're not going to suggest any specific sets of naming conventions here because different people have different ideas about what makes sense. It's something you and your team should decide for yourselves. That said, here are a few ideas:
Keeping the Directory Structure in Mind
There are no hard and fast rules about how to organize your ColdFusion templates and other files into folders, but you should put some real thought into it and come up with a scheme that makes sense to you. Here are some things to keep in mind:
TIP The Yahoo! site is a good place to look for an example of a site that uses a very sensible, hierarchical URL structure, but where each portion of the URL is kept very short (often just a letter or two).
Moving Targets and Feature Creep
Unless you are particularly blessed by the gods of application development, you will deal with the twin evils of Moving Targets and Feature Creep. These scorned, ugly creatures are sometimes so filthy and wretched as to be barely distinguishable from one another. Moving Targets, of course, are those aspects of an application that your client keeps changing their mind about from one day to the next. Feature Creep is what happens if little extra features keep getting piled onto the application while you work. Either one will keep you from getting your project done on time. On the other hand, it's only natural that the best suggestions and most exciting "Eureka!" moments will come while the application is being built. Development is a creative process, and you or others might stumble upon a really brilliant idea that must be in there. Therefore, you should plan on making a few concessions or adjustments during the development process. Have some type of agreement in place about how to deal with incoming ideas. |