Develop a Web-Based Review Tool
In this section, you will implement a web-based
application that uses the Common Gateway Interface (CGI). The
application interacts with users through the users' web browsers,
although it runs on your own machine. This application allows
reviewers to add comments to a set of HTML documents.
Here is an overview of this section of the tutorial.
- Background Information
- Before you start developing the review tool, you may be
interested in some background information on how the tool
will work, and on how CGI applications communicate with a
web browser. Only read this information if you intend to
do one of the following tasks:
- Develop other CGI applications.
- Add your own enhancements to the review tool.
- Use the tool in a production environment.
- Part 1. Configuring a New Application
- This section shows you how to create a simple web-based
Hello-world application in the VisualAge C++ IDE. You
will use a series of SmartGuides to create a
configuration file for your project. Then you will add a
main function to your project. Finally, you will run the
executable file that VisualAge C++ generated for your
project.
- Part 2. Modifying Configuration
Options
- This section shows you how to make simple changes in the
options for your project's configuration. You will change
the target CPU architecture to match that of CPU you are
using.
- Part 3. Declaring and Implementing a
Class
- In this section, you will create a Request class, which
is a utility class for holding information about an
incoming CGI request. You will learn how to create new
source files in a project, add source code to them, and
perform incremental builds of your project.
- Part 4. Developing Classes in the IDE
- In this section you will implement a hierarchy of user
classes in which the base class, User, defines virtual
functions for all available operations. You will learn
how to use the Classes and Class Hierarchy pages of the
Project section of the IDE, and you will verify that the
classes and their members are properly organized so that
access to restricted functions is limited to authorized
users.
- Part 5. Debugging and Revising Your
Application
- In this section you will add a function to your
application, then use debugging features of the IDE to
locate and correct a bug in the new function. You will
learn how to set breakpoints, view variable contents,
step through code, and perform other debugging tasks.
- Part 6. Managing Configuration Files
- In this section, you will add user variables to your
project's configuration to customize how your project is
built, and you will use the IDE to manage the settings
and effects of those variables. You will learn how
flexible and extensible the VisualAge C++ configuration
language is.
- Part 7. Optimizing Your Configuration
- In this section, you will use the Configuration
Optimizer, which analyzes your configuration and
optimizes it to improve build performance.
- Part 8. Defining the View Function
for Reviewers
- In this section you will flesh out another member
function. The section contains mainly source code. It
offers you little additional guidance. Complete this and
the following section if you want more practice in the
IDE before you move on to your own development work, or
if you intend to put the web-based review tool to use.
- Part 9. Defining the Remaining Member
Functionss
- This section contains the source code you will need to
complete the review tool. It advances the same learning
objectives as Part 8.
You can proceed to either of the following topics: