What is Dependency Injection on Android with Dagger2?

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.พ. 2025
  • A brief description of what dependency injection is. This is not an actual example of how to use dagger. This is purely conceptual.
    ➤ Watch the dagger course free:
    ↻ codingwithmitc...

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

  • @thearpansircar
    @thearpansircar 3 ปีที่แล้ว

    Just started with this series, but Mitch, here's your engagement.

  • @manpreet4743
    @manpreet4743 4 ปีที่แล้ว +1

    I am big fan of you and Florian. But I am bit more towards Florian side since he is better in explaining concepts in deep :) specially dagger part

  • @b.k4142
    @b.k4142 5 ปีที่แล้ว +3

    @singleton one instance of object in memory for entire application.
    exemple glide instance, retrovit, instance httpOk, things that never change!

  • @educationey9572
    @educationey9572 5 ปีที่แล้ว

    I have a very strange problem when i use dependency injection when i have Recyclerview in app, most of the times items will be duplicate or getting 3x item, or list won't be updated, and when i develop without DI, it's working fine, i've tried notifychange or etc, but still problem remain...Can u please use recyclerview in pro ways, since u're experienced?Thanks again.

    • @codingwithmitch
      @codingwithmitch  5 ปีที่แล้ว +1

      I will use a recyclerview, but I'm not injecting anything into it

  • @educationey9572
    @educationey9572 5 ปีที่แล้ว +1

    Hello, can u please do this with multiple activities and subcomponents?

    • @codingwithmitch
      @codingwithmitch  5 ปีที่แล้ว +1

      yep I will be covering that

    • @educationey9572
      @educationey9572 5 ปีที่แล้ว

      Amazing, how about retrofit? or injecting and using libraries (for examples : glide & picaso)?

    • @codingwithmitch
      @codingwithmitch  5 ปีที่แล้ว

      @@educationey9572 yep that too

  • @meditaionnation7692
    @meditaionnation7692 4 ปีที่แล้ว

    my question what is dagger2 please and what are used for ? thanks just a curious dude

    • @sagarock1012
      @sagarock1012 4 ปีที่แล้ว

      Dagger 2 is for Dependency Injection and Dagger Android (which is part of Dagger 2 its more like add on) is to reduce that boilerplate code in Fragments, Activities, or any other Android framework classes that are instantiated by the OS

  • @David-yz9mb
    @David-yz9mb 5 ปีที่แล้ว +1

    It would be more understandble if when you explain "@Singleton" you show the java code it replaces, most java developers are familiar with singletons I suppose, that annotation isn't more than a replacement for writing the static getInstance()... by yourself.

  • @b.k4142
    @b.k4142 5 ปีที่แล้ว

    I m just taking not here : dagger2 help us to architect our code.

  • @InvincibleXXX
    @InvincibleXXX 5 ปีที่แล้ว

    A very important subject, but it is a pity that I can not understand what you say, and translator of subtitles is very bad (

  • @erlanbulanbekov4703
    @erlanbulanbekov4703 4 ปีที่แล้ว

    What about dependency injection with Koin?

    • @codingwithmitch
      @codingwithmitch  4 ปีที่แล้ว +1

      Koin is fine. If you like it use it

  • @olukayodepaul7070
    @olukayodepaul7070 5 ปีที่แล้ว

    still waiting for your short video on uploading image to server with retrofit. Dont mind if you add it to your paid class.

    • @codingwithmitch
      @codingwithmitch  5 ปีที่แล้ว +1

      That's not a short video lol. Id need to do a lot of stuff server-side before making a "short video".
      I'll include it in the next course

    • @olukayodepaul7070
      @olukayodepaul7070 5 ปีที่แล้ว +1

      @@codingwithmitch the next course will be when?