Quick Reference

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: (moving content from Exam Quick Reference))
 
Line 1: Line 1:
(moving content from Exam Quick Reference)
+
Note:
 +
 
 +
* The intention of this guide is to be succinct. Don't use this for extended explanation, just note brief points. People can follow links for explanation.
 +
* While this guide may be useful for the exam, don't be exam specific. This is a concise list of concepts to jog your memory, not a Cheat Sheet with direct answers from last year or whatever.
 +
 
 +
 
 +
 
 +
=== Contradictory Design Maxims ===
 +
 
 +
* [[Design by contract]] and [[Tell, don't ask]]
 +
* [[Composite]] pattern and [[Avoid no-op overrides]]
 +
 
 +
 
 +
 
 +
=== Design Pattern Cliff Notes ===
 +
 
 +
* [[Decorator]]
 +
** Identify by: Both HAS A and IS A at the same time, with multiple subclasses.
 +
** Used for: Adding flexible combinations of specialized functionality.
 +
** Classic Example: Adding scrolling functionality, borders, etc to a window.
 +
** Why better than alternatives: Avoids combinatorial explosion of subclasses.
 +
 
 +
* [[Composite]]
 +
** Identify by: Both HAS A and IS A at the same time, usually without subclasses.
 +
** Used for: Making many act as one.
 +
** Classic Example: Making a shape comprising other shapes.
 +
** Why better than alternatives: Can use singular and collective instances totally transparently (identically).

Revision as of 03:01, 27 September 2008

Note:

  • The intention of this guide is to be succinct. Don't use this for extended explanation, just note brief points. People can follow links for explanation.
  • While this guide may be useful for the exam, don't be exam specific. This is a concise list of concepts to jog your memory, not a Cheat Sheet with direct answers from last year or whatever.


Contradictory Design Maxims


Design Pattern Cliff Notes

  • Decorator
    • Identify by: Both HAS A and IS A at the same time, with multiple subclasses.
    • Used for: Adding flexible combinations of specialized functionality.
    • Classic Example: Adding scrolling functionality, borders, etc to a window.
    • Why better than alternatives: Avoids combinatorial explosion of subclasses.
  • Composite
    • Identify by: Both HAS A and IS A at the same time, usually without subclasses.
    • Used for: Making many act as one.
    • Classic Example: Making a shape comprising other shapes.
    • Why better than alternatives: Can use singular and collective instances totally transparently (identically).
Personal tools