Essential Pattern

“Pressing down the pillow” refers to one’s efforts not to let the head of one’s opponent rise. In battles based on martial strategy, it is taboo to let your opponent take the initiative, thus putting yourself on the defensive. You must try at all costs to lead your opponent by taking complete control of him. During combat, your opponent intends to dominate you as much as you want to dominate him, so it is vital that you pick up on your opponent’s intentions and tactics so as to control him … According to the principle of martial strategy, you must be able to control your opponents at all times. Study this point well.  THE BOOK OF FIVE RINGS, MIYAMOTO MUSASHI, 1584-1645

Design Patterns

  • Describe simple, elegant solutions to specific problems 
  • Systematically names explains and evaluates – recurring design 
  • Helps to get a design “Right Faster” – proven techniques 
  • Insights – flexible, modular, reusable and understandable 
    • Solutions developed over time
  • Object-oriented architecture – full of catalogue patterns 
    • Architecture – simpler, smaller and more understandable 
    • Types – creational, behavioral and structural 
  • References – sources of information
    • Template method, abstract factory, factory method, observer, strategy 
  • Designing First Principles – General to address future problems/requirements – Specific to the problem
    • 1. Pertient objects – clear, decisive, relevance 
    • 2. Factor to classes – at right detail granularity 
    • 3. Definition – Class interface / Inheritance hierarchies 
    • 4. Establish Key relationships – Reuse past working solutions – experts 

Each design describes a problem, which occurs over and over in the environment, then describe a core solution, in a way that you can reuse solution, without doing it same way twice

In short, I think like Frederick [the Great], one should always be the first to attack.  NAPOLEON BONAPARTE, 1769-1821

Pattern Essential Elements

  1. Name: Is a handle to describe
    1. Design problem – adds design at a higher level of abstraction
    2. Consequences – vocabulary, ease of thinking and communication
    3. Solution -Describe how the arrangement of classes/objects solve
  2. Problem – Describe when to apply the pattern
    1. Explain problem context – inflexible classes
    2. Lists of conditions to be met 
    3. Specific Design problem – how to represent algorithms 
  3. Solution – Describe elements that make 
    1. Design and relationships  – Provide an abstract description of the design problem
    2. Responsibilities and collaborations 
  4. Consequences – results or tradeoff of applying 
    1. Often space/time – a template that can be applied in many different situations
    2. Flexibility, extensibility and portability

One who excels at warfare compels men and is not compelled by others.  SUN-TZU (4 CENTURY B.C.)

Leave a Reply

Your email address will not be published. Required fields are marked *