T B H P N

Project #2 - Source Code Publisher for Projects

Version 1.1
Due Date: Tuesday, March 5th, 2019
Project #2 helper files

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 second project we build and test a facility for converting all the files found in a directory tree to web pages with essentially the same content. The web pages contain links to files on which they depend. Finding dependencies and placing divs requires you to parse the contents of analyzed files. You are encouraged to use a source code parser that you will find in Repository/Cpp/CppParser. The parsing blog will help you get started with that.

Requirements:

Your Code Publisher Solution:
  1. Shall use Visual Studio 2017 and its C++ Windows Console Projects, as provided in the ECS computer labs.
  2. Shall use the standard streams libraries for all I/O and operators new and delete for memory management.
  3. (2) Shall provide an Executive package that accepts, from its command line, a path containing files to be converted.
  4. (2) Shall also provide Loader, Converter, Dependencies, and Display packages.
  5. (3) The Loader package shall support finding and loading all the files for conversion, starting at a path specified by the Executive.
  6. (3) The Converter package shall support wrapping code in an html document, and translating the "<" and ">" characters into their corresponding escape sequences.
  7. (5) The Dependencies package shall support insertion, in each analyzed file, links to all the files in the directory tree, on which it depends.
  8. (6) The Display package5 shall support wrapping selected parts of the web page in <div> blocks that can be displayed or hidden6. The parts to be selected are:
    • Comment blocks at the begining of each source code file, if they exist
    • Function bodies, including the opening and closing braces
    • Class bodies, including the opening and closing braces
    The display package shall provide the means to specify each of these parts independently. That means that the user can display none of the parts, any one or more of the parts, or all of the parts.
  9. (4) Shall include an automated test that demonstrates you meet all the functional requirements above. Note that this is just a set of tests that show clearly the results of each step of processing you've used to implement this project.
Here is a link to the grade sheet used to guide evaluatation of your work.

  1. In C++, a package consists of two source code files, a header (*.h) and an implementation file (*.cpp) that contain:
    • prologue, providing a name, brief descriptive phrase, author information, and environment information
    • description of the package's responsiblities and required files
    • maintenance history
    • class declaration and definitions
    • a main function, guarded by #ifdef and #endif declarations, that implements construction tests for all the defined code
  2. A software baseline is the set of all code considered to be part of the current system, excluding experimental code that individual developers are working on.
  3. Using #includes to find dependencies is a very simple process, but cannot be extended to languages, like C# and Java, that do not have #include statements. Those of you who have taken CSE681 - SMA, this past fall, have build a stronger dependency analyzer that does not have these limitations. You may, if you elect to do so, use this stronger type-based process to find dependencies.
  4. We will demonstrate, in class, how to show or hide parts of a web page using styled <div> blocks.
  5. The Display package doesn't actually display anything. It supports display functionality by embedding styled divs, where appropriate, within the code body.
  6. Hiding and showing content is achieved by managing the CSS display property values, e.g., block or none, for the <div>s embedded in the code body. The project demo given in Project2HelpS19 shows you what is required.

What you need to know:

In order to successfully meet these requirements you will need to know:
  1. Basics of the C++ language: C++ Reference
  2. How to implement a simple class hierarchy. This will be covered briefly in lecture #3 and in more detail later.
  3. The standard Containers.
  4. How to use Visual Studio. We will discuss this in one of the Help Sessions.