developerasun / myCodeBox-web

Open source code box for web developers.
Apache License 2.0
5 stars 0 forks source link

[RESEARCH] Web/design pattern: singleton #248

Open developerasun opened 2 years ago

developerasun commented 2 years ago

topic : understanding singletone in software engineering

read this

In software engineering, the singleton pattern is a software design pattern that restricts the instantiation of a class to one "single" instance. This is useful when exactly one object is needed to coordinate actions across the system.

The term comes from the mathematical concept of a singleton.

The singleton design pattern is one of the twenty-three well-known "Gang of Four" design patterns that describe how to solve recurring design problems to design flexible and reusable object-oriented software with the aim of making it easier to implement, change, test, and reuse objects

reference

developerasun commented 2 years ago

concolusion: singletone in one line: creating instance only one across project