Singleton Pattern EXPLAINED IN 10 MINS | Javascript Design Patterns for beginners

  Рет қаралды 17,282

developedbyed

developedbyed

Күн бұрын

💖 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

Пікірлер: 33
@diegocevallos5504
@diegocevallos5504 9 ай бұрын
This is a great idea, more pattern videos would be nice
@sandrinjoy
@sandrinjoy 9 ай бұрын
you can keep the instance variable as a static variable inside the class itself. which is much more clearer.
@ELMlKO
@ELMlKO 9 ай бұрын
thanks xavier
@kezevraanwar2
@kezevraanwar2 9 ай бұрын
You’re teaching is so straight to the point 👍🏾👍🏾
@pcost
@pcost 9 ай бұрын
Really good video! I love those small knowledge pills a lot.
@mostafakheder7721
@mostafakheder7721 9 ай бұрын
Wonderful thank you for your nice explanation ❤
@antonpetrov145
@antonpetrov145 9 ай бұрын
cool video, one usecase for singleton is creating a database connections pool
@tdbnz123
@tdbnz123 9 ай бұрын
Great video Love from New Zealand Thomas
@adolfomartin5456
@adolfomartin5456 9 ай бұрын
Can we use private static variable for implement the singleton?
@tasmto
@tasmto 9 ай бұрын
More of this please and OOOH I have the same wallpaper!!
@alivaliev5152
@alivaliev5152 8 ай бұрын
What theme are you using? It looks gorgeous
@eleah2665
@eleah2665 9 ай бұрын
frameworks are polluting our brains. Yes! Patterns is a good topic. Thanks.
@freemancharles2491
@freemancharles2491 9 ай бұрын
Nice video as always, still eating my popcorn 😅❤
@BeepBoop2221
@BeepBoop2221 9 ай бұрын
One thing i hated about patterns at universities was they jusy say here are the patterns but dont show you how they are used.
@Xomps
@Xomps 9 ай бұрын
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?
@SeraphicRav
@SeraphicRav 9 ай бұрын
Maybe when coding for IE (if it does not supports modules) or when not using modules at all
@developedbyed
@developedbyed 9 ай бұрын
You are better off not using classes and take advantage of Javascripts prototypal inheritance. Like Seraphic said, you can just do modules
@icetmzz9074
@icetmzz9074 9 ай бұрын
does anyone know what theme he's using?
@anasouardini
@anasouardini 9 ай бұрын
I don't get it; if you only need one instance, then why the construction?
@Yardan_gholi
@Yardan_gholi 9 ай бұрын
i have a question please , iam learning to become a front-end developer iam almost about to finish j.s and i want start react after it , but it make me so hopeless when i see after learning one thing something new comes up to learn clear road map like leraning html /css and j.s and react and typescript is ok and understandable but ... now i see there are too many other things like the pattern design and also microservices and Agile and scrum and MVVM and all these new things that i have no idea about them even what are those. ,give me an advice please iam relay confused and lost my hopes.🙁😟🙁
@peristiloperis7789
@peristiloperis7789 9 ай бұрын
Seems like you're wanting the roadmap without knowing where you're headed. First, figure out where you want to go. Then, choose the shortest route. Learning all these things won't take you anywhere.
@juanmacias5922
@juanmacias5922 9 ай бұрын
@@peristiloperis7789 all the things he mentioned are front end lol
@jimhawkins2483
@jimhawkins2483 7 ай бұрын
can i ask for a desktop image?) thx in advance)
@janjgaval
@janjgaval 9 ай бұрын
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
@developedbyed
@developedbyed 9 ай бұрын
Yes I will
@janjgaval
@janjgaval 9 ай бұрын
@@developedbyed you are great man 🫂
@juanmacias5922
@juanmacias5922 9 ай бұрын
Makes me think closures are just a mutation of singletons lol
@cooltv9943
@cooltv9943 9 ай бұрын
Hi dev i'm the first one
@developedbyed
@developedbyed 9 ай бұрын
Are you thoooo???? Hahaha
@ThopX14
@ThopX14 9 ай бұрын
very funny dude 😀
@coder_one
@coder_one 9 ай бұрын
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
@sonilpro8526
@sonilpro8526 9 ай бұрын
Until you try programming something that is not a high school project
@j.r.r.tolkien8724
@j.r.r.tolkien8724 9 ай бұрын
But doesn't this mean OOP sucks 😂
Facade Pattern - Design Patterns
8:50
Web Dev Simplified
Рет қаралды 100 М.
Singleton Pattern - Design Patterns
8:28
Web Dev Simplified
Рет қаралды 149 М.
Como ela fez isso? 😲
00:12
Los Wagners
Рет қаралды 23 МЛН
ОДИН ДОМА #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН
Animate between states with the View Transitions API
3:47
10 Rendering Patterns for Web Apps
6:55
Beyond Fireship
Рет қаралды 320 М.
JavaScript Closures Tutorial (Explained in depth)
19:03
ColorCode
Рет қаралды 61 М.
10 Design Patterns Explained in 10 Minutes
11:04
Fireship
Рет қаралды 2,1 МЛН
Builder Pattern - Design Patterns
10:49
Web Dev Simplified
Рет қаралды 133 М.
This One Line Of Code Catches React Bugs For You
15:55
Web Dev Simplified
Рет қаралды 57 М.
8 Design Patterns EVERY Developer Should Know
9:47
NeetCode
Рет қаралды 989 М.
Xiaomi Note 13 Pro по безумной цене в России
0:43
Простые Технологии
Рет қаралды 1,8 МЛН
Я Создал Новый Айфон!
0:59
FLV
Рет қаралды 4,5 МЛН
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 1,9 МЛН
Apple, как вас уделал Тюменский бренд CaseGuru? Конец удивил #caseguru #кейсгуру #наушники
0:54
CaseGuru / Наушники / Пылесосы / Смарт-часы /
Рет қаралды 4,3 МЛН