Purpose:
One focus area for this course is understanding how to structure and implement big software systems. By big we mean systems
that may consist of hundreds or even thousands of packages1 and perhaps several million lines of code.
We won't be building anything quite that large, but our projects may be considerably bigger than anything you've worked
on before.
In order to successfully implement big systems we need to partition code into relatively small parts, understand them, and thoroughly test
each of the parts before inserting them into the software baseline2. As new parts are added to the baseline and
as we make changes to fix latent errors or performance problems we will re-run test sequences for those parts
and, perhaps, for the entire baseline.
Managing that process efficiently requires effective tools for publishing sources, performing code analyses,
and testing. How we do code analysis was illustrated by SMA projects this past Fall year, and,
in OOD, last Fall, we implemented a multi-user test facility.
This Spring, we will focus on making all the source code for large projects
readily available to anyone with a browser - at least anyone working on the project.
We will emphasize C++ code but want our publishing tools to be easily extendable to other similar languages like C# and Java.
The projects this Spring build software publishing tools in several phases - one phase implemented in each of four projects.
In this first project we will build and test a facility for converting a C++ source code file to a web
page3, with essentially the same content. Here's what it does:
Finds and Loads a file for processing:
Files will be loaded when their names match a regular expression. That might be as simple as *.h, but
will often be somewhat more complex. You will spend some time getting familiar with the C++11 regex classes.
Files that match can be opened with the std::iostream facilities.
Converts file into a webpage fragment:
That entails creating a new file with the same name, but with an html extension.
Contents of the source code file are copied directly to the html file.
Then all html markup characters are replaced with their exscape sequence equivalents, e.g.,
< is replaced by <, etc.
That text is prepended with "<pre>" and postpended with "</pre>".
That ensures that the rendered text preserves all of the white space included in the original file.
Convert html fragment into a valid html document:
This is done by adding template text (from a template file) for a head section
and the beginning of the body4. Finally a small piece of template code,
read from a template file is added to the end of the html fragment text.
At this point the file is viewable in a browser.
Succeeding projects will build, progressively, on work of the prior projects. This first project
is intended to be fairly simple, to help you get started with the C++ programming language. The projects
that follow will become progressively more challenging. Note that you are not expected to have a lot
of experience with building web pages. The small amount of web programming knowledge you need will
be discussed in class.