Design Patterns are coding templates for common situations. They let you have a good starting point for coding with the assurance of that the design idea is supported by many experienced coders. So why haven't we learned design patterns earlier? Well, like all coding mechanisms, they can be misused. Last sprint, we learned that there are "good" inheritance hierarchies and "bad" ones, and the difference is whether or not they lead to following the principles of good design. The same is true of patterns. Knowing the pattern is not enough - we need to learn to apply the pattern at the right time and in the right way, so that the pattern does what it was intended to do: lead to maintainable code.
For each of these design principles, know what it means, why it leads to "good" code, and which coding practices support it:
Liskov Substitution Principle
Interface Segregation Principle
Dependency Inversion Principle
2. Know how to apply Data-Driven Design and Design By Contract.
3. Know what each Design Pattern means, what principles it supports, and how to implement it:
State Pattern
Model-View-Controller Pattern
Factory Pattern
Template Pattern
Design Principles:
Liskov Substitution Principle
(Book Chapter) Chapter 3: Abstraction and Hierarchy from How to Use Objects: Code and Concepts
(Book Chapter) Chapter 10: The Liskov Substitution Principle from Agile Principles, Practices, and Patterns
Dependency Inversion Principle
(Book Chapter) Chapter 11: The Dependency Inversion Principle from Agile Principles, Practices, and Patterns
Interface Segregation Principle
(Book Chapter) Chapter 3: Abstraction and Hierarchy from How to Use Objects: Code and Concepts
(Book Chapter) Chapter 12: The Interface Segregation Principle from Agile Principles, Practices, and Patterns
Design By Contract, Data-Oriented Design, & Reflection:
(Book Chapter) Chapter 4: Contracts for Objects from How to Use Objects: Code and Concepts
(Online Article) Data-Oriented vs Object-Oriented Design
(Online Tutorial) Java Reflection
(Code Example) Reflection.zip
Design Patterns:
State Pattern
(Book Chapter) Chapter 20: State Pattern from Java Design Patterns: A hands-on experience with real-world examples
(Book Chapter) Chapter 10: The State Pattern - the State of Things from Head First Design Patterns
MVC Pattern
(Book Chapter) Chapter 12: Patterns of Patterns from Head First Design Patterns
Factory Pattern
Template Pattern
(Book Chapter) Chapter 8: The Template Method Pattern: Encapsulating Algorithms from Head First Design Patterns, 2nd edition
Design Representations:
(Book Chapter) Chapter 5: Notation, from Object-Oriented Analysis and Design
(Book Chapter) Chapter 14: Working with Diagrams from Agile Principles, Practices, and Patterns
(Online Article) CRC Cards
Collections:
(Online Tutorial) Collections in Java