DEV Community

Cover image for Advanced JavaScript Design Patterns

Advanced JavaScript Design Patterns

DhiWise on November 24, 2021

Overview I have covered here 20+ design patterns explanations in javascript. We will be discussing all these design patterns using Ja...
Collapse
 
notiv profile image
Mike

Code in screenshots? Genius

Collapse
 
gangsthub profile image
Paul Melero

Advanced JS pro tip: don't use classes in JavaScript.

Collapse
 
sannajammeh profile image
Sanna Jammeh

NestJS has entered the chat

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

React Hooks changed the description for this group to "really, don't use classes in JavaScript" 😆

Collapse
 
prabhukadode profile image
Prabhu

Saving this as I will go through it in future.

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
prabhukadode profile image
Prabhu

ha reading this again

Collapse
 
pdrmdrs profile image
Pedro Paulo Paiva de Medeiros

That was an amazing article man!

It goes straight to the point on showing those patterns. Really helpful.

Saved to use as a cheatsheet someday, haha, :D

One friendly tip I would like to give you is about those code screenshots.
Next time, try using the code formatter that the editor give you. It helps the readability (also, in mobile devices, the screenshots don't show too much detail at the large ones).

Collapse
 
daw_alberto profile image
Alberto García

Hi Ravi 👋

A post very interesting! I enjoyed reading it, but I have a little doubt
In the second design patter(Abstract Factory) you create the class DrinkFactory with the method prepare, and this method is never used why do you created it then?

Many thanks =)

Collapse
 
ravisojitra profile image
ravi

Thanks Alberto for this observation.
But it's kind of an extension of functionality if you want to use. Though i have not used it in example, but it can give you an idea that how you can customize the behaviour with base methods which can be applied to all the factories that extends base class.

Collapse
 
rakeshsinghjamwal profile image
rakeshsinghjamwal

Bookmarked for a weekend read

Collapse
 
matheuslipk profile image
MATHEUS ARAUJO DE ALCANTARA

Excellent

Collapse
 
bazeng profile image
Samuel K.M

Wow, i have saved this for later. Thanks man

Collapse
 
passtionatecoder profile image
Aqib Khan

Great ever

Collapse
 
hasnat150822 profile image
Hasnat150822

Nice but detail code is not much provided. You have just put a part of code snippet not fully code provided. I think you should provide detail code examples. However it was nice.