Dependency Inversion: What, Why & How? | By Example

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

ความคิดเห็น • 17

  • @CRBarchager
    @CRBarchager ปีที่แล้ว +2

    Your channel is way underrated. Awesome content and easy to follow along!

  • @adriencbl
    @adriencbl ปีที่แล้ว

    Very amazing content. The DI is not simply DI. You add a context, you explain both for a junior level and an advanced level. Thank you

  • @awesomecraftstudio
    @awesomecraftstudio 5 หลายเดือนก่อน +1

    Great introduction to the idea, this video is criminally underrated.

  • @danielokon749
    @danielokon749 6 หลายเดือนก่อน

    Brilliant explanation, easy to wrap your head around. Thank you!

  • @mehtubbhai9709
    @mehtubbhai9709 5 หลายเดือนก่อน

    This channel contains some really practical suggestions for how to do Clean Code. Many Thanks! Looking forward to more content. Subcribed!

  • @nicholasziglio
    @nicholasziglio 5 หลายเดือนก่อน

    This was really beautifully explained! I hope your channel will grow more.. Keep it going :)

  • @enggilbertoguimaraes
    @enggilbertoguimaraes 4 หลายเดือนก่อน

    Thanks for the content! I have a theoric doubt: in the design using the Adapter pattern, the ModuleB is pertain to Interface Adapter Layer or Infrastructure Layer? I mean, did it become like an external lib for my application?

    • @AboutCleanCode
      @AboutCleanCode  4 หลายเดือนก่อน +1

      Dependency inversion can be applied everywhere. If you refer to clean architecture then dependency inversion is applied on all layers to ensure dependencies only inwards.

  • @Somcoders
    @Somcoders ปีที่แล้ว

    Well explained. Thank you.

  • @yosiyosiro3866
    @yosiyosiro3866 ปีที่แล้ว

    Finally some basic that I could follow. Using adapter for reusablity of data access in clean architecture. I got some insight, thank you.

  • @AlexZavalny
    @AlexZavalny ปีที่แล้ว

    So everyone keeps saying about how great it is to use an abstractions for such things as DB, but does it really bring benefits? Do people often change the DB context to something else? Besides something like Logger, which one might change from text to sentry to idk email, everything else is just not happening. The real benefit is in testing/mocking things.

    • @AboutCleanCode
      @AboutCleanCode  ปีที่แล้ว

      @AlexZavalny In past 20 years I have seen so many technologies and libraries come and go which, depending on the size of your code base and the degree of coupling, can be really hard to replace. And as I tried to explain in the video this may not only happen due to obsolescence but also because of requirement changes which are hard to predict. So yes, based on my experience I see real and even big benefits of putting an "anti corruption layer" between third party libraries/technologies and the actual application logic.

    • @AlexZavalny
      @AlexZavalny ปีที่แล้ว

      @@AboutCleanCode Now when you say, I understand that you are right. I remember how I hardcoded using some fraud detection library for our ecommerce system and then company asked to switch to something else, which required search all references and rewrite.

    • @AlexZavalny
      @AlexZavalny ปีที่แล้ว

      I still thing that DB context is not the most obvious example @@AboutCleanCode

    • @AboutCleanCode
      @AboutCleanCode  ปีที่แล้ว

      @AlexZavalny maybe you are right - still I used it intentionally because I see many developers using it in their app logic without thinking about the impact when having to switch to some completely different storage technology in some years which they cannot even imagine today 😉

    • @awmy3109
      @awmy3109 ปีที่แล้ว +2

      Do people really change the db context? Have seen people ask that question repeatedly.
      Yes, it is replaced during unit tests. You shouldn't use dB context in unit tests or make network calls.