Dependency Injection with Kodein & MVVM Architecture - Android Kotlin Tutorial

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

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

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

    The `by` keyword doesn't necessarily mean the property is lazily initialized. It is mostly used for that, but it's only passing initialization off to a delegate that handles a maybe more complex initialization. So the `kodein` property is in fact lazily initialized, but not because of the keyword `by` but just because of the way delegate returned by the `closesKodein()` function operates.
    Edit: Forgot to start with "Great tutorial!". Sorry about that.

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

    This tutorial is very well explained, it helped me understand how Kodein works, thank you very much.

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

    Really really great sense of "how to illustrate that someone could comprehend". Thanks a lot , could you please make video with koin dependency.

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

    Very helpful. This is much easier than Dagger 2. Digging into the docs now.

  • @voicheci007
    @voicheci007 6 ปีที่แล้ว +3

    Thank you for this video !!! Top notch content! Hope you reach 100k subscribers soon.
    Amazing how few lines of code this needs when using Kotlin

    • @ResoCoder
      @ResoCoder  6 ปีที่แล้ว

      Thanks 😃
      Working with Kotlin is pure happiness.

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

    Good Tutorial. I like that you are prepared for the subject and write apps with good practices (making many packages etc.)

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

    now... i am gonna watch couples of times to get my brain understand 😅 great tutorial btw!

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

    you're amazing doing tutorials keep doing this content as long you're happy doing them thank you very much!

  • @jktan5793
    @jktan5793 6 ปีที่แล้ว +9

    Great tutorial.
    May I ask would you make Dependency Injection with Dagger2 & MVVM Architecture - Android Kotlin Tutorial too ?
    haha learnt a lot today
    Thanks

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

      koin is better bcause is more simple than dagger

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

      @@donynuransyah7024 this is kodein, not koin

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

    Thanks a lot. Your tutorial has changed my mind and my knowledge about interfaces.

  • @matt-g-recovers
    @matt-g-recovers 3 ปีที่แล้ว

    Very cool,
    Thanks Matej!

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

    Thank you. now i understand how to use it in practice. Very very helpful for me.

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

    such a great explanation, thanks

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

    What's the Android Studio theme you're using? I love it and also the Android Studio icons for files!!

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

      I think its Material Design Theme

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

    very good tutorial but you should have done it with room database.

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

    Awesome video! I have learned so much from this. Thank you!

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

    If you know MVVM and are here only for the Kodein part, go to minute 30:35

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

      Thank you bro

  • @valour.se47
    @valour.se47 6 ปีที่แล้ว

    i like the content , can you tell us that why did you choose [ Kodein over Dagger ] , every one seems to be using Dagger2 as far as i found when i was learning DI but i want your opinion as you are experienced you can elaborate better :) thanks for the good content.

    • @ResoCoder
      @ResoCoder  6 ปีที่แล้ว +1

      The reason is simple: Kodein was designed for Kotlin so it's much simpler and natural to use :)

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

    This is a great video! Can you please make tutorial on "how to write ui test for MVVM with kodein"?

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

    Another great tutorial! Huge thanks

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

    awesome tutorial ,
    Thank you! , could you add a unit test video ?

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

    Will you make a video for Koin as a DI ? thanks!

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

    Why do you prefer Kodein over Koin? I haven't worked with either of them so l'm debating as to which of the 2 I should pick up.

  • @2panel
    @2panel 6 ปีที่แล้ว

    In QuotesActivity instead of using StringBuilder and looping you could simply use quotes.joinToString(transform = { "$it

    " } )

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

    So if we were to add validation checks on user input, would we do it in view or viewmodel?

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

    Why you used provider instead singleton for QuotesViewModelFactory ?

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

    What a amazing tutorial, thank you so much

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

    can you do the same with singletons? - bind () from singleton { ... }, can it infer the type as well?

  • @fabrizziocht
    @fabrizziocht 6 ปีที่แล้ว

    Great tutorial, thanks and greetings from Peru

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

    Kodein vs Koin pls which is best?

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

    Hi how can use view model factory as genric . i mean using single view model factory for every view model

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

    awesome. just wondering how long you has been involving yourself in this field? Seem like you know everything. I wanna be you. pls take it as a compliment

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

    Great video. Thanks

  • @SycoonGaming
    @SycoonGaming 6 ปีที่แล้ว

    Hey Nice video. How do you get that background ? The icons and your cpu stats, time etc.

    • @ResoCoder
      @ResoCoder  6 ปีที่แล้ว

      I'm using a program called Rainmeter. Check it out, it is totally customizable.

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

    Great tutorial. Subbed.

  • @samha1513
    @samha1513 6 ปีที่แล้ว

    Question: I have over 100k records that needs to be displayed in a Recyclerview and Edittext to filter it. What's the best way to do it? Any help or instructions is greatly appreciated.

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

    awesome

  • @MauricioSouza-93
    @MauricioSouza-93 6 ปีที่แล้ว

    Thank you a lot...Great tutorial!

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

    What theme and font are you using in Android Studio?

  • @E7YSIAN
    @E7YSIAN 6 ปีที่แล้ว

    Would you say that using C# with Xamarin forms is the way to go for someone who wants to start developing apps?
    I'm coming from a C# background with 2 years of experience using WPF & the design pattern MVVM.
    I've played around with Kotlin in Android Studio but seeing how I got so much more knowledge in C#, should I stick with that or learn Kotlin?

    • @ResoCoder
      @ResoCoder  6 ปีที่แล้ว +1

      It's a hard decision to make, that's for sure. If I were in your place I'd not use Xamarin. I feel like it's lacking in many areas.
      I also want to put a little disclaimer here - I never really worked with Xamarin Forms, only with Xamarin Android.
      I'd go ahead and learn Kotlin instead. With Kotlin you can even build for iOS and transpile to JavaScript too! It's a quite clunky as of now but people over at JetBrains are working hard to polish cross-platform Kotlin. I feel that Kotlin is a better bet plus if you already know C# quite well, learning Kotlin in order to be sufficiently good in it will take no more than few weeks.

    • @E7YSIAN
      @E7YSIAN 6 ปีที่แล้ว

      Awesome!
      Yeah I've been wanting to expand on more languages so why not Kotlin.
      Thanks!

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

    Good work. Thank you

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

    Does your Repository class match to "Clean Architecture"?

  • @chorton53
    @chorton53 6 ปีที่แล้ว

    Thanks for the tutorial !!!

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

    good tutorial!!

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

    it's works for unit testing??

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

    What Linux distro are you using?

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

      Windows 10 😅

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

      @@ResoCoder oh, my mistake lol. Love your content btw!!

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

    I need this editor theme

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

    Where's the source code then?

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

    Sorry but right off the bat your definition of "lose coupling" is flat out wrong. Loose coupling if when components have very little knowledge of one another. You probably confused this with dependency injection but even then you would still be wrong.

  • @askdetanny8915
    @askdetanny8915 6 ปีที่แล้ว

    Sir can you make a video on multiply screen support in android studio.I am facing problem when I run my app in redmi note 5,its layout is prefect,but when run same app in my nexus 5,its layout is not good.plz help me

    • @ResoCoder
      @ResoCoder  6 ปีที่แล้ว

      Are you using ConstraintLayout?

    • @askdetanny8915
      @askdetanny8915 6 ปีที่แล้ว

      @@ResoCoder no sir relative layout

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

    Why you used provider instead singleton for QuotesViewModelFactory ?