Repaso
EspaƱol

What is a design pattern?

Options

  1. A ready-made library that you install and import
  2. A named, proven solution to a common design problem (Correct option)
  3. A color theme used in user interfaces
  4. A type of database for storing code samples

Answer

A proven, named solution to a common design problem that you adapt to your code

Why

Design patterns are reusable ideas, not code you download. Examples: Factory, Strategy, Observer, Adapter.

They give teams a shared vocabulary: saying 'use a Strategy here' explains a whole design in two words.

Use them when they solve a real problem, not to show off.

Remember

Pattern = named, reusable solution idea.

Key terms

Practice this question in Repaso