S T B H P N

Project #3 - Code Publisher Client

Version 1.0
Due Date: Tuesday, April 9th, 2019

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 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 code analysis as well as testing. How we do that code analysis is illustrated by the projects for this year. The projects this Fall focus on building software testing tools. We will emphasize C++ code but want our tools to be easily extendable to other similar languages like C# and Java. In this third project we build and test a Client that provides a Graphical User Interface (GUI) for the Code Publisher built in Project #2. Things get interesting here, because the C++ standard libraries do not provide any support for GUIs. We will use a .Net facility, Windows Presentation Foundation (WPF), for that. But that we build using C#, which does not directly interoperate with C++. We will join the Managed C# code with our C++ Code Publisher using a C++\CLI translater. Building all this isn't as complicated as it sounds.
Here's what we need to do for this project:
Implement a tabbed display
The Client display will need at least two views, one for navigating to the directory to be analyzed, and one for displaying a published file.
Navigation view:
The Client's navigation view supports navigating to the directory to be analyzed and supplying a file pattern, used for selecting files to show in the Display view.
Display view:
The Display view shows a list of converted files for the project and allows the user to display a selected file either as a browser view, or in a pop up window showing the web page source. This view also allows users to define what is visible. We want to allow users to:
  • show or hide comments
  • show or hide function bodies
  • show just class names by hiding the entire class scope
That will be indicated by checkboxes for each of the above.
Provide Code Publisher interface
This step replaces the Executive package, from Project #2, with an interface and a class that implements the interface to use Code Publisher's facilities.
Connect to Code Publisher:
Build a C++\CLI3 translater to connect the Client GUI to the Code Publisher, built as a dynamic link library. The translater simply delegates function invocations in the GUI to calls into methods in the Code Publisher, using the Publisher's interface.
We will discuss each of these steps in class, spending a lot of time with C++\CLI, in Lecuture #19 and WPF in Lecture #20.

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 Windows Presentation Foundation (WPF) and C# to implement the Client GUI.
  3. (3) Shall provide an interface for the Code Publisher developed in Project #2, that declares methods to access all of the Publisher's facilities, and provides an object factory that returns a pointer to the interface.
  4. (2) Shall build the Publisher as a dynamic link library that exposes its interface and object factory.
  5. (5) provide a C++\CLI translater that delegates calls from the Client GUI into the publisher's methods, as declared in its interface.
  6. (10) provide a Client package that implements a WPF GUI with a least two views, one for navigation, and one to display file conversion results, as described in the purpose section.
  7. (5) Shall include an automated test that accepts the path to your project directory on its command line, invokes the Code Publisher, through its interface, to convert all the project files matching a pattern that accepts *.h and *.cpp files, and then opens the Client GUI's Display view. Please set the analysis path to the root of your Project #3 directory.
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. C++\CLI is a .Net managed language that shares a lot of its syntax with C++. It has the unique capability to compile both managed code and native code that reside in the same file.

What you need to know:

In order to successfully meet these requirements you will need to know:
  1. Basics of the C++\CLI language, covered in Lecture #19
  2. How to implement a WPF application. This is covered in detail in Lecture #20.