5 Design Patterns That Are ACTUALLY Used By Developers
203,777
Published 2023-09-08
☕️ I don’t accept paid sponsorships and I have turned off mid-video ads. You’re welcome! If you would like to support my channel see: ko-fi.com/alexhyett
📨 Join my free weekly newsletter for advice, technology and more: newsletter.alexhyett.com/
🗺️ Backend Developer Roadmap: www.alexhyett.com/backend-developer-roadmap/
📝 Transcript: www.alexhyett.com/design-patterns/
🎓 RECOMMENDED COURSES (Use code FRIENDS10 for 10% off)
The Complete Web Developer Course - academy.zerotomastery.io/a/aff_r1613hhr/external?a…
The Complete Junior to Senior Web Developer Roadmap - academy.zerotomastery.io/a/aff_hpwn5xy9/external?a…
C#/.NET Bootcamp: The Fundamentals: academy.zerotomastery.io/a/aff_1478fv7q/external?a…
Complete SQL + Databases Bootcamp - academy.zerotomastery.io/a/aff_fd1vc7n6/external?a…
📚 RECOMMENDED BOOKS
Clean Code - geni.us/5AEwj2
Design Patterns - geni.us/5ncUt
Developer Hegemony - geni.us/lAXy
Pragmatic Programmer - geni.us/GfNj9
Data Structures and Algorithms Made Easy - geni.us/sqg6kJ
Refactoring - geni.us/ufAP0mE
Pragmatic Thinking and Learning - geni.us/x81A
⏳ TIMESTAMPS
00:00 - Introduction
00:37 - What is a Design Pattern?
02:01 - What are the Design Patterns?
03:27 - Strategy Pattern
04:38 - Decorator Pattern
05:27 - Observer Pattern
06:18 - Singleton Pattern
07:47 - Facade Pattern
🧑🏻💻 You can check out more of my favourite tools on my website: www.alexhyett.com/tech/
🔗 MY KEY LINKS
🌍 Blog - www.alexhyett.com/
🐘 Mastodon - social.alexhyett.com/@alex
🧑💻 WHO AM I
I’m Alex, a Software Developer and YouTube working in the UK. I make videos about software development to help developers with the skills they need to be senior developers. As well as this YouTube Channel, I also write articles on my website (alexhyett.com/) as well as write a regular newsletter that contains some thoughts to help aspiring developers.
‼️ DISCLAIMERS
Some of the links in this description are affiliate links, for which I get a small commission, at no extra cost to you 🙂. I appreciate you supporting my channel so I can continue providing you with free software development content!
#coding #programming #developer
All Comments (21)
-
Thank you for taking the time to make this video. Much appreciated.
-
Just stumbled upon this channel and as a new dev, I'm loving the bite-sized videos that each explain a useful concept / topic!
-
But you need to know 100 design patterns at interview for a junior position
-
I agree with you completely about these commonly used patterns. They really are so useful in 'real programming life'. I also agree that it is well worth appreciating the other patterns as they really are useful in specific circumstances. Thanks for this. Appreciated.
-
Design patterns intertwine throughout my code, mostly without me thinking about it. Dependency Injection is used everywhere and Factory structure is pretty generic, so starting points all have similar structure. I look at the core of each pattern and how they relate to each other. I see Builder in both Strategy and Observer. I see Strategy in Observer, with the relationship changed to one to many (iteration) and any number of "strategies" being active at a time. The Decorator vs Strategy choice is properties vs behavior. And so on.
-
Thank you for making this. I'm very hands on and have definitely used these before without even realising what they were called.
-
I used the facade design pattern once to simplify this widget I created. When I generated the Javadoc, I blew my lead's mind as to how simple it was to use. I did not need to create any documentation because there were only a handful of exposed methods and the names of these methods were very explicit.
-
I agree the bite-sized concept are well explained. I subscribed I hope to see more.
-
Amazing way explaining these patterns.
-
One very important aspect of the design patterns is that they depend on the language and its capabilities. This means that in higher-level languages you can implement some of the patterns as algorithms. In this sense, design patterns can be thought of as a relatively good way to go around limitations of your language. As an example, let's take the singleton pattern. It was introduced in book, because there's no way to make it as a library code in C++[1]. But for example in Java[2] you can use a dependency injection library and you can just annotate your class with @Singleton. The library will take care of the rest. Another example where the pattern all but disappears is the strategy pattern. Languages that support higher-order functions can just use them instead of the pattern. ---- [1] Or at least you couldn't at the time. I haven't been following recent C++ development. [2] I don't know enough C# to show similar example, sorry.
-
Fantastic video -- thank you! I plan to check out your other videos, perhaps find more design pattern goodness. Subscribing either way.
-
in singleton pattern example using Lazy
is wrong, value field can be initialized in race conditions. for this scenario can be used static function LazyInitializer.EnsureInitialized(T, Func ) -
Thank you ! amazing video
-
Well explained. Thank you
-
the back to the future time machine configurations are so cool
-
Builder and Template Method are two other patterns I use occasionally.
-
Great explanation. Thank you
-
Great Explanation. Thanks.
-
very nice ! thanks for sharing
-
I really like your metaphor at the beginning!