Skip to content

Commit

Permalink
Removed TODOs & created the todo list.
Browse files Browse the repository at this point in the history
  • Loading branch information
SalomonBrys committed Nov 12, 2018
1 parent baa9d89 commit a9ec395
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
49 changes: 49 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Kodein DI todo list
===================

CORE
----

#### Suspending factories

Factories (such as `factory {}`, `provider {}`, `singleton {}`, etc.) should take suspendable functions as parameter.

This would enable code such as:

```kotlin
Kodein {
bind<UserList>() with singleton { api.userList().await() }
}
```

This is a **major change**, as retrieval functions must also become suspending functions.
Therefore, we need to provide a way for blocking retrieval to be as easy as `kodein.direct`.


FRAMEWORKS
----------

#### TornadoFX

[TornadoFX](https://github.com/edvin/tornadofx) is a JavaFX framework for Kotlin.

It uses some kind of IoC for binding views, components and controllers.
These bindings could be integrated to Kodein, especially through the `externalSource` feature.

Further more, Kodein could provide special scopes for TornadoFX (controller, component, etc.).

#### KTor

[Ktor](https://ktor.io/) is a framework for building asynchronous servers and clients.

Kotlin could provide special scopes for KTor servers (session, request, route, etc.).

#### Cocoa-Touch

Cocoa Touch is the Core Framework on iOS.

Kotlin should provide the same kind of services on iOS it provides for Android.
Namely: a module to retrieve core services and scopes for MVC controllers (ViewController on iOS).

Furthermore, Kodein is currently incompatible with Obj-C & Swift and requires a facade.
This must be addressed.
2 changes: 1 addition & 1 deletion doc/core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ class MyActivity : Activity(), KodeinAware {
----
<1> Because `ds` is lazily retrieved, access to the `kodein` property will only happen at first retrieval.

NOTE: There is an official plugin to ease the use of Kodein in Android, you can read more about it on http://TODO[the dedicated document].
NOTE: There is an official module to ease the use of Kodein in Android, you can read more about it on http://kodein.org/Kodein-DI/?{branch}/android[the dedicated document].


==== Lateinit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.kodein.di.internal

internal actual fun <K, V> newConcurrentMap(): MutableMap<K, V> = HashMap()
internal actual fun <T> newLinkedList(): MutableList<T> = ArrayList() // TODO: This should REALLY be a Linked list !
internal actual fun <T> newLinkedList(): MutableList<T> = ArrayList()
internal actual fun <T> newLinkedList(c: Collection<T>): MutableList<T> = ArrayList(c)

actual inline fun <R> maySynchronized(lock: Any?, block: () -> R): R = block()

0 comments on commit a9ec395

Please sign in to comment.