﻿<?xml version="1.0" encoding="utf-8" ?> 
<?xml-stylesheet type="text/xsl" href="courses.xsl" ?>
<!--
/////////////////////////////////////////////////////////////////////////////
//  code.xml - provides links to code and presentation materials           //
//             on the ECS college server                                   //
//                                                                         //
//  Jim Fawcett, CST 2-187, Syracuse University, jfawcett@twcny.rr.com     //
/////////////////////////////////////////////////////////////////////////////
-->

<courses name="Fawcett">

  <btitle>Code</btitle>
  <theme src="CodeTheme.css" />
 <!--  <theme src="HomeTheme.css" /> -->

  <visible>
  <html><a name="Top"/></html>
  <title>Sample Code from All Courses</title>
  <revised>10 February 2009</revised>

  <hnav/>
<!--
  <hilight>
    <ifile title="Home">FawcettHome.xml</ifile>&#32;
    <ifile title="Courses">Courses.xml</ifile>&#32;
    <ifile title="Code">Code.xml</ifile>&#32;
    <ilink title="Handouts">www.ecs.syr.edu/faculty/fawcett/handouts</ilink>&#32;
    <ifile title="CoreTech">CoreTechnologies.xml</ifile>&#32;
    <ifile title="Books">Books.xml</ifile>&#32;
    <ifile title="Articles">Articles.xml</ifile>&#32;
    <ifile title="Math">Mathematics.xml</ifile>&#32;
    <ifile title="Research">research.xml</ifile>&#32;
    <ifile title="Masters Projects">MastersProjects.xml</ifile>&#32;
    <ifile title="SWDev">swdev.xml</ifile>&#32;
    <ifile title="WebDev">webdev.xml</ifile>&#32;
    <ifile title="News">news.xml</ifile>&#32;
    <ifile title="OtherLinks">OtherLinks.xml</ifile>&#32;
    <ifile title="SiteDesign">SiteDesign.xml</ifile>&#32;
    <ifile title="Graduates">graduates.xml</ifile>&#32;
    <ifile title="AllPages">AllPages.xml</ifile>&#32;
    <ifile title="Office Hours">OfficeHours.xml</ifile>&#32;
    <notice title="Notices">notices.xml</notice>&#32;
    <html><a href="#contents">Contents</a></html>&#32;
  </hilight>
-->
  <cnav/>
<!--
  <hilight>
    <ifile title="CSE681-SWMAA">CSE681.xml</ifile>&#32;
    <ifile title="CSE686-IP">CSE686.xml</ifile>&#32;
    <ifile title="CSE687-OOD">CSE687.xml</ifile>&#32;
    <ifile title="CSE775-DO">CSE775.xml</ifile>&#32;
    <ifile title="CSE776-DP">CSE776.xml</ifile>&#32;
    <ifile title="CSE778-AWP">CSE778.xml</ifile>&#32;
    <ifile title="CSE784-SWS">CSE784.xml</ifile>
  </hilight>
-->

  <html><img src="students/coding.jpg" width="100%"/></html>
  <caption>Getting Ready for Code Demo</caption>

  <hilight>
    <note>Code Location in this page:</note><br/>
    <html>
    <a href="#CSE681">CSE681-SWMA</a>&#32;
    <a href="#CSE686">CSE686-IP</a>&#32;
    <a href="#CSE687">CSE687-OOD</a>&#32;
    <a href="#CSE775">CSE775-DO</a>&#32;
    <a href="#CSE776">CSE776-DP</a>&#32;
    <a href="#CSE778">CSE778-AWP</a>&#32;
    <a href="#CSE784">CSE784-SWS</a>&#32;
    </html>
  </hilight>
  <!--
  <image src="fileXfer.jpg" size="200" />
  <caption>fileXfer Prototype</caption>
  -->
  <quote source="C.A.R.Hoare">
    There are two ways of constructing a software design; <br/>one way is to make it so simple 
    that there are obviously no deficiencies, <br/>and the other way is to make it so complicated 
    that there are no obvious deficiencies. <br/>The first method is far more difficult.
  </quote>

  <html><a name="contents"/></html>
  <section title="Feedback">
    I welcome constructive feedback about these code examples.  You may see ways to make their messages clearer
    or know of better approaches - especially if you are a graduate of our program and are developing software 
    everyday.  Feel free to comment - I won't be offended, but rather pleased that you were interested enough
    to contact me:
    <html><a href="mailto:jfawcett@twcny.rr.com">Mail Home</a></html><br/><br/>
  </section>

  <section title="Note:">
    The college server does not have .Net installed, so these examples will not execute from the server.
    You will have to download to a .Net enabled machine.  Any of the ECS cluster machines will do.<p/>
    You will find this code in one of these locations:
    <olist>
      <litem>
        <ifile title="www.ecs.syr.edu/faculty/fawcett/handouts/CSEXXX/code">../CSE681/code</ifile><br/>where CSEXXX
        is one of the following: CSE681, CSE686, CSE687, CSE775, CSE776, CSE778, or CSE784
      </litem>
      <litem>
        <ifile title="www.ecs.syr.edu/faculty/fawcett/handouts/CoreTechnologies">../CoreTechnologies</ifile>
      </litem>
    </olist>
    <p/>
    <html><a href="#Top">Top</a></html>&#32;
  </section>

  <html><a name="CoreTechnologies"/></html><p/>
  <section title="Core Technologies">
    <hilight>Basic use of C# and Framework Class Librarys</hilight>
    <file title="HelloWorld">../cse681/code/HelloWorld</file>
    A very basic C# console application.<br/>
    <file title="helpSession">../CSE681/code/helpsessionFall02</file>
    Shows how to create console and WinForm applications.<br/>
    <file title="ProgramStructure">../cse681/code/ProgramStructure</file>
    Illustrates how to lay out a C# program using an executive and server module.  Also shows correct
    format for manual and maintenance pages.<br/>
    <file title="conversions">../cse681/code/conversions</file>
    Illustrates how to convert between numeric types and their string representations.<br/>
    <file title="demoFiles">../cse681/code/demofiles</file>
    Demonstrates the use of Directory, Path, and StreamReader classes to find, open, and read file text.<br/>
    <file title="commandLine">../CSE681/code/commandline</file>
    Shows how to read command line, extract file patterns, and find matching files.<br/>
    <file title="collections">../CSE681/code/collections</file>
    Demonstrates use of HashTable and SortedList collections.  These were prototypes for Project #1, concerned with C#
    dependency analysis.<br/>
    <file title="Serialize">../CSE681/code/serialize</file>
    Demonstrates how to serialize an object of a user-defined type to a memory stream.  The same technique
    can be used to serialize to a file.<br/>
    <p/>
    <p/>
    <html><a href="#Top">Top</a></html>&#32;
  </section>

  <html><a name="CSE681"/></html><p/>
<!--  <image src="pictures/scenery.jpg" size = "250"/>
  <caption><link title="http://epod.usra.edu">epod.usra.edu/</link></caption> -->
  <section title="CSE681 - Software Modeling and Analysis">
    Most of these code demonstrations use the C# language.  One shows how to interoperate with unmanaged C++.
    <p/>
    <hilight>File Handling</hilight>
    <file title="Navigate">../cse681/code/navigate</file>
    Demonstrates how to navigate a directory subtree using Directory and Path classes.<br/>
    <file title="NavigateWithDelegates">../cse681/code/navigateWithDelegates</file>
    Demonstrates Use delegates to make Navigate reusable.<br/>
    <file title="ConcurrentFileAccess">../CSE681/code/ConcurrentFileAccess</file>
    Demonstrates how to allow multiple processes concurrent access to the same file for both reading and writing.<br/>
    <file title="Base64Encoding">../cse681/code/Base64Encoding</file>
    Demonstrates a relatively efficient way of converting binary file data into strings to send as XML messages.

    <p/>
    <hilight>XML Demos</hilight>
    <file title="xmlApps">../cse681/code/xmlapps</file>
    Demonstrates how to use the XmlDocument, XmlNodeReader, XmlTextReader, and XmlTextWriter classes.<br/>
    <file title="XMLdemo">../cse681/code/XMLdemo</file>
    Illustrates how to programmatically added, delete, and modify elements of an XML file using the 
    XMLDocument and XMLNode classes.<br/>
    <file title="XMLMessages">../cse681/code/XMLMessages</file>
    Shows how to build and parse a message structure that could be used in a remoting communication layer.  No actual 
    remoting is done in this demo.<br/>
    <file title="Base64Encoding">../cse681/code/Base64Encoding</file>
    Good way to encode binary data as a string of characters, perhaps to store in XML.  With Base64 Encoding
    you get a smaller expansion than Hexadecimal (base16) encoding.<br/>

    <p/>
    <hilight>Delegates, Threads, Processes, Asynchronous Calls</hilight>
    <file title="delegateDemos">../cse681/code/delegatedemos</file>
    Illustrates use of delegates and events.<br/>
    <file title="NavigateWithDelegates">../cse681/code/navigatewithdelegates</file>
    Shows how to make navigation a reusable component via delegates.<br/>
    <file title="threadDemo">../CSE681/code/threaddemo</file>
    Illustrates use of worker thread and Form.Invoke in a WinForm application.<br/>
    <file title="ThreadProblems">../cse681/code/ThreadProblems</file>
    Demonstrates a variety of threading problems, e.g., deadlock, race conditions, starvation, corruption of
    shared resources.<br/>
    <file title="QueuedMessages">../cse681/code/QueuedMessages</file>
    Demonstrates how two threads can communicate through a shared queue.<br/>
    <file title="synch">../cse681/code/synch</file>
    Shows how to serialize access to shared resources using Win32 threads and synchronizing constructs.<br/>
    <file title="WorkerThread">../cse681/code/WorkerThread</file>
    One more demonstration of threading under .Net.<br/>
    <file title="ProcessDemo">../CSE681/code/ProcessDemo</file>
    Illustrates how to programmatically start a process in C#.<br/>
    <file title="ProcessDemoWin32">../cse681/code/ProcessDemoWin32</file>
    Shows how to programmatically start a process using the Win32 API.<br/>
    <file title="AsyncExamples">../CSE681/code/AsynchExamples</file>
    Shows how to make asynchronous calls to both local and remote objects.<br/>
    <file title="Thread Pool Demo">../cse681/code/threadpooldemo</file>
    Illustrates how to run a method on a thread pool thread and receive a callback when the method completes.<br/>
    <file title="Queued Messages with Synchronized Methods">../cse681/code/QueuedMessagesWithSynchronizedMethods</file>
    Shows how to use Synchronized Methods to serialize access to a queue shared by two threads.<br/>

    <p/>
    <hilight>Windows, Forms, and Contols</hilight>
    <file title="WinMin">../cse681/code/winmin</file>
    Builds a very simple windows application using the Win32 API with a message loop and WinProc function.<br/>
    <file title="WinForm Demo">../CSE681/code/win form demo</file>
    shows how to use images and react to mouse moves in a WinForm application.<br/>
    <file title="dialogDemoCS">../cse681/code/dialogDemoCS</file>
    Shows how using a worker thread in C# can prevent UI from freezing during intensive computations.<br/>
    <file title="dialogDemoWin32">../cse681/code/dialogDemoWin32</file>
    Shows how using a worker thread in MFC can prevent UI from freezing during intensive computations.  Also
    demonstrates the use of user defined Windows messages (Win32).<br/>
    <file title="usingListView">../cse681/code/usingListView</file>
    Demonstrates use of ListView control and display or hiding of forms at run-time.<br/>
    <file title="DirMgr">../CSE681/code/dirmgr</file>
    Shows how to populate a TreeView with directory and file information, using lazy evaluation.  Also
    shows how to expand the TreeView to the current directory when program starts.<br/>
    <file title="FileDialogDemo">../CSE681/code/filedialogdemo</file>
    Illustrates use of FileDialog control in a WinForm application.<br/>
    <file title="FormInvokeDemo">../CSE681/code/FormInvokeDemo</file>
    Shows how to use FormInvoke to allow a worker thread to safely communicate with a UI in C#.<br/>
    <file title="nonClientHit">../CSE681/code/nonclienthit</file>
    Illustrates interacting with the underlying windows message loop to react to NChits - messages due to user
    actions in the Non-Client area (not available from the exposed WinForm events).<br/>
    <file title="demoControls">../CSE681/code/demoControls</file>
    Demonstrates how to build both list and treeview controls that add functionality to those provided in the
    Winform toolkit.  The TreeViewPlus control, for example, derives from TreeView and adds automatic lazy initialization
    of the control with drives, folders, and files.  It opens the control expanded to the current directory.<br/>

    <p/>
    <hilight>Sockets and Remoting</hilight>
    <file title="socketDemo_DotNet">../cse681/code/socketDemo_DotNet</file>
    Illustrates how to build a socket-based communication program in .Net.  Seperate projects build
    single-threaded and multi-threaded servers.<br/>
    <file title="socketDemo_Win32">../cse681/code/socketDemo_Win32</file>
    Illustrates how to build a socket-based communication program using Win32 API.  Seperate projects build
    single-threaded and multi-threaded servers.<br/>
    <file title="Message Framing">../cse681/code/messageFraming</file>
    Shows how to extract XML messages from a socket transmission (sockets only understand bytes).<br/>
    <file title="Message Framing with threads and queues">../cse681/code/messageFramingWithThreadsAndQs</file>
    Shows how to extract XML messages from a socket transmission in a robust, reusable way with the
    help of child threads and blocking queues.<br/>
    <file title="TCPClientServer">../cse681/code/TCPClientServer</file>
    Sets up socket communication under .Net using the wrapper classes TCPClient and TCPServer.<br/>
    <file title="RemotingDemo">../cse681/code/RemotingDemo</file>
    Demonstrates communication between two machines using .Net remoting and singleton server.<br/>
    <file title="Remoting_BilateralComm">../cse681/code/Remoting_BilateralComm</file>
    Shows how to set up both a client channel and a server channel that support acting as both a client
    and a server in the same process.  The trick is to use named channels.<br/>
    <file title="Remoting_PassByRef">../cse681/code/Remoting_PassByRef</file>
    Illustrates how remoting server can communicate back to client using a Pass-by-Reference object.<br/>
    <file title="Remoting_PassByRefFileXfer">../cse681/code/Remoting_PassByRefFileXfer</file>
    Shows how to download files from a single-call server using Pass-by-Reference object.<br/>
    <file title="Remoting_PassByValue">../CSE681/code/Remoting_PassByValue</file>
    Illustrates how to pass an object of a user-defined type to a remote object by value.<br/> 
    <file title="PeerToPeerPrototype">../CSE681/code/PeerToPeerPrototype</file>
    Shows how to build a chat application using bilateral remoting with named channels.<br/> 
    <file title="BijlaniPrototype">../CSE681/code/BijlaniPrototype</file>
    A student prototype, with presentation, that compares performance of the three remoting activation models in 
    an XML message-passing context.<br/> 

    <p/>
    <hilight>Web Services and a little bit of ASP</hilight>
    <file title="CalcWebService">../CSE681/code/CalcWebService</file>
    Presents a minimal web service.<br/>
    <file title="demoWebService">../CSE681/code/demoWebService</file>
    Demonstrates how to build a basic web service using C# code-behind.  Includes step-by-step screenshots<br/>
    <file title="FileXferWebService">../CSE681/code/FileXferWebServide</file>
    Shows how to transfer files to a remote location using text messages.<br/>
    <file title="demoAspApplication">../CSE681/code/demoAspApplication</file>
    A simple Active Server Pages demo.  Requires the creation of a virtual directory.  Instructions are included.<br/> 

    <p/>
    <hilight>Code Analysis Tools</hilight>
    <file title="Tokenizer">../cse681/code/CSToker</file>
    Toker extracts words from files.  This is useful for analysis of source code files.<br/>
    <file title="grammar">../cse681/code/CSGrammar</file>
    Demonstrates use of toker, Semi-Expression analyzer, and Grammar parser to perform simple analysis on source code.<br/>

    <p/>
    <hilight>Managed and Unmanaged C++</hilight>
    <file title="Introduction to Managed C++ Demo">../cse681/code/ManagedCpp_Intro</file>
    Managed C++ class that provides basic file handling and viewing.<br/>
    <file title="Managed C++ Examples">../cse681/code/ManagedCpp</file>
    Demonstration of managed classes, Mixed managed and unmanaged classes, managed exceptions, unmanaged
    classes holding references to managed code, marshaling of data between managed and unmanaged code, 
    and use of Platfrom Invoke access to the Win32 API from managed C++.<br/>
    <file title="Unmanaged C++ from C#">../CSE681/code/Unmanaged_CPP_from_CSharp</file>
    Shows how to call a C++ module from a C# application.  Uses a C++ tokenizer from a C# console application.<br/>

    <p/>
    <hilight>Other Interesting Demos</hilight>
    <file title="Interface-based Programming">../cse681/code/InterFaceBased</file>
    Demonstrates composition of program with executive and components that expose interfaces.  One component uses
    three others with references to their interfaces.<br/>
    <file title="Plugin Architecture">../cse681/code/PluginDemo</file>
    Executive loads dlls from a known path, uses reflection to find classes supporting the IPlugIn interface, creates
    instances of those classes and calls their &quot;test&quot; method.<br/>
    <file title="Serialize">../cse681/code/serialize</file>
    Shows how to serialize an object's state to a stream.<br/>
    <file title="AttributedProgram">../CSE681/code/AttributedProgram</file>
    Illustrates creation and use of custom attributes in C# programs.<br/>
    <file title="Hi Resolution Timer using Platfrom Invoke">../cse681/code/hirestimerinterop</file>
    Demonstrates how to use Platform Invoke to access performance counters to build a high resolution
    timer (microsecond resolution - 10,000 times finer resolution than standard FCL timers).<br/>
    <file title="RandomEvents">../CSE681/code/randomevents</file>
    Creates random numbers and random events, including events occurring with some average density over time.<br/>
    <file title="reflection">../CSE681/code/reflection</file>
    Demonstrates how to use Directory operations and Reflection to extract type information.<br/>
    <file title="reusableDemo">../CSE681/code/reusableDemo</file>
    Shows how to build reusable components using the Abstract Factory Pattern and abstract base classes.<br/>

    <p/>
    <hilight>Software Repository Prototypes</hilight>
    <file title="Scanner">../cse681/code/scanner</file>
    This is a prototype of a program to scan through a collection of files that are linked by references
    in manifest files.  It was a small prototype for a Software Repository project.<br/>
    <file title="Test Harness Prototype">../cse681/code/TestHarnessPrototype</file>
    Demonstrates how to build a test harness that loads test libraries into a child AppDomain so they can
    be unloaded after testing.  The test harness loads the library assemblies, uses reflection to find
    test classes that support the ITest interface, creates instances of the discovered classes and 
    invokes their test() method, using InvokeMember.<br/>
    <file title="Run Compiler">../cse681/code/RunCompiler</file>
    Shows how to create a build process by spawning the C# compiler in a child process.<br/>

    <p/>
    <hilight>Common Langugage Runtime (CLR) Demos</hilight>
    <file title="AppDomain Demo">../cse681/code/AppDomainDemo</file>
    Demonstrates how to create a child AppDomain, load an assembly into the child, find types defined
    by the assembly, instantiate them, and call member functions on the instance.<br/>
    <p/>
    <html><a href="#Top">Top</a></html>&#32;
  </section>

  <html><a name="CSE686"/></html>
<!--  <image src="pictures/starsflash-b.jpg" size="300"/>
  <caption><link title="http://epod.usra.edu">epod.usra.edu/</link></caption> -->
  <section title="CSE686 - Internet Programming">
    The code in this section is devoted to client-side and server-side web programming on Windows platforms
    under .Net.
    <p/>
    <hilight>Client-side Programming</hilight>
    <file title="browser">../cse686/code/browser</file>
    Shows how to embed the IE browser control in an application and support application handling of mouse
    events on a web page.<br/>
    <file title="commandLine">../CSE686/code/commandline</file>
    Shows how to read command line, extract file patterns, and find matching files.<br/>
    <file title="conversions">../cse686/code/conversions</file>
    Illustrates how to convert between numeric types and their string representations.<br/>
    <file title="delegateDemos">../CSE686/code/delegatedemos</file>
    Illustrates use of delegates and events.<br/>
    <file title="demoFiles">../cse686/code/demofiles</file>
    Demonstrates the use of Directory, Path, and StreamReader classes to find, open, and read file text.<br/>
    <file title="HelloWorld">../cse686/code/HelloWorld</file>
    A very basic C# console application.<br/>
    <file title="JavaScript">../cse686/code/Javascript</file>
    Basic demonstrations of the use of Javascript and cascading style sheets in web pages.<br/>
    <file title="Navigate">../CSE686/code/navigate</file>
    Demonstrates how to navigate a directory subtree using Directory and Path classes.<br/>
    <file title="NavigateWithDelegates">../CSE686/code/navigatewithdelegates</file>
    Shows how to make navigation a reusable component via delegates.<br/>
    <file title="Scripting">../cse686/code/scripting</file>
    Illustrates how script can access and use the browser's document parse tree.<br/>
    <file title="WebBrowser">../cse686/code/webbrowser</file>
    Demonstrates how to embed the IE web browser control in an application and use it to render
    a variety of file types.<br/>
    <file title="WinForm Demo">../CSE686/code/win form demo</file>
    shows how to use images and react to mouse moves in a WinForm application.<br/>
    <file title="WinMin">../cse686/code/winmin</file>
    Builds a very simple windows application using the Win32 API with a message loop and WinProc function.<br/>
    <file title="xmlApps">../CSE686/code/xmlapps</file>
    Demonstrates how to use the XmlDocument, XmlNodeReader, XmlTextReader, and XmlTextWriter classes.<br/>
    <file title="XMLdemo">../cse686/code/XMLdemo</file>
    Illustrates how to programmatically added, delete, and modify elements of an XML file using the 
    XMLDocument and XMLNode classes.<br/>

    <p/>
    <hilight>Server-side Programming</hilight>
    <file title="AspApps">../cse686/code/AspApps</file>
    Provides basic examples of ASP and ASP.Net applications.<br/>
    <file title="AccessProjects">../CSE686/code/AccessProjects</file>
    Shows how to use the Access database from a program.<br/>
    <file title="ADOConsoleDB">../CSE686/code/ADOConsoleDB</file>
    Illustrates basic use of the Active Data Object classes.<br/>
    <file title="ADOxmlDemo">../CSE686/code/ADOxmlDemo</file>
    Demonstrates use of ADO to convert XML to and from a set of relational tables.<br/>
    <file title="AspExamples">../CSE686/code/AspExamples</file>
    Contains a set of projects that illustrate:
    <culist>
      <clitem>data binding</clitem>
      <clitem>downloading files</clitem>
      <clitem>uploading files</clitem>
      <clitem>reading and writing XML</clitem>
    </culist>
    <file title="ASPSWproductsDB">../cse686/code/ASPSWproductsDB</file>
    Shows how to display Database data on a web page.
    <p/>
    <html><a href="#Top">Top</a></html>&#32;
  </section>

  <html><a name="CSE687"/></html>
<!--  <image src="pictures/glacier.gif" size="250" />
  <caption><link title="http://epod.usra.edu">epod.usra.edu/</link></caption> -->
  <section title="CSE687 - Object Oriented Design">
    All of the code in these folders has been written in C++ using Visual Studio 6.0 or Visual Studio 7.0.  Most of the
    folders have 7.0 projects, many have 6.0 projects as well.  I have had very good luck letting the Project Wizard
    convert 6.0 projects to 7.0 projects.  Usually if a failure occurs it is because the Visual C++ compiler is more
    standard conforming in version 7.0.  When these failures occur the error messages are usually quite good and
    you should have no difficulty making the few changes (most of this has already been done for you, but not in
    every single folder).<p/>

    <hilight>Basic C++ Syntax and Semantics</hilight>
    <file title="BASIC">../CSE687/code/basic</file>
    Classes and basic class relationships.<br/>
    <file title="Equiv">../cse687/code/equiv</file>
    Shows how to call constructors in different program contexts.<br/>
    <file title="Hiding">../cse687/code/hiding</file>
    Demonstrates hiding and other substitution errors in polymorphic designs.<br/>
    <file title="casts">../CSE687/code/casts</file>
    Four new casts: static_cast, reiterpret_cast, const_cast, dynamic_cast.<br/>
    <file title="exceptions">../cse687/code/exceptions</file>
    Illustrates use of C++ exceptions and standard exception classes.<br/>
    <file title="Relationships">../CSE687/code/relationships</file>
    Demonstrates the four primary class relationships: composition, inheritance, using, and aggregation (weak form of composition).<br/>
    <p/>

    <hilight>Miscellaneous Small Demos</hilight>
    <file title="DEMOS">../CSE687/code/demos</file>
    Demonstrations of: callbacks, aggregation and inheritance details, file handling, member function pointers, templates.  Current
    students of CSE687 - OOD will want to look demagg and deminher carefully.  They demonstrate how constructors and destructors
    are called, some circumstances when temporaries are created, and most importantly why you <u>must</u> use
    initialization sequences for all the constructors you write (with the exception of default constructors).<br/>
    <file title="help2004">../cse687/code/help2004</file>
    Workspace used for Visual Studio help session, Friday, Jan 24th, 2004.<br/>Shows how to use fileInfo module to
    expand wildcards, and how to build multi-module project.<br/>
    <file title="Help2003">../CSE687/code/help2003</file>
    A workspace used during the Visual Studio help session held Friday, Jan. 23rd, 2003.<br/>
    <file title="HexConvert">../CSE687/code/HexConvert</file>
    Helper macros used to covert binary code to and from hexadecimal strings.<br/>
    <file title="Pr1HelpSp04">../cse687/code/Pr1HelpSp04</file>
    Provides CppToker and CppSemiExp Module prototypes for use with code analysis required in Project #1.<br/>
    <file title="Pr1HelpSp03">../CSE687/code/Pr1HelpSp03</file>
    Shows how to use simple string operations to create XML or HTML tags.<br/>
    <p/>

    <hilight>Encapsulating Abstract Data Types and Other Useful Classes</hilight>
    <file title="STR">../CSE687/code/str</file>
    A simple string class used to illustrate Abstract Data Types - that is, orchestrating your C++ design and implementation to
    support almost all of the operations provided for built in types.<br/>
    <file title="fileInfo">../CSE687/code/fileInfo</file>
    Reusable module supporting file and directory operations, including finding all files and their attributes.<br/>
    <file title="getFiles">../cse687/code/getfiles</file>
    Shows how to use the fileInfo object (see above) to do all the file and directory handling for Project #1.<br/>
    <file title="HashTable">../CSE687/code/hashtable</file>
    Good example of templates, policy - HashString, and traits - key_type, value_type, iterator.  Shows how to implement
    container and iterator classes so they integrate with the STL algorithms.<br/>
    <file title="CppSemiExp">../CSE687/code/CppSemiExp</file>
    CppSemiExp module uses CppToker module to scan and help parse C++ code files.  CppSemiExp provides a plug-in architecture
    that supports inserting filters into the analysis stream.  This will be useful for Project #1, Spring 2004.<br/>
    <file title="semi">../CSE687/code/semi</file>
    Semi is a reusable "Semi-Expression evaluator that uses another reusable module Tok, a tokenizer that can be parameterized
    for tokenizing either C/C++/C# code or HTML/XML.  This will be useful for Project #2, Spring 2003.<br/>
    <file title="smartPointer">../CSE687/code/smartpointer</file>
    Illustrates how to build a "smart pointer" class.<br/>
    <file title="smartPtr">../CSE687/code/smartptr</file>
    Illustrates how to build a reference counted "smart pointer" class.<br/>
    <file title="thread">../CSE687/code/thread</file>
    Shows how to build a thread class that works a lot like the C# Thread class.  Synchronization is also illustrated.<br/>
    <file title="traceable">../CSE687/code/traceable</file>
    Illustrates use of inheritance to extend, without modification, an existing, reusable class - here the std::string class.<br/>
    <file title="vector3D">../CSE687/code/vector3D</file>
    Develops an Abstract Data Type based on mathematical 3 dimensional vector.  Provides all of the operations expected
    in a linear vector space.  Illustrates nicely how to design operators for a mathematical object.<br/>
    <file title="XML">../CSE687/code/xml</file>
    A module that supports the reading and writing of XML data.  It is not DOM based, nor is it event-based like the SAX
    processors.  It is simply a procedural reader/writer facility.<br/>
    <p/>

    <hilight>Larger Project-Style Demos</hilight>
    <file title="CATALOG">../CSE687/code/catalog</file>
    Catalog program demonstrates use of modules, polymorphic decoupling, directory navigation, file pattern matching.<br/>
    <file title="Dups">../cse687/code/dups</file>
    Program to find duplicate files in a directory tree.  Uses STL containers to efficiently store file and path names.  Provides a
    reusable directory navigation component.<br/>
    <file title="Pr2Help">../CSE687/code/Pr2Help</file>
    Demonstrates organization of a program to process C++ code.<br/>
    <file title="Pr2PartialSoltution">../cse687/code/Pr2PartialSolution</file>
    A toolkit prototype for type analysis.<br/>
    <p/>

    <hilight>Demonstrating OOD Principles</hilight>
    <file title="factories">../CSE687/code/factories</file>
    Illustrates how to build object factories.  Creates any object found on a give inheritance hierarchy.<br/>
    <file title="Interfaces">../CSE687/code/interfaces</file>
    Illustrates the use of abstract base classes as interfaces and the use of factory functions.  These are intended to
    break compile-time dependencies caused by the client including implementation detail from header files.<br/>
    <file title="notifier">../CSE687/code/notifier</file>
    Illustrates use of events and callbacks in a "Publish/Subscribe" structure.<br/>
    <file title="progToInterface">../CSE687/code/progtointerface</file>
    Illustrates the use of a class factory to support the program-to-interface paradigm.<br/>
    <p/>

    <hilight>IOStreams Examples</hilight>
    <file title="iostreams">../CSE687/code/iostreams</file>
    Demonstrates basic iostream operations, formating, reading and writing with files, and use of stringstreams.<br/>
    <file title="streambufs">../CSE687/code/streambufs</file>
    Demonstrates a few uses for the streambuf classes buried inside iostreams, fstreams, and stringstreams.<br/>
    <file title="streambuf example">../CSE687/code/streambuf example</file>
    Shows how to redirect a stream.<br/>
    <p/>

    <hilight>STL Related Examples</hilight>
    <file title="STL">../CSE687/code/STL</file>
    Illustrates basic use of the STL containers, iterators, and algorithms.<br/>
    <file title="STL_helpers">../CSE687/code/stl_helpers</file>
    More STL related code that will be used to look at parts of the STL.<br/>
    <file title="STL Odds and Ends">../cse687/code/STL Odds and Ends Code</file>
    Illustrates use of inserters and functors for selecting sort method in associative containers.<br/>
    <file title="functors">../CSE687/code/functors</file>
    Demonstrates common uses of functors - function objects.<br/>
    <p/>

    <hilight>Other Interesting Code Samples</hilight>
    <file title="Efficiency">../cse687/code/efficiency</file>
    Provides a series of demonstration programs illustrating performance issues due to: algorithms, data structures, copying,
    memory allocation, etc.<br/>
    <file title="MakeDLL">../CSE687/code/makedll</file>
    Shows how to build a DLL.  See the accompanying presentation about the required project properties.<br/>
    <file title="ManagedCPP">../cse687/code/ManagedCPP</file>
    Illustrates how to use managed extensions for C++ and how to mix managed and unmanaged code.<br/>
    <file title="Building DLLs - setup.doc">../cse687/code/makedll/setup.doc</file>
    Shows project settings and steps for building a C++ DLL.<br/>
    <file title="spawnProc">../CSE687/code/spawnproc</file>
    Shows how to run a program from inside another, by creating its process and passing command line arguments.<br/>
    <file title="fixExtensions">../CSE687/code/fixExtensions</file>
    Shows how to open any file matching a specific pattern, and make text changes.  This is a prototype for a tool I use
    to manage website files.<br/>
    <p/>

    <html><a href="#Top">Top</a></html>&#32;
  </section>

  <html><a name="CSE775"/></html>
<!--  <image src="pictures/nightlights.jpg" size="230" />
  <caption><link title="http://epod.usra.edu">epod.usra.edu/</link></caption> -->
  <section title="CSE775 - Distributed Objects">
    <ind>
      <section title="Attributions:">
        Several projects in the folders below are modifications, some minor, some with significant changes, of code provided
        with the book:
        <ind>
          Inside Distributed COM, Guy Eddon and Henry Eddon, Microsoft Press, 1998.
        </ind>
        We used this excellent book for two years in this course.  It is loaded with example code, very thoughtfully constructed,
        and most simple in structure, with concise but effective documentation for builds.
       <p/>
        One ActiveX project, ATLPanel, was adapted, with only minor modifications, from code provided with the book:
       <ind>
          ActiveX Template Library Development with Visual C++ 6.0, Nathan Wallace, Wordware Publishing, 1999.
        </ind>
      </section>
    </ind>
    <ind>
      <section title="Building These Projects:">
        Building COM projects is a little more complicated than building console or straight Windows applications.  Here are some
        guidelines:
        <olist>
          <litem>
            Find all the idl files in the project (most have one, some have two or more), right click on them and select compile.
            This invokes the MIDL compiler to generate header and implementation files needed for the C++ compiles.
          </litem>
          <litem>
            Right-click on each COM component project and select rebuild.  This includes any proxy projects that are part of the solution.
            <note> Building ProxyStub code prior to Vista required linking to rpcndr.lib.  This is no longer shipped with Vista, and is not required as one of
            the other lib files now supplies that functionality.  Just remove rpcndr.lib from the linker input properties, and rebuild.</note>
          </litem>
          <litem>
            Go to the project directory and dir /s *.dll (for In-Proc components) and dir /s *.exe (for Out-of-Proc components).
            Register each In-Proc component with regsvr32 xxx.dll.  Register each Out-of-Proc component by running the EXE
            with the switch /RegServer.  You will find a screen shot <ifile title="here">../cse775/code/screenshots/AddTools.doc</ifile>
            that shows how to add regsvr32 to the Visual Studio Tools Menu to do that more easily.  <note>To do any registrations within
            Visual Studio under Vista, you need to run Visual Studio with "run as administrator" option</note>.
          </litem>
          <litem>
            If the client and component do not share the same context (threading model and security attributes) then you will
            need to insure that the ProxyStub code is compiled to build the ProxyStub dll, and then register the dll, as above.
            In some of the workspaces that need ProxyStubs I have provided projects to build them.  My recommendation
            is to build the project without worrying too much about this, but if you get a failure in CoCreateInstance, then look
            for a ProxyStub that needs building or registering.
          </litem>
          <litem>
            Now you can set the client(s) as startup project(s) and compile and run them.
          </litem>
        </olist>
      </section>
    </ind>

    <hilight>Basic Component Technology</hilight>
    <file title="progToInterface">../CSE775/code/progToInterface</file>
      Code from the CSE687 course that has some relevance to this course.<br/>
    <file title="Interfaces">../CSE775/code/interfaces</file>
      This is an example of programming to an interface and using a factory function in standard C++ code.<br/>
    <file title="DemoDll">../CSE775/code/DemoDll</file>
      This demonstrates the advantages of programming to interfaces and using factory functions.  The dllClient runs smoothly with
      DemoDll, but crashes when
      run with RevisedDemoDll because it makes references to implementation details in the original DemoDll.  The interfaceClient
      runs smoothly with either InterfaceDll or RevisedInterfaceDll because it uses an interface and factory function to communicate
      with the dll.<br/>
    <p/>

    <hilight>COM components in C++ - no ATL or MFC support</hilight>
    <file title="INPROC3">../CSE775/code/inproc3</file>
      In-Proc component that adds two integers.<br/>
    <file title="inproc_Ex1">../CSE775/code/inproc_ex1</file>
      In-Proc component that accepts a string from the client, and sends another string back.  The interface uses BSTRs.<br/>
    <file title="OUTPROC1">../CSE775/code/outproc1</file>
      Illustrates how to build an Out-of-Proc component that supports the Multi-Threaded model, allowing multiple client
      threads to access the server functions concurrently.  The main server thread waits on an
      event to allow clients to access the component's interface.  When the final release is called the event is triggered and the
      server shuts down.  Shared component resources are locked using a critical section.<br/>
    <file title="OUTPROC3b">../CSE775/code/outproc3b</file>
      Demonstrates how to build an Apartment-Threaded server.  To support this model, all calls are serviced by single server thread, 
      extracting request messages from a Windows message loop.  This project uses TypeLibrary marshaling, achieved by using an
      oleautomation attribute in its IDL.<br/>
    <file title="INTERFAC">../CSE775/code/interfac</file>
      Out-of-Proc component that implements five interfaces illustrating how to send back and forth basic types, wchar_t strings,
      BSTRs, pointers, structs, and arrays.  The workspace demonstrates how to declare the interfaces in IDL and how to handle
      these types on both the component and client sides.<br/>
    <p/>

    <hilight>ATL-based COM Components</hilight>
    <file title="ATLdemo">../CSE775/code/atldemo</file>
      Inproc component built with ATL.<br/>
    <file title="ATLexe">../CSE775/code/atlexe</file>
      Demonstration of an Out-of-Proc component, built with ATL.<br/>
    <file title="ATLPanel">../CSE775/code/atlpanel</file>
      ActiveX control: paints its interface and uses ConnectionPoints-based events.<br/>
    <file title="ATLStrings">../CSE775/code/atlstrings</file>
      Simple component accepts a string and returns another.  Three clients are provided.  One written in straight C++,
      on using CComPtr smartpointers (provided by ATL), and one using com_ptr_t smartpointers (provided by Visual Studio).<br/>
    <file title="ATLWinExp">../CSE775/code/atlwinexp</file>
      Builds Frame window and a Dialog, using ATL windows classes.<br/>
    <file title="ATLDemo7">../cse775/code/atlDemo7</file>
      Demonstrates building an In-Proc component with ATL 7.0. - not too much changed from 6.0 if you don't use attributes.<br/>
    <file title="ComponentCallsComponent">../cse775/code/ComponentCallsComponent</file>
      Shows how to build a component that is a client of another (inner) component.  Also uses CComQIPtr and CComBSTR classes
      to simplify the implementation of a client.<br/>
    <file title="dirControl">../CSE775/code/dirControl</file>
      This project builds an In-Proc COM component that makes a directory listing of the current directory.  The project shows
      how to use the control from a client that uses Visual Studio COM support classes, and also how to use the control on a
      web page.<br/>
    <p/>

    <hilight>COM Technologies</hilight>
    <file title="Connection Points">../CSE775/code/Connection Points</file>
      Out-of-Proc component communicates with client through Connection Points.<br/>
    <file title="TestConnPts2">../cse775/code/testconnpts2</file>
      Shows how to build an ActiveX control that declares a connection point interface.<br/>
    <file title="Dispatch">../CSE775/code/dispatch</file>
      Demonstrates how to build a COM component that exposes an IDispatch interface (the easy part) and how to call a 
      IDispatch interface from C++ code (the not so easy part).<br/>
    <file title="REGISTRY">../CSE775/code/registry</file>
      Demonstrates how to read and write to the registry.  This code is based on code from the book Win32 System Services,
      Marshal Brain and Ron Reeves, Prentice-Hall, 2001.  I've made minor modifications to the code, but the ideas and structure
      are theirs.<br/>
    <file title="types">../CSE775/code/types</file>
      Shows how to convert to and from Unicode strings.<br/>
    <p/>

    <hilight>ActiveX Controls</hilight>
    <file title="AxDemo">../cse775/code/axdemo</file>
      Shows how to build ActiveX controls and support a control's events using connection points.<br/>
    <file title="WebBrowser">../cse775/code/webbrowser</file>
      Demonstrates how to build your own browser application.<br/>
    <file title="Browser Events">../cse775/code/browser</file>
      Web browser control hosted in C# WinForm.  Exposes mouse events to Form.<br/>
    <p/>

    <hilight>.Net, COM, and unmanaged C++ Interoperation</hilight>
    <file title="Interop with COM">../CSE775/code/InteropWithCOM</file>
      Shows how to use a COM component (inproc_Ex1) from a C# client.<br/>
    <file title="Bridge from C++ to C#">../CSE775/code/Bridge_from_CPP_TO_CSharp</file>
      Illustrates use of a managed C++ class to wrap legacy C++ code (Tok module) so that a C# class can use it.<br/>
    <file title="C# and COM Interoperation with events">../CSE775/code/testConnPts2</file>
      Uses Connection Points to do a remote callback from COM component to C# client.<br/>
    <p/> 

    <hilight>C# Techniques</hilight>
    <file title="DelegateDemos">../CSE775/code/DelegateDemos</file>
      This demonstrates the use of delegates, delegates with events, and delegates in multi-threaded programs.<br/>
    <file title="AsynchCallback">../CSE775/code/asynchcallback</file>
      Demonstrates how to use asynchronous callbacks with delegates.<br/>
    <file title="C# and COM Interoperation">../CSE775/code/testConnPts2</file>
      Uses Connection Points to do a remote callback.<br/>
    <file title="Navigate">../CSE775/code/navigate</file>
      Illustrates how to navigate a directory tree using .Net classes.<br/>
    <file title="Navigate with Delegates">../CSE775/code/navigatewithdelegates</file>
      Illustrates how to make the navigate code reusable through delegates.<br/>
    <p/>

    <hilight>C# Components</hilight>
    <file title="Components">../cse775/code/components</file>
      Demonstrates the building of .Net libraries, components - things that can live in the component designer, and controls - things
      that can live in the forms designer.<br/>
    <p/>

    <hilight>A Little Windows Programming</hilight>
    <file title="basicWindows">../CSE775/code/basicwindows</file>
      MFC based Frame window.<br/>
    <file title="moreBasicWindows">../CSE775/code/moreBasicWindows</file>
      Illustrates how to write a Windows Application in straight C++ and with MFC.  Also shows how to create a console in a
      Windows Application and how to create a Window in a console application.<br/>
    <file title="DlgRecipe">../CSE775/code/dlgRecipe</file>
      This project builds a simple Dialog application, using MFC, and provides a series of screen shots to show you how to build one like it.
      The purpose of the project is to allow students who have done virutally no windows programming a way to survive
      the later projects.<br/>
    <file title="Drawing on Forms">../cse775/code/drawingonforms</file>
      Shows how to draw text and lines on a form.<br/>
    <file title="FWRecipe">../CSE775/code/fwrecipe</file>
      This project builds a Frame Window application, using MFC, and provides a series of screen shots to show you how to build one like it.
      The purpose of the project is to allow students who have done virutally no windows programming a way to survive
      the later projects.<br/>
    <p/>

    <html><a href="#Top">Top</a></html>&#32;
  </section>

  <html><a name="CSE776"/></html>
<!--  <image src="pictures/weathermap.gif" size="200"/>
  <caption><link title="http://epod.usra.edu">epod.usra.edu/</link></caption> -->
  <section title="CSE776 - Design Patterns">
    <html><a href="#Top">Top</a></html>&#32;
  </section>

  <html><a name="CSE778"/></html>
  <section title="CSE778 - Advanced Windows Programming">
    <html><a href="#Top">Top</a></html>&#32;
  </section>

  <html><a name="CSE784"/></html>
  <section title="CSE784 - Software Studio">
    <constr/>  
    <html><a href="#Top">Top</a></html>&#32;
  </section>

  </visible>    
</courses>
