Skip to content

Discuss some patterns which provides a general reusable solution for the common problems that occur in software design.

Notifications You must be signed in to change notification settings

yossefezzat/Design-Patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns

This Repo to discuss some design patterns which provides a general reusable solution for the common problems that occur in software design.

Introduction

  • A design pattern provides a general reusable solution for the common problems that occur in software design.
  • The pattern typically shows relationships and interactions between classes or objects.
  • Design patterns are programming language independent strategies for solving a common problem.
  • That means a design pattern represents an idea, not a particular implementation.
  • By using design patterns, you can make your code more flexible, reusable, and maintainable.

Goal

  • Understand the purpose and usage of each design pattern in order to pick and implement the correct pattern.

Example

  • In many real-world situations, we want to create only one instance of a class. For example, there can be only one active president of a country at any given time. This pattern is called a Singleton pattern.
  • Other software examples could be a single DB connection shared by multiple objects as creating a separate DB connection for every object is costly. Similarly, there can be a single configuration manager or error manager in an application that handles all problems instead of creating multiple managers.

Types of Design Patterns

  • Creational Patterns

    • These patterns are all about class instantiation or object creation.
    • These patterns can be further categorized into Class-creational patterns and object-creational patterns.
    • While class-creation patterns use inheritance effectively in the instantiation process, object-creation patterns use delegation effectively to get the job done.
  • Structural Patterns

    • These design patterns are about organizing different classes and objects to form larger structures and provide new functionality.
  • Behavioral Patterns

    • Behavioral patterns are about identifying common communication patterns between objects and realizing these patterns.

About

Discuss some patterns which provides a general reusable solution for the common problems that occur in software design.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages