Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adeldaniel/learn-design-patterns-in-dart

Made this repo just to help learning design patterns in Dart, so this repo for anyone needs to learn design patterns in Dart language. This repo also helped developers use Dart programming language by providing some examples for each pattern with many UML class diagrams.
https://github.com/adeldaniel/learn-design-patterns-in-dart

behavioral-design-patterns creational-design-patterns dart dart-lang dart-programming dart-programming-advanced dartlang design-patterns design-patterns-in-dart designpatterns flutter object-oriented-programmin-in-dart object-oriented-programming oop solid solid-principles solid-principles-examples state-design-pattern strategy-design-pattern structural-design-patterns

Last synced: 21 days ago
JSON representation

Made this repo just to help learning design patterns in Dart, so this repo for anyone needs to learn design patterns in Dart language. This repo also helped developers use Dart programming language by providing some examples for each pattern with many UML class diagrams.

Awesome Lists containing this project

README

        

# Dart Programming Language

## OOP

- What Is OOP ?!
- OOP Relationships ?!
- S.O.L.I.D principles ?!

## **Design Patterns**

> reusable solution to a commonly occurring problem within a given context in software design.

- It is not a finished design that can be transformed directly into source or machine code.

- Rather, it is a _description_ or _template_
- for how to solve a problem that can be used in many different situations.

- Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.

- Object-oriented design patterns
1. show relationships and interactions
1. between classes or objects,
1. without specifying the final application classes or objects that are involved.

> Patterns that imply mutable state may be unsuited for functional programming languages.

Some patterns can be rendered unnecessary in languages that have built-in support for solving the problem they are trying to solve, and object-oriented patterns are not necessarily suitable for non-object-oriented languages.

---

## **Creational Design Patterns**

- **Wikipedia**

- Are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.
- The basic form of object creation could result in design problems or in added complexity to the design.
- Creational design patterns solve this problem by somehow controlling this object creation.
- Creational design patterns are composed of two dominant ideas.
- One is encapsulating knowledge about which concrete classes the system uses.
- Another is hiding how instances of these concrete classes are created and combined

- **Tutorial point**

- a way to create objects.
- while hiding the creation logic, rather than instantiating objects directly using new operator.
- This gives program more flexibility in deciding which objects need to be created for a given use case.

- Factory Method
- Builder

---

## **Structural Design Patterns**

- **Wikipedia**

- Structural patterns are concerned with how classes and objects are composed to form larger structures.
- Structural class patterns use inheritance to compose
interfaces or implementations. - As a simple example, consider how multiple
inheritance mixes two or more chasses into one. The result is a class that 3 combines the properties of its parent chasses.

- **tutorial point**

- These design patterns concern class and object composition.
- Concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionalities.

- Adapter

- Bridge

- Decorator

- Facade

- Proxy

---

## **Behavioral Design Patterns**

> refactoring.guru: Behavioral design patterns are concerned with `algorithms` and the `assignment` of responsibilities between objects.

- **Wikipedia**

- behavioral design patterns are design patterns that identify `common communication patterns among objects`.

- **tutorial point**

- These design patterns are specifically concerned `with communication between objects`.

- Chain Of Responsibility
- Observer
- Command
- Strategy
- State
- Iterator

---

## **Other Patterns Not Exist In GOF**

- Dependency Injection

- Service Locator