Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

strategy design pattern pros and cons

Anjali Sharma answered on January 4, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • strategy design pattern
  • What is strategy pattern ?
  • strategy pattern definitiom
  • strategy design pattern
  • saga pattern pros and cons
  • strategy pattern

  • strategy design pattern pros and cons

    0

    Pros:

    Prevents the conditional statements. (switch, if, else…)

    The algorithms are loosely coupled with the context entity. They can be changed/replaced without changing the context entity.

    Very easy extendable.

    Cons:

    Clients must know existence of different strategies and a client must understand how the Strategies differ

    It increases the number of objects in the application.

    https://refactoring.guru/design-patterns/strategy

    Popularity 3/10 Helpfulness 1/10 Language javascript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Jan 04 2023
    Anjali Sharma
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.