Singleton Pattern EXPLAINED IN 10 MINS | Javascript Design Patterns for beginners
HTML-код
- Опубликовано: 1 июн 2024
- 💖 Check out my web development courses
developedbyed.com
-------------------------------------------------------------------------------------------------
If you have put off learning javascript design patterns, or object oriented programming patterns in general, I am starting a series where I break down popular design patterns into short 10 min videos.
-------------------------------------------------------------------------------------------------
👨💻Connect with me
Twitter: / developedbyed
Instagram: / developedbyed
Github: github.com/developedbyed/
-------------------------------------------------------------------------------------------------
📖Chapters
00:00 Intro
00:21 How Classes Work
04:15 Singleton Pattern
08:12 Refactoring from Classes
-------------------------------------------------------------------------------------------------
#programming #javascript - Наука
This is a great idea, more pattern videos would be nice
you can keep the instance variable as a static variable inside the class itself. which is much more clearer.
thanks xavier
You’re teaching is so straight to the point 👍🏾👍🏾
Really good video! I love those small knowledge pills a lot.
Wonderful thank you for your nice explanation ❤
Great video
Love from New Zealand
Thomas
cool video, one usecase for singleton is creating a database connections pool
Nice video as always, still eating my popcorn 😅❤
Can we use private static variable for implement the singleton?
What theme are you using? It looks gorgeous
frameworks are polluting our brains. Yes! Patterns is a good topic. Thanks.
More of this please and OOOH I have the same wallpaper!!
One thing i hated about patterns at universities was they jusy say here are the patterns but dont show you how they are used.
What are the advantages of this?
If I export an instance of the class it works the same I think, so maybe the advantage is that it's only instantiated on demand?
Am i missing something?
Maybe when coding for IE (if it does not supports modules) or when not using modules at all
You are better off not using classes and take advantage of Javascripts prototypal inheritance. Like Seraphic said, you can just do modules
does anyone know what theme he's using?
I don't get it; if you only need one instance, then why the construction?
can i ask for a desktop image?) thx in advance)
Hi dev i'm the first one
Are you thoooo???? Hahaha
can you update old tutorials How To Create a HTML Dropdown Menu | CSS Dropdown Tutorial like this with new css features or how create carousel with html css and js
Yes I will
@@developedbyed you are great man 🫂
Makes me think closures are just a mutation of singletons lol
very funny dude 😀
But doesn't this mean OOP sucks 😂
Every time I see someone pushing class-based OOP into JS, it makes me want to cry....
Everything you want to achieve in programming can be done by programming functionally, and it will be safer, easier to maintain and more fun to work with
Until you try programming something that is not a high school project