Chain Of Responsibility 🔐(Middleware Design Pattern)

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 22

  • @Ibrahim-fh6kv
    @Ibrahim-fh6kv 3 года назад +3

    This was one of the best PHP design pattern videos on youtube. I am looking forward to your next upcoming videos on design pattern.😃

  • @moisessalas
    @moisessalas 4 месяца назад

    I just realized this video is 4 years old. Wow!
    It's still really useful. Thank you!

  • @FoxHousGR
    @FoxHousGR 3 года назад

    Great video's, thanks to you I've finally understood my own bad coding patterns and helped me remove a few that I learned over the past few years

  • @samualobryan652
    @samualobryan652 4 года назад +1

    Thanks, really enjoy the design principle tutorials in Php :)

    • @CleanCodeStudio
      @CleanCodeStudio  4 года назад

      Good to hear, I really enjoy making design principle lessons in Php :)

  • @med3060
    @med3060 3 года назад +1

    thanks for your great content , awesome explanation : D

    • @CleanCodeStudio
      @CleanCodeStudio  3 года назад +1

      Glad it clicked for ya ~ Chain of responsibility is a golden design pattern

  • @renedekkers735
    @renedekkers735 4 года назад +1

    Great video, but I’ve seen people do the same as you demonstrate, but they call it ‘decorator pattern’. How does chain of responsibility differ from the decorator pattern?

    • @CleanCodeStudio
      @CleanCodeStudio  4 года назад +1

      The chain-of-responsibility pattern is structurally nearly identical to the decorator pattern, the difference being that for the decorator, all classes handle the request, while for the chain of responsibility, exactly one of the classes in the chain handles the request.

  • @milanmilutinovic9922
    @milanmilutinovic9922 4 года назад +1

    Love this content homie keep it up !

  • @mamdouhzaq
    @mamdouhzaq 4 года назад +2

    Thanks, love Laravel because it handles this behind the scene for us :D

    • @CleanCodeStudio
      @CleanCodeStudio  4 года назад +1

      Same here Mamdough, same here :)
      It's pretty incredible how many design patterns Taylor and the Laravel team use behind the scenes.
      I can't tell you how many times I've been confused while learning up on a design pattern, then finally got it after seeing it implemented properly within Laravel.

    • @mamdouhzaq
      @mamdouhzaq 4 года назад +3

      @@CleanCodeStudio Those guys are amazing just like u :)

  • @limuelmendoza5356
    @limuelmendoza5356 4 года назад +1

    Can I implement this to have a chain of process and have some checks to return instead of doing a next() ?

    • @CleanCodeStudio
      @CleanCodeStudio  3 года назад

      I'd recommend using a different pattern than the Chain of Responsibility for something like that.
      You could simply have an array of functions, and map through them if you want distinct values returned.
      Otherwise, if you want a single build up object that gets handed off from one function to the next you can use reduce.

  • @Semicolon..
    @Semicolon.. 4 года назад +1

    very useful

  • @midewestmond9442
    @midewestmond9442 Месяц назад

    Coming from X