Master Strategy Design Pattern Like a PRO in No Time

Published: 01 February 2022
on channel: codevev
1,655
37

Strategy Pattern may seem a bit like the State pattern but the difference is in the intent. With the State pattern, we wanted to represent the object in different states without necessarily changing the object itself. With the Strategy Design Pattern, we are after changing the object's behavior.

So as you may have guessed, what we're trying to accomplish is to have certain functions execute a different path, depending on our needs.

The concept remains very similar to what it was in the state pattern. But instead of the implementations of the State interface, we're passing in the implementations of the behavioral, or Strategy interfaces.

You don't need to watch a 45-minute video to grasp and implement this concept. Just watch these two minutes and become more familiar with how you can implement the strategy pattern in Python.

#Python #DesignPatterns #StrategyPattern

-------------------------------------------------------------------------------------
📰 Sign up for my newsletter
Become a better dev in just 5 minutes (or so) a week: https://codevev.com

☕*Buy me a coffee*
You can express your support by buying me a coffee at https://buymeacoffee.com/codevev

🖥️ Free Courses to Learn Programming
Harvard CS 50: https://pll.harvard.edu/course/cs50-i...
FreeCodeCamp: https://www.freecodecamp.org
Udacity: https://www.udacity.com

🛒 Products I recommend
https://codevev.com/#products

Connect with me
Website: https://evgenyurubkov.com
Youtube:    / @codevev  

#codevev


On this page of the site you can watch the video online Master Strategy Design Pattern Like a PRO in No Time with a duration of hours minute second in good quality, which was uploaded by the user codevev 01 February 2022, share the link with friends and acquaintances, this video has already been watched 1,655 times on youtube and it was liked by 37 viewers. Enjoy your viewing!