Observer Pattern Tutorial

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024
  • In this exciting tutorial we are going to learn about the observer pattern. Not your typical observer pattern tutorial. We toss the wikipedia article aside and apply the observer pattern to a game.
    The game is simple, click the buttons at the top of the screen and the characters will perform the action. We coordinate the actions through the observer pattern.
    At its core the pattern revolves around a subject that the observer will observe. The subject has a list of observers(one-to-many relationship). Observers can choose to register with the subject. The subject at any point in time can notify the observers by looping through all observers and calling the update method.
    For example let's say the our subject is the RUclips channel Coding With Adam. The observers would be RUclips users. RUclips users can register with the subject by subscribing. When the RUclips channel owner(subject) uploads a new video they can notify all subscribers(observers).
    Learn more by watching the video.
    Github:
    github.com/Cod...
    Try it here:
    codingwith-ada...

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

  • @oguzsahin5242
    @oguzsahin5242 5 дней назад +1

    One of the smoothest video ever watch for Observer Pattern. Code was clean, speaking tone relaxing. Cant say anything

    • @CodingWithAdam
      @CodingWithAdam  3 дня назад

      Thank you for the wonderful feedback! I’m really glad you enjoyed the tutorial. 😁

  • @randysewell3199
    @randysewell3199 8 месяцев назад +5

    That was the smoothest plug for subscribers I have seen!

    • @CodingWithAdam
      @CodingWithAdam  8 месяцев назад +1

      Thank you!!! 😁

    • @Georgesimangolwe
      @Georgesimangolwe Месяц назад +1

      Just wow, he deserve a sub... :)

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

      Thank you!!! I’m really glad you enjoyed the observer pattern tutorial! It was a fun video to make.

  • @yulianloaiza
    @yulianloaiza 23 дня назад +1

    What a great video, thanks so much! And your style of teaching and narrating is very good as well :)

    • @CodingWithAdam
      @CodingWithAdam  22 дня назад +1

      You’re welcome!
      Thank you for the wonderful feedback!!!
      I’m really glad you enjoyed the video. 😀

  • @emmanueljr
    @emmanueljr Год назад +4

    your teaching style is really good and easy to understand,thank you for the video

    • @CodingWithAdam
      @CodingWithAdam  Год назад +2

      Thank you! I really appreciate the feedback 😁

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

    Great adam
    will you apply other design pattern to the game ?
    find it more easy to understand like that

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

      Thanks Sonia, I like the suggestion of continuing to apply design patterns to games. At the very least I'll try to make it interesting to learn :)

    • @hannahleah5875
      @hannahleah5875 2 месяца назад

      @@CodingWithAdam Please do! Thanks for this!

  • @parmiskhaleghiyeh941
    @parmiskhaleghiyeh941 Месяц назад +1

    ur a g fr

  • @kalahari8295
    @kalahari8295 2 года назад +2

    Polymorphism 😀

  • @zaidradaideh8520
    @zaidradaideh8520 2 месяца назад

    where are u from ادم