Skip to content

Code-Craftsmanship-Saturdays/designPatterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns

What is a Design Pattern?

Four Essential Elements of Design Patterns

Name

The handle whe can use to describe a design problem, its solution, and the consequences in a word or few.

Problem

When to apply the pattern. This can be:

  • How to represent an algorithm as objects
  • Class structures symtomatic to inflexible design
  • List of conditions that must be met before it makes sense to use that particular pattern

Solution

Elements that make up the design, their relationships, responsibilities, and collaborations.

The solution provides an abstract description of a design problem and how a general arrangement of elements (classes and objects in our case) solves it.

The solution does NOT describe a particular implementation. It is a template that can be applied in may different situations.

Consequences

The results and trade-offs of applying the pattern.

Describing Design Patterns

Purpose

  • Creational: Describe the process of object creation
  • Structural: Composition of classes or objects
  • Behavioral: Ways in which classes or objects interact and distributes responsibility

Scope

  • Class
  • Object

Delegation

Inheritance vs Composition

Inheritance vs Paramerized Types

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published