Skip to content

Commit

Permalink
template for creational design patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
saltukalakus committed Dec 29, 2024
1 parent 7baba7b commit 22cfd24
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
book
**/target/**
**/target/**
.DS_Store
6 changes: 6 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
- [Option Enum](./essentials/std-lib/option.md)

- [Patterns](./patterns/intro.md)
- [Creational](./patterns/creational/intro.md)
- [Singleton](./patterns/creational/singleton.md)
- [Factory Method](./patterns/creational/factory-method.md)
- [Abstract Factory](./patterns/creational/abstract-method.md)
- [Builder](./patterns/creational/builder.md)
- [Prototype](./patterns/creational/prototype.md)
- [Behavioral](./patterns/behavioral/intro.md)
- [Observer](./patterns/behavioral/observer.md)
- [Strategy](./patterns/behavioral/strategy.md)
Expand Down
1 change: 1 addition & 0 deletions src/patterns/creational/abstract-method.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Abstract Factory
1 change: 1 addition & 0 deletions src/patterns/creational/builder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Builder
1 change: 1 addition & 0 deletions src/patterns/creational/factory-method.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Factory Method
17 changes: 17 additions & 0 deletions src/patterns/creational/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### Creational Patterns

Creational Patterns deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.

### Some Common Creational Design Patterns

1- [Singleton](./singleton.md): Ensures a class has only one instance and provides a global point of access to it.

2- [Factory Method](./factory-method.md): Defines an interface for creating an object, but lets subclasses alter the type of objects that will be created.

3- [Abstract Factory](./abstract-factory.md): Provides an interface for creating families of related or dependent objects without specifying their concrete classes.

4- [Builder](./builder.md): Separates the construction of a complex object from its representation so that the same construction process can create different representations.

5- [Prototype](./prototype.md): Specifies the kinds of objects to create using a prototypical instance, and creates new objects by copying this prototype.
Behavioral Patterns deal with object collaboration and the delegation of responsibilities.

1 change: 1 addition & 0 deletions src/patterns/creational/prototype.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Prototype
Empty file.
2 changes: 1 addition & 1 deletion src/patterns/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Patterns help to have reusable solutions to common problems that occur in softwa

### Categories of Design Patterns

1- Creational Patterns: Deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.
1- [Creational Patterns](./creational/intro.md): Deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.

2- Structural Patterns: Deal with object composition or the structure of classes and objects.

Expand Down

0 comments on commit 22cfd24

Please sign in to comment.