CSE687 - Object Oriented Design
Lecture #26 - Design Strategy Examples
Revised: 21 April 2008
Web Resources:
Stroustrup's Home Page,
Assoc. of C/C++ Users,
C++ at Microsoft,
Code Project,
Sells Brothers,
Guru of the Week,
C/C++ User's Journal,
devCentral,
Dr. Dobb's Journal,
Boost Library,
techNetCast
Content:
This lecture continues with template metaprogramming.
-
Syllabus
Describes topics to be covered,
reading material for you to digest before coming to class, and due dates
for the assigned projects.
-
Recruiting: SIG will be here on Monday, April 23rd, recruiting for software developers. They are a financial
services company. They have an informational meeting in Schine 231, from 4:00pm to 5:30pm. You may come to the second class
late if you wish to attend that session.
-
Project #4 -
Directory File Synchronizer
Project4HelpSp08
C++/CLI Winform with ownerdraw ListBox to get items with color cues
C++/CLI Form with child thread
Demonstrates use of Form Invoke to allow child thread to send data to ListBox.
C++/CLI Form with Stream
Shows how to open file streams and read files.
Win32Tools
Demonstrates reading files in blocks of bytes, consistent with SocketCommunicator
-
Midterm Makeup
-
Template Metaprogramming
Design Strategies
-
Chalk talk about design strategies
-
Language strategies: deep copy vs. shallow reference
-
Basic C++ Strategies: encapsulate, substitute deriveds, parameterize, mixin
-
Strategies for change: bind to abstraction through interfaces, object factories, and DLL packages
-
Strategies for flexibility: provide plug-in architecture through pluggable factory and interfaces
-
Other strategies for extension: veneer and bolt-in wrappers, functor-based template policies
-
Strategies for notification: command pattern
-
Strategies for sharing: member data, static members
-
Performance strategies: object pooling, copy on write, when possible, pass and return references,
lazy evaluation, caching
-
Robustness: use exceptions - catch as close to throw as practical, each class takes responsibility
for resource allocation, deallocation, and error handling
-
Smart Pointers
-
Veneers and Boltins
-
Common C++ Problems
-
Fragile Designs
-
Managed C++
-
Design Rules
Design rules and idioms that transcend Object Oriented Design.