Design Patterns in Angular Source Code - Strategy Design Pattern

Sdílet
Vložit
  • čas přidán 5. 06. 2024
  • To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/DecodedFrontend/
    The first 200 of you will get 20% off Brilliant’s annual premium subscription.
    Today I continue a video series where I try to reveal classical GoF design patterns in Angular source code. In the previous video we learned how Design Pattern Bridge is used to Design the Angular forms library and today I am going to talk about the Strategy Design pattern and how it was used to design the ASYNC pipe in Angular. Enjoy the video and I hope you will learn something new today.
    🕒 Time Codes:
    00:00:00 - Intro;
    00:01:03 - Which problems Strategy solves;
    00:02:08 - Ad integration;
    00:03:43 - Strategy pattern in Action;
    00:07:22 - How it is used in ASYNC pipe code;
    00:11:46 - Outro;
    💥 Become a PRO in Angular with my Courses💥
    🔗 courses.decodedfrontend.io
    💡 Short Frontend Snacks (Tips) every week here:
    Twitter - / decodedfrontend
    Instagram - / decodedfrontend
    LinkedIn - / dmezhenskyi
    This video was sponsored by Brilliant
  • Jak na to + styl

Komentáře • 77

  • @DecodedFrontend
    @DecodedFrontend  Před rokem +2

    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/DecodedFrontend/. The first 200 of you will get 20% off Brilliant’s annual premium subscription.

    • @bromptonhorsing8597
      @bromptonhorsing8597 Před rokem

      Hello, Dmytro! Would you be interested to make a video about contentChild/Children? Not how it works, but where are appropriate applications in terms of frontend abstractions? What business use case are they best for?
      Thanks!

  • @felipejacobs2296
    @felipejacobs2296 Před rokem +2

    great video and especially the cat that takes center stage at the beginning 😅

  • @kanishkanaik2784
    @kanishkanaik2784 Před rokem +3

    Need all the design pattern in angular

  • @magdalenalewicka7197
    @magdalenalewicka7197 Před 9 měsíci

    It's so easy to find videos on basic Angular concepts, but so difficult to find ones that go deeper. I love your videos, they help pretty experienced developer to get better and better. Thank you for sharing your knowledge.

  • @dale_nguyen
    @dale_nguyen Před rokem +3

    Great video. We need more screen time for the cat though 🤣

  • @zhdanvadim9536
    @zhdanvadim9536 Před rokem

    Thanks. Great explanation!

  • @oleksandrvorovchenko8674

    Thanks. Great explanation as usual!

  • @giorgikirvalidze394
    @giorgikirvalidze394 Před rokem +2

    hi, thx for informative videos, please upload more about design patterns.

  • @GLawSomnia
    @GLawSomnia Před rokem +2

    Simple, yet effective :D Love your videos

  • @carlosabud
    @carlosabud Před rokem

    these videos are freaking amazing, Dmytro! please keep it up!!

  • @praktycznewskazowki6733
    @praktycznewskazowki6733 Před rokem +1

    Very good series, Thanks! :)

  • @hubert.t4243
    @hubert.t4243 Před rokem

    Again, as usual well explained.Thank you.

  • @MohamedAbdulRaouf
    @MohamedAbdulRaouf Před rokem +1

    Brilliant as always, thank you 🙏🙏

  • @cdc_ua
    @cdc_ua Před rokem +1

    thanx for your great job!

  • @foobar846
    @foobar846 Před rokem

    Great vídeo! Thank you!

  • @yuliakhitrukhina
    @yuliakhitrukhina Před rokem +2

    Last two videos are sooo good! Please, continue this series about patterns with examples from the source code (if there are some :)))
    Btw, really enjoying the Forms course, thanks!

  • @emanuelzhupa
    @emanuelzhupa Před rokem

    Thanks, very great example, made me grasp the concept much easier.
    Can you please do more videos revealing angular internals, and how they work

  • @avijitghosh9472
    @avijitghosh9472 Před rokem

    Just awesome. Always learning new things in details from your videos.

  • @demidovmaxim1008
    @demidovmaxim1008 Před rokem

    Thanks for this video dear friend!)

  • @obadaka3918
    @obadaka3918 Před rokem +1

    Thanks a lot😃

  • @kiransaravade5127
    @kiransaravade5127 Před rokem

    great video

  • @leandroalvarez9075
    @leandroalvarez9075 Před rokem +1

    Hi! You are the best. Thanks for your videos. Could be some about unit testing? or testing in angular? Thanks you!

  • @evtihii
    @evtihii Před 6 měsíci

    Cool pretty useful

  • @denns0r
    @denns0r Před rokem +2

    Wow that simple example was very helpful!! Great explanation. 👏

  • @ytamb01
    @ytamb01 Před rokem +1

    I have switch statements in my code that determine behaviour and now I know how to manage this. Thanks very much.

    • @DecodedFrontend
      @DecodedFrontend  Před rokem

      Use it wisely. Not every switch/case has to be refactored like in the video. Sometimes it might bring unnecessary complexity to your code without real benefits

  • @THIAGO_6721
    @THIAGO_6721 Před 9 měsíci

    Amazing

  • @GankMe57
    @GankMe57 Před rokem +1

    Very good video as always ! ❤️

  • @gagiksimonyan3782
    @gagiksimonyan3782 Před rokem +1

    Thanks for another useful video, Dmytro)

  • @ievgensvichkar2643
    @ievgensvichkar2643 Před rokem

    Nice example of the strategy pattern. I would like to mention one more example of this pattern in JS world - ability to provide the comparison algorithm to the sort method of Array. The idea is the same - runtime definition of the algorithm that is used inside the main context.

  • @deathbyjs
    @deathbyjs Před rokem +3

    Thanks

  • @ico0z
    @ico0z Před rokem

    Why there isn't a love button. This video e just perfect and you learn a lot from it. Thank you

  • @yuriinadilnyi3029
    @yuriinadilnyi3029 Před rokem

    I always learn a lot of new things from your videos)

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +1

      Glad to hear that, Yurii :) Thanks for the feedback!

  • @atmn_pawel
    @atmn_pawel Před rokem +3

    creator of the nest js in the background 0:10

  • @santicanabalramos667
    @santicanabalramos667 Před rokem +1

    I love this kind of videos :D

  • @AzadKanwar
    @AzadKanwar Před rokem +1

    awesome

  • @aditshah3077
    @aditshah3077 Před rokem

    Hello Dmytro, Can you please make a video about change detection in depth understanding with real time scenarios and usage? It would be better for us if you make it. Thanks in advance 🙏

  • @Mr007Zeta
    @Mr007Zeta Před rokem +1

    Instant like. Love your content

  • @beodan9219
    @beodan9219 Před rokem

    awsome

  • @AlphaFrog1021
    @AlphaFrog1021 Před rokem +2

    great video! I suggest turning off minimap and even sidebar to have more screen size

  • @christ-gospel
    @christ-gospel Před rokem

    Thanks. Pls explain how to understand the angular code.

  • @pavan8268
    @pavan8268 Před rokem

    Hi Decoded Frontend, Is there any way to add open graph tags on angular, if it's rendered client side? Any suggestions would be great!!

  • @nicohussein2635
    @nicohussein2635 Před rokem +2

    Wow, amazing video!! 🚀
    Which resources do u recommend to learn/practice more about design patterns?

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +1

      refactoring.guru - is an awesome source to read more about it

  • @rezyadlf
    @rezyadlf Před rokem +1

    Hi Dmytro. Could you, please, teach us micro-frontend. Especially, angular/module-federation? That would be cool. You're an expert in Angular and i'm sure your video about it will be very usefull

    • @rezyadlf
      @rezyadlf Před rokem

      Also, since you are highly expertised, could you share us with your vision about the future of Angular? Will it reach the performance of React some day? What are they (Google) going to improve in future etc. I've read in Twitter that they are thinking about implementation of some sort of JSX-like syntax, maybe you know something interesting

    • @rezyadlf
      @rezyadlf Před rokem

      Curretnly, people are hyped on Angular's Signal. Would be cool to hear about that.

  • @irynakhariv5419
    @irynakhariv5419 Před rokem +1

    Дякую😊

  • @devman5813
    @devman5813 Před rokem +1

    Can you add the video to playlist about design patterns? :D

    • @DecodedFrontend
      @DecodedFrontend  Před rokem

      But it should be already there… 🤔 ok, I will check one more time

    • @devman5813
      @devman5813 Před rokem

      I can see it now, thank you :)

  • @gund_ua
    @gund_ua Před rokem +2

    Awesome stuff!
    SOLID and Design Patterns are 2 topics that are very underrated and even sometimes hated in frontend world (LOL).
    Very nice to see more attention on this stuff as in my opinion it's one of the most important things in most if not any software project (be it frontend or backend).
    You can easily replace algorithms if you have a good architecture but if you don't then you will be spending countless hours refactoring =)

    • @DecodedFrontend
      @DecodedFrontend  Před rokem

      Thank you for your feedback, Alex! Always reach and valuable feedback. I am agree that knowledge about design principles and patterns can drastically improve the code we write. Also, very often they just sound scary and difficult but in reality it is not :)

    • @Utopy34
      @Utopy34 Před rokem +1

      In 10 years working for enterprise clients with Angular I've never seen true OOP patterns employed on the front-end. It's always Functional Reactive Programming and classes are only used for Angular directives, pipes or services. You don't have a Product class but a product object that is stored in Redux for example. If you start mixing code paradigms you will break the codebase coherency which will do more harm than good. We generally try to reduce the cognitive complexity, not increase it.

  • @piotrbrokowski4703
    @piotrbrokowski4703 Před rokem +1

    Did you change the flat ?

  • @MrKOHKyPEHT
    @MrKOHKyPEHT Před rokem

    9:48 rows 110, 111, 112, 113 - is that how overload implemented in TS?

  • @haroldpepete
    @haroldpepete Před rokem +2

    CEO was checking the class and how was the last feature you were assigned, he looks angry

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +1

      Yeah, I probably forgot to food her, so that's why she looks angry :D

  • @chandreshmaurya1021
    @chandreshmaurya1021 Před rokem +1

    I see u fixed the thumbnail 😉

  • @Aliakbaresmaeiliiii
    @Aliakbaresmaeiliiii Před 3 měsíci

    thanx for your great job!