Skip to content

wralith/design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns

Design Patterns with reasonable code examples -i guess-. 🤓

cover image

You can check docs folder for markdown files with in depth explanations and some conditions and opportunities to use certain design pattern. 📕

Code examples for each language can be found in its separate folder that structured with what that languages conventions are with implementation of pattern and the tests.

  • To understand how to implement the pattern, check the example cases, don't worry there are comments for you to understand concepts and examples better.
  • To understand how the code will be used in client, check test codes.

If you have any suggestion or spotted a mistake, feel free to reach out anytime.

Creational Patterns 🏗

Builder

Builder pattern provides a flexible and organized approach to constructing complex objects.

In Depth Explanation 👈

Code Example

Language Implementation Code Test Code
Go Example Code Test Code
TypeScript Example Code Test Code

Prototype

The Prototype is used to create objects by cloning or copying existing objects.

In Depth Explanation 👈

Language Implementation Code Test Code
Go Example Code Test Code
TypeScript Example Code Test Code

Singleton

The Singleton is used to ensure only one instance of a class is shared across whole application.

In Depth Explanation 👈

Language Implementation Code Test Code
Go Example Code Test Code
TypeScript Example Code Test Code
C# Example Code Test Code

Structural Patterns

Adapter

The Adapter design pattern allows objects with incompatible interfaces to work together.

In Depth Explanation 👈

Language Implementation Code Test Code
Go Example Code Test Code
TypeScript Example Code Test Code

Behavioral Patterns

Observer

The Observer pattern allows notifying multiple objects about an event that happened on the object they're observing.

In Depth Explanation 👈

Language Implementation Code Test Code
Go Example Code Test Code
TypeScript Example Code Test Code

About

Design Patterns with reasonable code examples

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published