Singleton Pattern (Gang of Four Design Patterns Series)

Published: 02 February 2021
on channel: Wes Doyle
3,752
106

#designpatterns​ #dotnet​ #gangoffour


The Singleton Pattern is one of the Creational Patterns catalogued in the famous Gang of Four Design Patterns: Elements of Reusable Object-Oriented Software book by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides.

The Singleton Pattern has the unique distinction among design patterns of potentially being an anti-pattern. Due to the fact that a Singleton may provide global mutable state, control its own creation, access, and business logic, and be accessed statically to provide global access across all contexts, it can lead to tightly-coupled code that binds software to specific implementations and I/O. It is for such reasons that it is often difficult to write unit tests for clients of a Singleton.

In this series, we’ll be going through each of the patterns covered in the “Gang of Four” Design Patterns - Elements of Reusable Object-Oriented Software. Each video will use a real-world example, taking inspiration from food-based businesses. I’m including typical integrations in the form of mock databases, AMQP queues, email services, and loggers, as well as several features from C# 9.0. All of the code for this series is open source and available at the GitHub link below.


Check out my flagship Udemy course - 12-hour full-stack app build with automation tests, Vue.js, .NET Core, and SQL (Use Promo Code STACK21)


▬▬▬▬▬▬ 🎒 Udemy Course 🎒 ▬▬▬▬▬▬
Learn Full Stack Development with .NET and Vue.js in 2021!


►►► bit.ly/wesd-udemy

▬▬▬▬▬▬ 👋 Get in Touch! 👋 ▬▬▬▬▬▬
Facebook Group ► https://bit.ly/productive-dev-fb​
My Twitter ► https://bit.ly/wesd-twitter​
My LinkedIn ► https://bit.ly/wesd-linkedin​

▬▬▬▬▬▬ 🕘 T I M E S T A M P S 🕘 ▬▬▬▬▬▬

0:00​ - Introduction to the Builder Pattern
1:23 - Motivation / Definition
7:15​ - Real-World Code

▬▬▬▬▬▬ 📚 TOPICS OVERVIEW 📚 ▬▬▬▬▬▬


☁️ Design Patterns ☁️
► Singleton Pattern
► Singleton Anti Pattern
► Object Oriented Design
► Gang of Four
► Making Code Easy to Change
► OOP
► C#
► .NET 5.0

▬▬▬▬▬▬ 🔗 LINKS ▬▬▬▬▬▬
► GitHub repo for this project:
https://github.com/wesdoyle/design-pa...


Watch video Singleton Pattern (Gang of Four Design Patterns Series) online without registration, duration hours minute second in high quality. This video was added by user Wes Doyle 02 February 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,752 once and liked it 106 people.