Design Patterns: Singleton

preview_player
Показать описание
This is the fifth of an eight part series where Robert is joined by Phil Japikse to discuss design patterns. A design pattern is a best practice you can use in your code to solve a common problem. In this episode, Phil demonstrates the Singleton pattern. This pattern restricts the instantiation of a class to one instance and provides global access to that instance.

Resources:

Рекомендации по теме
Комментарии
Автор

Thanks for this high quality series guys :) Imho however this video needs more warnings. There are many who argue that *Singleton simply is bad practice*. Myself included. There's too much potential downside and not enough upside. For anyone interested I would recommend the Clean Code Talks by Miško Hevery or my video on Singleton. Clearly, people have different opinions, but I oppose usage of the static keyword altogether since it removes the object orientation from object oriented programming. Hence the Singleton pattern must also be opposed.

ChristopherOkhravi
Автор

Thanks for creating this awesome series!

You should add part number in the title of the video. So it will be easier for us to find the first part of the series. If there's a playlist of this series, that'll be even more helpful!

boom_shankar
Автор

Surprising to see that these guys are still presenting together ...

sanjayy
Автор


Patterns and Architecture on Visual Studio Toolbox (2017)
SOLID Design Patterns
Command/Memento Patterns
Strategy Pattern
Template Method Pattern
Observer/Publish-Subscribe Patterns
Singleton Pattern
Factory Patterns
Adapter/Facade Pattern
Decorator Pattern

Hasi
Автор

Really great series you got there! Keep it up! :D

yonagamburg
Автор

Good one, keep up the good work! Greets from Italy! :)

theitalian
Автор

What happens if we try to instantiate from Reflection?? We can also set the private values to be null.

karthiksrivatsa
Автор

be nice if they would of showed how to inject this

InfinityDsbm