Singleton Pattern (Gang of Four Design Patterns Series)

Поделиться
HTML-код
  • Опубликовано: 30 июн 2024
  • #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 ► bit.ly/productive-dev-fb​
    My Twitter ► bit.ly/wesd-twitter​
    My LinkedIn ► 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:
    github.com/wesdoyle/design-pa...
  • НаукаНаука

Комментарии • 8

  • @WesDoyle
    @WesDoyle  3 года назад +6

    The infamous singleton pattern. Is it a pattern or an anti-pattern? Check out link to repo in the description! What pattern you want to see next?

    • @qwerty1150
      @qwerty1150 3 года назад +2

      abstract factory

    • @WesDoyle
      @WesDoyle  3 года назад +1

      @@qwerty1150 Coming up next! Thanks for the suggestion.

    • @deepakreja7944
      @deepakreja7944 3 года назад +1

      Strategy design pattern

  • @kirbykidsmith
    @kirbykidsmith 3 года назад +1

    awesome video series, thanks

  • @sumeetbhanjadeo5994
    @sumeetbhanjadeo5994 3 года назад

    Another great video. I just had one doubt. How do we ensure that while disconnecting only that particular client is getting disconnected. There is no client ID sent while disconnecting.

  • @tuvaerba
    @tuvaerba 2 года назад

    Can you share which theme and font you are using in this video. And great explanation thank you for sharing those videos.

  • @WillEhrendreich
    @WillEhrendreich 3 года назад +1

    Why would it be a problem if it's used for like.. DI or logging? Does end up being an issue?