Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Dependency Injection by Koin (Kotlin Multiplatform Learning Shared UI Todo App)

  • RingRing
  • 2024-04-09
  • 112
Dependency Injection by Koin (Kotlin Multiplatform Learning Shared UI Todo App)
  • ok logo

Скачать Dependency Injection by Koin (Kotlin Multiplatform Learning Shared UI Todo App) бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Dependency Injection by Koin (Kotlin Multiplatform Learning Shared UI Todo App) или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Dependency Injection by Koin (Kotlin Multiplatform Learning Shared UI Todo App) бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Dependency Injection by Koin (Kotlin Multiplatform Learning Shared UI Todo App)

Github url of Todo App with Native UI: https://github.com/ringring-creator/K...

--
Hello, this is RingRing.

Welcome to the Kotlin Multiplatform Learning Series for Android Engineers.

In this video, we'll learn about Dependency Injection using Koin in the Shared UI version of the TODO app, which serves as our sample application.

First, let's take a look at the overall structure of Dependency Injection in this app. The sample app, including the UI, is implemented in the commonMain source set. Therefore, the necessary ScreenModel and classes from the model layer inject dependencies in the CommonModule of the same commonMain source set. This CommonModule is called from the application class of both Android and iOS. Any classes specific to Android and iOS that cannot be resolved in CommonModule are injected with dependencies from the androidMain source set and the iosApp module, respectively.

In this app, we're using the Koin library for Dependency Injection. Koin is a practical lightweight dependency injection framework for Kotlin and Kotlin Multiplatform. It was developed by Kotzilla and open-source contributors. Kotzilla is a technology maker based in France.

Now, let's see how we inject dependencies using Koin from the code.

The `initKoin` function on the left side injects dependencies using the `commonModule` and `platformModule` functions. The `commonModule` in the center contains the dependency injection methods for each class. `single` injects the class as a singleton, while `factory` generates an instance for each injection. By writing these instructions, dependencies can be automatically injected within the scope of Koin by using the `get` function. The `platformModule` function declares the implementation of functions on each platform using `expect`. Finally, on the right side, the actual `platformModule` function is implemented. In this example, it's regarding the dependency injection of `SqlDriver` used in SqlDelight.

The `initKoin` function we've seen so far is called and used in the Application class of both Android and iOS.

That concludes the explanation for this video. Thank you for watching. If you found this guide helpful, don't forget to like, subscribe, and hit the bell icon. Stay tuned for more content on Kotlin Multiplatform.

Until next time, happy coding.

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]