简体   繁体   English

Android MVP 实现

[英]Android MVP implementation

i came across a few articles talking about the subject but i cannot understand how to apply MVP on my app code.我看到了几篇讨论这个主题的文章,但我不明白如何在我的应用程序代码中应用 MVP。 is there any specific guidelines for a clean MVP implementation for android.是否有针对 android 的干净 MVP 实现的任何特定指南。

thank you谢谢你

Checkout this link: 查看此链接:
Material movies 素材电影
MVPAndroidBootstrap MVPAndroidBootstrap
Clean-Contacts 清洁隐形眼镜
MvpCleanArchitecture MvpCleanArchitecture
Android-CleanArchitecture Android的CleanArchitecture
At this links you will find a lot of MVP implementations for android 在这个链接,你会发现许多Android的MVP实现

UPDATED: 更新:

mosby - A Model-View-Presenter library for modern Android apps mosby - 适用于现代Android应用程序的Model-View-Presenter库
ThirtyInch - A new MVP library for Android ThirtyInch - 适用于Android的新MVP库
Moxy - Android MVP library without problems of lifecycle and boilerplate code Moxy - Android MVP库,没有生命周期和样板代码问题

UPDATED: 更新:

Interesting-Android-repositories - contains a lot MVP implementations for Android. 有趣的Android-repositories - 包含很多Android的MVP实现。

Here on github https://github.com/saksham24/Android-Firebase-Mvp-Mvc-Mvvm-chat i made a repo containing 3 applications with same functionality but written in 3 different android patterns(Mvc, Mvp, Mvvm) 在github上https://github.com/saksham24/Android-Firebase-Mvp-Mvc-Mvvm-chat我做了一个包含3个具有相同功能的应用程序的repo,但是用3种不同的android模式编写(Mvc,Mvp,Mvvm)

Understanding three different pattern is quite easy if we get a simple good example on them so i made a repo to contribute my knowledge to this developer community. 如果我们得到一个简单的好例子,那么理解三种不同的模式是非常容易的,所以我做了一个回购,将我的知识贡献给这个开发者社区。 Also the repository is written using proper java guidelines and conventions(including naming and packages, modules) so people looking for such project can also view this repository. 此外,存储库是使用适当的Java指南和约定(包括命名和包,模块)编写的,因此寻找此类项目的人也可以查看此存储库。

I've recently created lightweight (with no overhead dependencies) MVP library in Kotlin.我最近在 Kotlin 中创建了轻量级(没有开销依赖)MVP 库。 It also supports LiveData subscription between Presenter and Model under the hood.它还支持 Presenter 和 Model 之间的 LiveData 订阅。

Please find detailed "how-to" and sources here: https://github.com/smaslenko/instant-mvp请在此处找到详细的“操作方法”和来源: https : //github.com/smaslenko/instant-mvp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM