CSE687 - Object Oriented Design

Lecture #26 - Design Strategy Examples

Revised: 4/28/2011
Home Courses Code Handouts CoreTech Books Articles Math Research Masters Projects SWDev WebDev News OtherLinks SiteDesign Graduates AllPages Office Hours Notices

CSE681-SWMAA CSE686-IP CSE687-OOD CSE775-DO CSE776-DP CSE778-AWP CSE784-SWS

Lecture #01 Lecture #02 Lecture #03 Lecture #04 Lecture #05 Lecture #06 Lecture #07
Lecture #08 Lecture #09 Lecture #10 Lecture #11 Lecture #12 Lecture #13 Lecture #14
Lecture #15 Lecture #16 Lecture #17 Lecture #18 Lecture #19 Lecture #20 Lecture #21
Lecture #22 Lecture #23 Lecture #24 Lecture #25 Lecture #26 Lecture #27 Lecture #28

Syllabus SG - OOD SG - Design SG - Templates SG - Class Relationships

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,

Office Hours:Instructor & TAs

Content:

This lecture continues with template metaprogramming.
  1. 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 Submissions:
    Project #4
    Is due Thursday, April 28. I will accept these until Midnight, Thursday 02 May, 2011, with a one point per day late penalty.

    Midterm Makeup
    I will accept these until Midnight, Monday 09 May, 2010. Please upload to college server as usual.

  3. Midterm Makeup
  4. Template Metaprogramming
  5. software Design Goals:
  6. More Design Strategies
    Language strategies: deep copy vs. shallow reference

    Basic C++ Strategies:

    • encapsulate using classes
    • polymorphically substitute deriveds for interfaces and abstract classes
    • parameterize using templates
    • mixin with multiple inheritance

    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, pass and return references instead of values, lazy evaluation, caching

    Robustness: use exceptions - catch as close to throw as practical, each class takes responsibility for resource allocation, deallocation, and error handling

  7. Smart Pointers
  8. Veneers and Boltins