All Projects β†’ Kodein-Framework β†’ Kodein Di

Kodein-Framework / Kodein Di

Licence: mit
Painless Kotlin Dependency Injection

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Kodein Di

kmpapp
πŸ‘¨β€πŸ’» Kotlin Mobile Multiplatform App (Android & iOS). One Code To Rule Them All. MVVM, DI (Kodein), coroutines, livedata, ktor, serialization, mockk, detekt, ktlint, jacoco
Stars: ✭ 34 (-98.74%)
Mutual labels:  kodein, ktor, kotlin-multiplatform
Kodein-Log
Multiplatform lightweight logging library.
Stars: ✭ 25 (-99.07%)
Mutual labels:  kodein, kotlin-multiplatform, kodein-framework
PopKorn
DI can be simple. Forget about modules and components. Just use it!
Stars: ✭ 139 (-94.84%)
Mutual labels:  injection, kotlin-multiplatform, kotlin-dependency-injection
Lastik
Kotlin Multiplatform + Jetpack Compose pet project, based on www.last.fm/api (in development)
Stars: ✭ 37 (-98.63%)
Mutual labels:  kodein, ktor, kotlin-multiplatform
kmm
Rick & Morty Kotlin Multiplatform Mobile: Ktor, Sqldelight, Koin, Flow, MVI, SwiftUI, Compose
Stars: ✭ 52 (-98.07%)
Mutual labels:  compose, ktor, kotlin-multiplatform
tv-maniac
Tv-Maniac is a Multiplatform app (Android & iOS) for viewing TV Shows from TMDB.
Stars: ✭ 55 (-97.96%)
Mutual labels:  ktor, kotlin-multiplatform
MultiplatformPlayground
Kotlin Multiplatform project in Jetpack Compose & SwiftUI with shared ViewModel layer and File upload
Stars: ✭ 72 (-97.33%)
Mutual labels:  ktor, kotlin-multiplatform
Sheasy
This an Android App that helps you share/manage your files on your Android Device through a WebInterface in the Browser - Built with Ktor and Kotlin-React
Stars: ✭ 34 (-98.74%)
Mutual labels:  ktor, kotlin-multiplatform
kotlin-ktor-realworld-example-app
Real world backend API built in Kotlin with Ktor + Kodein + Exposed
Stars: ✭ 117 (-95.65%)
Mutual labels:  kodein, ktor
kmm-production-sample
This is an open-source, mobile, cross-platform application built with Kotlin Multiplatform Mobile. It's a simple RSS reader, and you can download it from the App Store and Google Play. It's been designed to demonstrate how KMM can be used in real production projects.
Stars: ✭ 1,476 (-45.17%)
Mutual labels:  compose, kotlin-multiplatform
wordle-kt
Wordle game clone made with Kotlin & Compose
Stars: ✭ 33 (-98.77%)
Mutual labels:  compose, compose-desktop
ToDometer Multiplatform
WIP Kotlin Multiplatform project: A meter to-do list built with Android Jetpack, Compose UI Multiplatform, Wear Compose, SQLDelight, Koin Multiplatform, SwiftUI, Ktor Server / Client, Exposed...
Stars: ✭ 145 (-94.61%)
Mutual labels:  ktor, kotlin-multiplatform
PreCompose
Compose Multiplatform Navigation && ViewModel
Stars: ✭ 150 (-94.43%)
Mutual labels:  kotlin-multiplatform, compose-desktop
meu kumbu
πŸ’΅Meu Kumbu πŸ’° (Means My Money) is a template app that people can use to build their owns Wallet πŸ€‘ or a mobile 🏦 banking app.
Stars: ✭ 55 (-97.96%)
Mutual labels:  ktor, kotlin-multiplatform
tmdb-api
This Kotlin Multiplatform library is for accessing the TMDB API to get movie and TV show content. Using for Android, iOS, and JS projects.
Stars: ✭ 31 (-98.85%)
Mutual labels:  ktor, kotlin-multiplatform
kinsight-multiplatform
Kotlin Multiplatform Concept - iOS, MacOS, WatchOS (SwiftUI), Android (phone and Wear OS), JVM Web Server - Alpha Capture
Stars: ✭ 38 (-98.59%)
Mutual labels:  ktor, kotlin-multiplatform
D-KMP-sample
D-KMP Architecture official sample: it uses a shared KMP ViewModel and Navigation for Compose and SwiftUI apps.
Stars: ✭ 636 (-76.37%)
Mutual labels:  kotlin-multiplatform, compose-desktop
Scout
Scout is a kotlin multiplatform application that allows users to search and save games to lists to be browsed later.
Stars: ✭ 28 (-98.96%)
Mutual labels:  ktor, kotlin-multiplatform
inject
A simple Kotlin multi-platform abstraction around the javax.inject annotations.
Stars: ✭ 42 (-98.44%)
Mutual labels:  injection, kotlin-multiplatform
chip-8
Jetpack Compose and SwiftUI based Kotlin Multiplatform fork of https://github.com/cbeust/chip-8 (Chip-8 Emulator)
Stars: ✭ 36 (-98.66%)
Mutual labels:  kotlin-multiplatform, compose-desktop

KODEIN-DI

Kotlin Maven Central Github Actions MIT License Slack channel

KOtlin DEpendency INjection

Kodein-DI is a very simple and yet very useful dependency retrieval container. it is very easy to use and configure.

Kodein-DI works:

  • On the JVM.
  • On Android.
  • On Javascript (both in the browser and on Node.js).
  • On Native platforms (such as iOS).

Kodein-DI allows you to:

  • Lazily instantiate your dependencies when needed
  • Stop caring about dependency initialization order
  • Easily bind classes or interfaces to their instance or provider
  • Easily debug your dependency bindings and recursions

Kodein-DI provides extensions to be integrable into:

An example is always better than a thousand words:

val di = DI {
    bindProvider<Dice> { RandomDice(0, 5) }
    bindSingleton<DataSource> { SqliteDS.open("path/to/file") }
}

class Controller(private di: DI) {
    private val ds: DataSource by di.instance()
}

Kodein-DI is a good choice because:

  • It proposes a very simple and readable declarative DSL
  • It is not subject to type erasure (as Java is)
  • It integrates nicely with Android
  • It proposes a very kotlin-esque idiomatic API
  • It is fast and optimized (makes extensive use of inline)
  • It can be used in plain Java

Looking for Kodein-DI 7.0 migration guide?

Follow this us here.

Kotlin & JVM compatibility

Kodein-DI Kotlin JDK Compose
7.10.0 1.6.10 min 1.8 NO
7.7+ 1.5+ min 1.8 Compatible
7.6+ 1.5+ min 1.8 -
7.1+ 1.4+ min 1.8 -
7.0+ 1.3.72 min 1.8 -
6.5.5 1.3.72 min 1.8 -
6.5.4 1.3.71 min 1.8 -
6.5.3 1.3.70 min 1.8 -
6.5.0 1.3.61 min 1.8 -
6.4.1 1.3.50 min 1.8 -
6.3+ 1.3.40 min 1.8 -
6.2+ 1.3.30 1.6 -
6.1+ 1.3.20 1.6 -
6.0+ 1.3.0 1.6 -
5.0+ 1.2.30 1.6 -
4.1+ 1.1.3 1.6 -
4.0.0-beta2 1.1.0 1.6 -

Demo Projects

You can find samples for MPP project here https://github.com/Kodein-Framework/Kodein-Samples

Read more

Kodein-DI 7+ is the current major version, but documentation is available for previous versions.

Kodein-DI documentation

Support

Support is held in the Kodein Slack channel (you can get an invite to the Kotlin Slack here).

Future

The following frameworks will receive special love from Kodein:

  • Android
  • Cocoa-Touch (iOS), // TODO
  • Ktor
  • TornadoFX

 

Testimonies

 

At Collokia we use Kodein in all of our backend service infrastructure and all modules in those services are loosely coupled through injection with Kodein. It allows us to have nice module independence, and to opt-out of injection during testing or build separate modules in support of testing.
It is a key component and building block in our architecture.
-- Jayson Minard

 

 

At Moovel Group GmbH, we have successfully used the wonderful Kodein library into in this Android app. As we improved it, we found Kodein to be much more useful than Dagger2 as it simplified our code throughout.
Kodein is in my view, much easier to understand, doesn't have that nasty ceremony, and has really nice debug messages.
We are also working now on other projects where we are using Kodein as well.
-- Sorin Albu-Irimies

 

 

Kodein has been instrumental in moving our entire production application to Kotlin at InSite Applications. It uses standard Kotlin idioms and features for ultimate clarity and simplicity. It was clear to us from the beginning that Kodein would be our DI solution. Our devs love it so much that they've transitioned to using it in their personal apps, both Java and Kotlin!
-- Eliezer Graber

 

 

At Compsoft Creative, Kodein is central our new Kotlin based app architecture, giving us a solid underpinning to all apps we develop and allowing a simple yet powerful way to de-couple our services with a library that is lightweight and perfect for mobile apps.
-- Daniel Payne

 

 

Kodein is used in the android app of the OhelShem school.
-- Yoav Sternberg 

 

Kodein was created at Dental Monitoring with the opinion that Dagger2 is way too verbose and complex. It is now used in almost all our projects: the server, the internal production software & the Android application.
Kodein is very easy to use and set up: it allows our team to easily share code and patterns, as well as quickly bootstrapping new ideas.
-- Salomon Brys

 

 

If you are using Kodein-DI, please let us know!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].