How To Use Koin As Dependency Injection Framework For Kotlin & Compose Multiplatform - KMP Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ค. 2024
  • In this video, we form a basic understanding of dependency injection and how we can use Koin as a dependency injection framework in our Kotlin Multiplatform project with Compose Multiplatform.
    While we only cover Android and iOS as target builds, you can also apply the content of this video for other platforms like Desktop and Web!
    🔍 What You Will Learn:
    - A basic understanding of the Dependency Injection design principle
    - How to Setup Koin With Kotlin DSL and Koin Annotations KSP Plugin
    - How to declare definitions / dependencies with Koin
    - How to inject definitions / dependencies in your code with Koin
    🔗 Helpful Links:
    - Koin: insert-koin.io/
    - Video's GitHub repository: github.com/YanneckReiss/kmp-c...
    🙌 Follow me on:
    Twitter: / yanneckreiss
    Medium: / yanneck-reiss
    Instagram: / yanneckreiss
    📌 Timestamps:
    00:00 - Intro
    00:58 - Why Dependency Injection?
    02:52 - Why Koin?
    03:49 - KMP Project Setup
    05:48 - Constructor vs. Field Injection
    06:44 - How To Declare Definitions / Dependencies With Kotlin DSL
    10:48 - Constructor DSL
    12:18 - How to Start Koin
    15:34 - Koin Annotations KSP Plugin
    20:36 - Koin in Compose Multiplatform Code
    22:37 - Outro
    #Kotlin #KotlinMultiplatform #ComposeMultiplatform #Koin #MobileAppDevelopment #DependencyInjection #DeveloperTutorial #Programming #TechGuide
    🌟 Stay tuned for more insightful videos on the latest in software development technologies and best practices. Don’t forget to like and share!
    Thank you for watching and happy coding! 🌟

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

  • @wasabinator
    @wasabinator 27 วันที่ผ่านมา +2

    Thank you for pronouncing it CORRECTLY! No idea why people try to call it "ko-in" when the domain name itself is "insert-koin" which is obviously a play on words from the arcades.

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

    The best video, I'm Brazilian, I'm studying multiplatform composing and your channel very helps to studying and solutions error. Thanks bro!

  • @SociedadAndroide
    @SociedadAndroide 5 หลายเดือนก่อน +4

    Thi is an excelent introduction to DI in KPM ! thanks for the content

  • @hellodevs
    @hellodevs 5 หลายเดือนก่อน +3

    Despite being a big fan of Hiit, I see Koin as the best option for Compose Multiplata. Thank you very much

  • @yusufceylan9863
    @yusufceylan9863 หลายเดือนก่อน +2

    Great explanation, thanks a lot Yanneck!

  • @diegoribeiro5992
    @diegoribeiro5992 6 หลายเดือนก่อน +2

    Congrats from Brazil, bro. It was amazing.

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

      Thank you very much! I'm glad you liked it. That really motivates me! 😊

  • @Germansdev
    @Germansdev หลายเดือนก่อน +2

    Thanks Yanneck!

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

      Thank you for watching 😊

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

    I have a complex native android app and I need to have it in multiplatform, what do you recommend me to migrate to KMP or flutter?

  • @pgnrr
    @pgnrr 6 หลายเดือนก่อน +3

    Could you do a video on how would you do a Compose multiplatform app with api networl requests, pagination, bottom navigation,etc... it would be of great help🔥 and Merry Xmas!!!!!

    • @yanneckreiss
      @yanneckreiss  6 หลายเดือนก่อน +2

      Merry xmas to you too! I will first try to split those topic into separate videos but I can totally think of a video where I do all at once in a longer video to build a fully functionally app 😊

  • @justinsmith3981
    @justinsmith3981 6 หลายเดือนก่อน +2

    One thing that can be improved here is migrating to version catalogs.

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

      You are right - but because the template project doesn't use it I didn't want to introduce too many new technologies that are not the actual topic of the video:) hope you still found it useful

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

    Please make thrid part of cameraX with tensorflow.

  • @willi11319
    @willi11319 6 หลายเดือนก่อน +2

    best christmas present 2023

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

    Nice video, but have you considered about using kotlin-inject since it's really rare to find video telling about it?

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

    Hello yannek, Does kotlin have a way to manage memory manually?

  • @radhe3891
    @radhe3891 6 หลายเดือนก่อน +1

    please not edit the video like this be it normal so that we can see at least android studio and pakage structure properlly , thank you

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

      Good point, I tried the presentation mode for this and my last videos but also realized especially with this one when I was editing that it often can lead to confusion when one can't see the whole IDE 😅 thanks for your feedback 😊