architecture-samples icon indicating copy to clipboard operation
architecture-samples copied to clipboard

(todo-mvp-kotlin) dependency injection with Koin

Open arnaudgiuliani opened this issue 9 years ago • 4 comments

Hello,

I work on Koin - a Kotlin dependency injection framework that make DI very easy. I made a dedicated branch, from MVP-Dagger & MVP-Kotlin: https://github.com/Ekito/android-architecture/tree/dev-todo-mvp-kotlin-koin

You can read my article on https://medium.com/@giuliani.arnaud/moving-from-dagger-to-koin-simplify-your-android-development-e8c61d80cddb

Don't know if it can interest you. Let me know :)

arnaudgiuliani avatar Oct 31 '17 10:10 arnaudgiuliani

Hi Arnaud,

It looks interesting! If your framework gets community traction we'll add it to the main list.

In your article you say

The Dagger project has been written by Google team

That's actually not true. Those are written by experts from the community.

It's very cool to see Blueprints used this way, nice job!

JoseAlcerreca avatar Oct 31 '17 14:10 JoseAlcerreca

Hi Jose,

Very cool! We will see if people begin to use Koin. I fixed my article, thanks.

Blueprints are a great reference! 👍

arnaudgiuliani avatar Oct 31 '17 15:10 arnaudgiuliani

Hi guys,

Maybe this is not the appropriate issue for this but... I'm a mid-level android dev and I'm starting to use MVP so I was wondering, what are the benefits of creating a Fragment and Activity for every screen? Does it have to do with Activity lifecycles?

Sorry for polluting this @arnaudgiuliani

fjoshuajr avatar Oct 31 '17 15:10 fjoshuajr

@kazijosh indeed not the place for that question. Google it or try Stackoverflow to read about the pros and cons of each solution.

We mention it in the todo-mvp readme

The use of both activities and fragments allows for a better separation of concerns which complements this implementation of MVP. In this version of the app, the Activity is the overall controller which creates and connects views and presenters.

JoseAlcerreca avatar Oct 31 '17 16:10 JoseAlcerreca