Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oussama-zbair/cross-language-pattern
Implementation of singleton, factory, design patterns in different languages.
https://github.com/oussama-zbair/cross-language-pattern
design-patterns
Last synced: about 1 month ago
JSON representation
Implementation of singleton, factory, design patterns in different languages.
- Host: GitHub
- URL: https://github.com/oussama-zbair/cross-language-pattern
- Owner: oussama-zbair
- Created: 2023-01-07T19:49:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-08T11:10:20.000Z (almost 2 years ago)
- Last Synced: 2023-10-15T20:25:18.516Z (about 1 year ago)
- Topics: design-patterns
- Language: Java
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
In this repository, you will find examples of how to implement the singleton, factory, design patterns in five different programming languages: Java, C++, Python, Go, and Ruby. These design patterns are commonly used to ensure that a class has only one instance, provide a global point of access to that instance, and allow objects to publish changes to their state and for other objects to subscribe to be notified of these changes. We have implemented these patterns using the technique of "lazy initialization", which creates the instance only when it is needed, rather than at the time the class is defined. This can be useful if the instance is expensive to create, or if it is not used in every part of the application.