Dependency Injection Part 2: The Container

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

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

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

    Thanks mate , you did it great!

  • @arzukirectepe9426
    @arzukirectepe9426 5 месяцев назад

    thank you bran. this is exactly what i was looking for.

  • @patrick_kabwe
    @patrick_kabwe Год назад

    i love this. Thank you Bran

  • @tmbarral664
    @tmbarral664 Год назад +1

    pretty neat ;) Thx a lot.

  • @gyanaranjan6526
    @gyanaranjan6526 Год назад

    Thanks a lot

  • @lpanebr
    @lpanebr 11 месяцев назад

    Good explanation and good examples. While explaining the container concept to manage the DIs it looks very similar to the idea of using an autoloader that lets us just call a class without importing it. Are they the same or the autoloader is just another thing that makes making a DI container easier?

  • @adiadiadi
    @adiadiadi Год назад

    The examples were simple to follow. Thank you, sir.
    Two questions:
    1. Can you recommend some resources to further my journey in DI, specifically in the context of JavaScript / TypeScript?
    2. Is there a DI solution that resolves all the dependencies during the build process and generates static import/require statements in the build output for each file? I ask this because if the DI container resolves dependencies dynamically at runtime, then won't we lose the ability to tree-shake unused code?

    • @branvandermeer
      @branvandermeer  Год назад +1

      @adiadiadi: I recommend NestJS as a nice DI/IoC implementation to play with and learn more about. As for your second question: I don't know of any such compile step, afaik all DI is resolved at runtime.

    • @adiadiadi
      @adiadiadi Год назад

      @@branvandermeer thanks! will check out Nest