C C T B H P N

Lecture #16 - Projects #3 and #4

Integrating GUI, Comm, and Servers

Web Resourses:

Content:

We will discuss building Project #3 and integrating into Project #4.
  1. The Syllabus describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.

  2. Project #3, Project #4, Project3HelpF2018, Project4HelpF2018
  3. Midterm Exam

    We will have MidTerm review next week on Wednesday, Nov 5th.
  4. Projects Discussion:

    • Project #3 Processing: During a first pass through the analysis file set, you need to save every type that is defined in every file in the set, e.g.,
      class X {, interface IX {, ...
      You will store that information in a type table. In a second pass through the file set, you will find use of those types stored in the type table, and infer a dependency of the file you are processing on the file where the type was defined, which is part of a value for each file key.
      • Handling namespaces
        use this: type -> { file1, namespace1 }, { file2, namespace2 }, ...    length of list usually 1 instead of this: namespace.type -> { file } to store type information.
      • Type Look up
        Use type, not namespace.type as the table key ! If you build the typetable using namespace.type as the key to store { file } then, when you lookup types, you need to prepend each token with every available namespace in turn until you find a match or find there is no match, since most types you encounter in code will not be qualified. If you use unqualified type as the key, then if the key's list has length 1, you are done. You either have a match or don't. That is, by far, the most likely scenario. If the list has length greater than 1, you simply compare the list's namespaces with the available namespaces. This means that you have to build a using table containing a list of all the using statements that don't start with "System". To that you need to add any declared namespaces in the file.
      • Type Table - TypeTable demo
      • Handling Dependencies - CsGraph demo
    • Project #4 Demos:
      • CsMessagePassingComm
        This is close to everything you need for Project #4. You may have to make a few minor modifications, but nothing very significant.
      • NavigatorClientAndServer
        Demo of a WPF GUI that supports navigating through files and directories, both locally and in a remote server. It uses the Message-Passing Comm system from the previous demo, with very few changes. Look at message dispatching in both server and client.
      • SpawnProc
        Illustrates how to create multiple child processes, using the .Net Process class. This will allow you to use your Project #3 - Code Analyzer with no modifications for Project #4. We will discuss this in class.
      • GUI Test
        Shows how to run requirements testing on startup. Note that your run.bat file will be run in a Developer's Command Prompt with administrator previledges.
    • Project #4 - Concurrency and Remote Access - discussion points:
      • Queued access and the Single-Threaded Apartment model: Message-Passing Blog
      • Message passing - need to interpret messages for dispatching: see Navigator
        The style of dispatching used here makes extending the client and server fairly simple.
      • Performance measurement with high resolution timer: High Resolution Timer
        see example use in: TestHarnessPrototype
  5. Other Demos:
  6. Related demonstration code for Project #4:
    Most of these have been recently demonstated in class.
    Peer-Comm Demo
    Demonstrates a clean structure for building communication channels - similar to the above but not tuned to Project #4 Requirements. Does have a WPF GUI.
    Message-Passing Demo
    Shows how to write message and data contracts.
    Message body serialization and deserialization
    Demonstration of serializing and deserializing message bodies.
    Chunking File Service
    Shows how to implement file transfer using binary blocks.
    File Streaming
    Illustrates how to use streams to transfer files between machines.
    Basic Http Services
    Illustrates how to build proxies and service hosts.
  7. UI and Enterprise Patterns