Object-Oriented Design and Patterns: Developing Code That’s Easy to Understand, Maintain, and Change

My OOD and patterns coaching and tutorials reflect extensive efforts to learn from respected software architects/developers who practice primarily in the lean-agile process space, via their books, on-line blogs, conference presentations, direct collaboration, local and global user groups, combined with my personal “hands-on” experience as a software architect/developer on teams using OOD and patterns (design patterns and pattern-oriented software architectures) on production software and meeting business delivery targets.

My experience includes coming into environments where no OOD and patterns were used previously, helping to develop custom training and present it to internal teams, introducing key code qualities and design practices, and teaching core OO concepts and principles found and recognized in many common and beneficial design patterns. It also includes extensive experience providing “hands-on” coaching, side-by-side or in pairing fashion, as in “internal embedded coach.” 

Object-Oriented Design Intro

  1. Far Beyond Noun, Verb Thinking
  2. A “One-Page” Primer
    • Predictability (of code changes)
    • Characteristics of easily maintainable code
    • Basic principles of coding
    • Cohesion
    • Coupling and coupling types
    • Coding by intention
    • Encapsulating (not just hiding data)
    • Desirable code qualities
    • Testability
  3. Abstraction – handling what is common
  4. Polymorphism – handling what varies
    • Subtype polymorphism
    • Ad-hoc polymorphism
  5. Inheritance
    • Implementation
    • Interface
    • Containment and delegation
  6. Separation of Concerns (SoC)
    • Useful partitioning
    • Macro level examples
    • Micro level examples
  7. Meet Your Uncle Bob
    • Single-responsibility principle – SRP
    • Open/close principle – OCP
    • Liskov substitution principle – LSP
    • Interface separation principle – ISP
    • Dependency inversion principle – DIP
    • Package cohesion principles
  8. Other Useful Topics Worth Discussing
    • Adaptive programming
    • The law of demeter (LoD)
    • Tell, don’t ask
    • Why extends is evil
    • Why getter and setter methods are evil
    • Constructor, property, or method parameter (which, when and why)
    • Start with the sequence diagram, not the class hierarchy

 

Design Patterns Intro – Part I

  1. Patterns Are Everywhere
  2. What Are Design Patterns?
  3. Re-use, Re-use, Re-use
  4. What Patterns Are Not
  5. Common Solutions Specific Implementations
    • Adapt
    • Practice
    • Refactor
  6. Context, Force, & Consequence
  7. Some Fancy Names for Repeatable Solutions
    • Façade
    • Singleton
    • Observer
  8. Why Use Design Patterns
  9. Feel the Force!
  10. It’s not about the UML
  11. Its’ not about the implementation
  12. Trade-offs! Your Still Have to Think!
    • Big design up front vs. emergent design
    • More than one way to use patterns
  13. Other Patterns of Interest
    • Refactoring patterns
    • xUnit test patterns
    • Implementation patterns
    • Software configuration patterns
    • Human-computer interaction patterns

 

Design Patterns Intro – Part II

  1. UML Basics
  2. The Pieces – Context, Force, Consequences, UML
  3. Prerequisites – Foundation Patterns
    • Delegation
    • Interface
    • Abstract base class
    • Interface and abstract
  4. Design Patterns 101
    • Strategy
    • Template
    • Who says you must use inheritance for the template pattern?
  5. Design Patterns 102
    • Chain of responsibility
    • Proxy
    • Null object
    • Adapter
  6. Design Patterns 103
    • Bridge
    • Façade
    • Decorator
    • Abstract factory
    • Factory method
    • Singleton
    • Composite
    • Read-only interface
    • Balking

 

Pattern-Oriented Software Architectures Intro

  1. Layers
    • Strict variation
    • Relaxed variation
  2. MVP – Model, View, Presenter
    • Passive view variation
    • Supervising controller variation
    • Presenter-first approach
    • Benefits
  3. PAC – Presentation, Abstraction, Control
  4. Lessons Learned – “Hands-on and Real World”
    • Publisher-subscriber is great for simple workflows
    • Simple workflows can become complex workflows
    • Emergent is good, but not always
    • Make UI clients only as thin as beneficial
    • Learning is valuable, when it is expensive, pay for it only once if possible

The outline above provides a general scope of the topics that could be covered to introduce your teams to object-oriented design and patterns. It represents a core of topics that would be customized after gathering more information specific to your context as well as considering the type of coaching and tutorials desired (ex. a one or two-day classroom presentation, several four-hour sessions given over weeks, or a fixed period embedded coaching engagement).

Print This Page (printer friendly)Print This Page (printer friendly)