Singleton Design Pattern for Beginners with easy examples |

With immense pleasure, I am happy to share the first episode of my "Design Patterns for Beginners" series. In this video, I explain the "Singleton Design Pattern" in great detail. I cover 5 unique ways to implement the Singleton pattern, and I explain which approach to use in different cases. I also provide detailed code logic to help you understand the concepts better. At each step, I talk about the "why" behind the pattern, which is something that most other content creators skip.
I am confident that after watching this video, you will have a deep understanding of the Singleton design pattern. This knowledge will be valuable to you, whether you are a beginner or an experienced engineer. It will help you to design better software, and it will also help you to accelerate your career.
-----------------------------------------------------------------
You will find the answers to below questions in the video
-----------------------------------------------------------------
✒ What is the Singleton design pattern?
✒ Why is the Singleton design pattern useful?
✒ What are the different ways to implement the Singleton pattern?
✒ When should you use each implementation?
✒ What are the pros and cons of each implementation?
✒ What are some common mistakes to avoid when implementing the Singleton pattern?.
-----------------------------------------------------------------
Chapters
------------------------------------------------------------------
0:00 Hello from SDE V
1:18 Definition of Singleton Design pattern
2:39 5 ways Implementation to Singleton
2:54 Eager Implementation
5:20 Static Block Implementation
6:40 Lazy Implementation
8:20 Thread Safe Implementation
9:53 BillPugh Implementation
11:30 Next video Factory Design Pattern
-----------------------------------------------------------------
Don't click
------------------------------------------------------------------
/ @codewithsunchitdudeja
-----------------------------------------------------------------
Recommendations
------------------------------------------------------------------
Our full courses on youtube:
✒ SOLIDs System Design Primer Course: • Design Patterns for Be...
✒ Design Patterns for Beginners: • Design Patterns for Be...
------------------------------------------------------------------
Github Code link
------------------------------------------------------------------
github.com/Sunchit/Coding-Dec...
------------------------------------------------------------------
About Us
------------------------------------------------------------------
Coding Decoded
✒ LinkedIn -bit.ly/3CVR3AJ
✒Telegram Link for Chrome: telegram.me/codingdecoded
✒ Telegram Link for phone : t.me/codingdecoded
Created and Instructed by:
------------------------------------------------------------------
Sunchit Dudeja - SDE-V @Adobe
✒ LinkedIn - bit.ly/3Qnk0L0
✒ Twitter - / decodedcoding
✒ Instagram -bit.ly/31TV5ur
For business:
✒Email: codingdecoded2020@gmail.com
Tags :
system design freshers,
design patterns for freshers,
java design patterns,
oops concecpts
system design for freshers,
is system design important for freshers,
system design interview questions for freshers,
software design and architecture,
system design resources,
system design resources github,
system design resources leetcode,
best system design resources,
low level design,
low level design tutorial,
low level design for beginners,
low level design pseudocode,
low level design interview preparation,
low level design interview questions,
low level design interview,
low level design mock interview,
low level design java,
low level design python,
low level design questions,
low level design amazon,
low level design amazon interview questions,
low level design architecture,
low level design approach,
low level design an interview perspective,
how to approach low level design,
low level design basics,
low level design best practices,
low level design best book,
low level design best resources,
low level design best course,
best low level design course,
best books for low level design,
difference between high level design and low level design,
g balasubramanian low level design
#systemdesign #lowleveldesign

Пікірлер: 35

  • @anupamahalder4792
    @anupamahalder479216 күн бұрын

    I love the way that you simplifies each topic by giving us some inner confidence to learn actual system design independently.

  • @soumyamishra6210
    @soumyamishra6210 Жыл бұрын

    maaza aagaya

  • @arnabmishra9638
    @arnabmishra9638 Жыл бұрын

    Very nice explanation, I have seen a lot of videos on singleton but never got to know it such depth.

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Glad it was helpful!

  • @krateskim4169
    @krateskim4169 Жыл бұрын

    Awesome explanation

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Glad you liked it

  • @sonalkumar223
    @sonalkumar2238 ай бұрын

    Really Enjoyed ❤ One more way if we are using java could be using an enum which guarantees that only one instance of the enum exists in the system at any given time Similar like following example public enum Logger { INSTANCE; public void log(String message) { System.out.println(message); } } public class LoggerExample { public static void main(String[] args) { Logger logger = Logger.INSTANCE; logger.log("This is a log message."); } }

  • @abhishekkumarroy2815
    @abhishekkumarroy2815 Жыл бұрын

    very nice explanation, its a great content😍😍

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks a lot 😊 Please share it in your community

  • @abhishekkumarroy2815

    @abhishekkumarroy2815

    Жыл бұрын

    Sure

  • @Adobe-xq6uo
    @Adobe-xq6uo Жыл бұрын

    Thank You bhaiya!!

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks :)

  • @varunpalsingh3822
    @varunpalsingh3822 Жыл бұрын

    Sir is amazing 😍

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks a lot 😊

  • @SaurabhSingh-ch6nc
    @SaurabhSingh-ch6nc9 ай бұрын

    OP Sir😍

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    9 ай бұрын

    Thanks Saurabh

  • @rohanwakode9568
    @rohanwakode9568 Жыл бұрын

    Thankyou sir its a great content

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    thanks Rohan

  • @rameshsmcs074
    @rameshsmcs074 Жыл бұрын

    Thanks a lot perfect explanation sir. Cant wait to for the next pattern.

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    So nice of you, please promote it in your group

  • @harishgontu9285
    @harishgontu9285 Жыл бұрын

    clear and concise . Rockstar

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks Harish

  • @divyankmadan9491
    @divyankmadan9491 Жыл бұрын

    too good sir, loved it. The way you explain nobody can.

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Thanks a ton

  • @Harjotse
    @Harjotse Жыл бұрын

    Sir pls a very small request pls daily do leetcode questions it was the time that when I became consistent because of your videos

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    As soon as possible, point noted.

  • @Harjotse

    @Harjotse

    Жыл бұрын

    @@CodeWithSunchitDudeja Thank you sir

  • @voidpointer398
    @voidpointer398 Жыл бұрын

    I have read an article on singleton and GoF singleton pattern in which it was told that implementing a singleton class using GoF design pattern way violates architectural guidelines as we can make a network call from presentation layer only, which is not very good. Can you talk about this please

  • @tanishqmahendrasaini3764
    @tanishqmahendrasaini376411 ай бұрын

    Didn't understand the BillPugh design pattern completely how it overcome the scenario where multiple threads call at the same time

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    11 ай бұрын

    Can you tell me which part you got confused, Static inner class?

  • @tanishqmahendrasaini3764

    @tanishqmahendrasaini3764

    11 ай бұрын

    @@CodeWithSunchitDudeja Yes like how static inner class solves overcomes the scenario where multiple threads are trying to get the instance and each thread end up getting a new instance rather than each should have got the a single instance. Also I was thinking that static method could be a option similar to static inner class, I tried to find difference between these two static inner class and static method but didn't find anything relevant to the singleton example, one thing I assumed is that the reason for choosing static inner class is could be that its thread safe otherwise static method would be easily implemented and understandable. Please let me know if I made the wrong assumption.

  • @oyeSAURABH
    @oyeSAURABH Жыл бұрын

    I dont know JAVA, should I learn JAVA first before starting with this series ?

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    No, not mandatory, Basic of Java are very similar to C++. I have made it such a way that everyone will understand. However, there could be cases where things are java specific, I will highlight them from next time.

  • @pradeepravi9608
    @pradeepravi9608 Жыл бұрын

    Sir please teach in English 🙏

  • @CodeWithSunchitDudeja

    @CodeWithSunchitDudeja

    Жыл бұрын

    Ok next time