Javascript Design Patterns #3 - Strategy Pattern

preview_player
Показать описание
What is the Strategy design pattern?
The Strategy pattern is a behavioral design pattern that enables you to define a group (or family) of closely-related algorithms (known as strategies). The strategy pattern allows you to swap strategies in and out for each other as needed at runtime.

📚Materials/References:

🌎 Find Me Here:

Рекомендации по теме
Комментарии
Автор

Taught so many concepts in one video without even trying. You are a genius.

mervinmarias
Автор

Man, these are some of the best JS pattern tutorials on YT. Very clear and concise. Are you going to be doing any other patterns?

earlworth
Автор

Nice tutorial, that Design Patterns series is what I needed. Thanks sir for the awesome content!!

viniciusmateus
Автор

I had already researched a lot and could not understand so clearly. With your amazing didactics, it was very clear!

klaylton
Автор

Oh my goodness.. This is very clear explanation!! Thank you

audioplatform
Автор

oh man, this playlist is a gem💎Thank you for these videos 💌

kiranv
Автор

Every good trader need to know this method. It helps a lot, so don't miss it

xgpdmdf
Автор

I couldn't find better explanation than this, thank you

traveltechtaste
Автор

I like your videos on design patterns, very well explained!
And your code style is very interesting

vmsurjf
Автор

Hi there, really happy to find this channel you're at explaining things. You've earned a subscriber.

urban
Автор

Well, actually I don't understand why we should use Strategy pattern . It seems like we have more code lines than just calling function, for example, fedex.calculate(package) ?

jadelovecooking
Автор

Pretty easy as you explain this concepts.. ty

g.albeiroc.
Автор

man, this video is fantastic, it helped me a lot. Your explanation is clear and easy to understand and follow... well done!

carmenbravo
Автор

This does not look like strategy pattern, because if there is a need to add a new behavior in calculating shipping cost, then you need to change all the Fedex, UPS, and UPSC. Strategy pattern the algorithm should be independent and therefore the class/function in this case should inject those algorithm.

anilrajan
Автор

I love your videos, i just wish you would have done this using the new class syntax.

EdwardElric-ufrr
Автор

Amazing, Your videos are insightful, please upload more videos 👍👍

rajd
Автор

My "Strategy" to learn Design Patterns is to watch this playlist :)

neuodev
Автор

This tutorial is very useful. Thank you😊

johny
Автор

Wouldn't it be easier to have a method to register all or add additional strategies to the Shipping class and then in calculate you say which strategy you're using? This way you could hypothetically only call setStrategy a single time with all of the strategies. Calculate would have an extra parameter, but this seems like it would be easier to use, to me. This would also be easier to use for handling getting all of the supported strategies from a database and saving them to the state of Shipping or adding new supported strategies. Anyway, just my 2 cents.

naythaniel
Автор

nicely done thank you
i love this basic explaination thank you

jimi