Software Structure, Design, & Documentation
Design Study Guide
Design presentations, concepts, and notes.
- UML Notation
Universal Modeling Language notation, used in the course to illustrate designs and design ideas.
Fundamental design mechanism, fully supported by OO Languages like C++.
Defines structure for packages, motivates their use.
- Partitioning: classes, packages, processes, and machines
Intercommunication between these levels differ in performance by orders of magnitude!
- Fragile Designs
Things you Don't and Do want to write into your code.
- OOD Principles
Four important OOD Principles:
Liskov Substitution (LSP),
Open Closed (OCP),
Dependency Inversion (DIP),
Interface Segregation (ISP).
Programming to Interfaces
Very important topic: This is the primary mechanism for designing loosely coupled systems.
- Distinguish between interface, abstract class, and concrete class
Tri-level inheritance structure: combined substitution and code sharing.
- Component: an isolated part
Key design idea.
- Using Inheritance
Summarizes several ways inheritance is found to be useful in SW Designs.
- Software Structure Research
Research presentation - illustrates dangers of miss-using dependencies.
Syntax of the XML metalanguage.
Substrate of background knowledge required for this course (not all required at beginning).
- Brief Survey of C++ Language
A quick tour of the language.
- Introduction to C++
Broad survey of C and C++. Compilation, Memory, and Computation models. We will step throught this very quickly.
Str String Class
ADTs are user defined types that that support almost all of the operations expected of primitive types.
- C++ Operators
Discloses C++ operator model.
Study of class relationships. There is a lot of material here you will need to master for the midterm,
for interviews, and for professional work.
Basic sample code,
Template functions and classes, some useful techniques, and template function objects.
HashTable Template with Iterators,
A usefule reusable component that nicely illustrates sophisticated template techniques.
- Template Policies and Traits
Template techniques essential for STL and many template classes like Hashtable.
Namespace Taxonomy concept
Way to partition code names to avoid ambiguity. Can be used to help disclose design.
Object Oriented Error Handling - effective mechanism, but not without its problems.
- Run-Time Type Information (RTTI)
A very weak form of reflection: retrieves type names and some hierarchy information.
Template MetaProgramming (incomplete),
Bizarre, occasionally very useful program constructions using C++ compile-time template processing.
Basic C++ Language Demos
C++ Standard Library Demos
Interesting design ideas
Issues with C++ Language
Illustrates C++ pointers vs. C++ references, classes and objects, Template classes, composition, and inheritance.
- Basic inheritance demo
Public inheritance implies an "is-a" relationship.
- Class Relationships
Illustrate composition, aggregation, using, and inheritance.
- Syntax variations required for different contexts
Six ways to call void Ctor, four ways to call copy Ctor, two ways to call an operator!
- str string class
Str class illustrates design of Value Types. You should prefer std::basic_string<T>.
Advanced template techniques
Simple template demos, then exploration of some more advanced technques.
- Nodes for Linked List
Good exercise with C++ pointers and references.
- Function Pointers
Invoke global and member functions through function pointers.
Illustrate traditional casts, static_cast, reinterpret_cast, const_cast, and dynamic_cast.
Demonstrates standard and user-defined exceptions.
- Pure virtual functions
You can supply a definition for a pure virtual function.
- Class Layout
Illustrates how composite classes are layed out in memory.
Failure to initialize properly
Illustrates a surprising problem that occurs if you don't use constructor initialization sequences.
See, specifically, deminher2 (error) and deminher2b (error fixed).
Hiding is a subtle flaw, caused by inappropriate function overloading.
Extract file information from specified file, using Win32 API.
Provides Directory, file, and string conversions, using Win32 API.
- Component: Interface, factory, DLL - a demo
Dynamic Link Libraries are a standard packaging mechanism, required to make components.
Packaging code in Dynamic Link Libraries (DLLs)
- Packaging socket code in DLL
A more realistic example of DLL packaging, using socket demo code.
Win32 Socket Demo,
Sockets are a low-level, byte oriented communication mechanism. Supports interprocess communication and network programming.
Discussion of processes, threads, scheduling, and thread synchronization.
Reusable Thread class,
Thread class structure,
Implementation of threads class and several kinds of locks.
Reusable component, important for passing messages between threads.
- Process enumeration
Display names of all currently running processes.
- Spawn Windows Process
Create a process programmatically, passing it command line arguments.
- Embedded Resources
Demonstrates how to embedd a text resource into an execution image, and how to use it too.
- Base64 Encoding
Base64 Encoding is used to convert binary data into character arrays.
Special Purpose Reusable Packages
Core of code and XML analyzer - has Tokenizer, TokenCollector, Parser, Rules, and Actions.
Simplified Test Harness,
Test Harness Structure
Test Harness loads assemblies, looks for ITest interface, creates test objects and executes them.
- Peer-to-Peer System Structure Diagrams
Model for communicating systems, uses WCF. Each peer has a message sender and receiver.
Concurrent Access to Files
Provide safe access to files for reading and writing when there are concurrent clients.
- Smart Pointer
Smart pointer manages access to heap objects with reference counting.