简单的Android架构
这个库专注于如何开发简单。
使用方法
待定:应用插件,添加其他插件的classpath
待定:能否在settings.gradle.kts中移除pluginManagement?
pluginManagement {
resolutionStrategy {
eachPlugin {
val plugin = requested.id.id
when (plugin) {
"kotlinx-serialization" -> useModule("org.jetbrains.kotlin:kotlin-serialization:${requested.version}")
}
}
}
}
enableFeaturePreview("GRADLE_METADATA")
目标
- 最简单
- 直观且学习曲线最小
- 无需额外知识
- 支持所有平台
- 只需添加业务逻辑而不需要技术代码
根据目标的优势
- 易读:即使是非开发者也能理解
- 易写:无需样板代码,一行代码意味着一行业务逻辑。能够专注于仅业务逻辑
- 易学:使用方法容易记忆。即使它很简单,如果你忘记了怎么办?你可以找到如何查看的地方。同时,它还提供了样例。
- 易于使用最新架构:您无需花费大量时间了解最新架构是什么,如何编写优秀的代码。只需遵循样例,然后您会编写至少不错的代码。
- 简单测试:它提供了基本测试类和示例。只需按照示例操作,然后即可进行测试。
前提条件
待办事项:为 iOS、JS、后端添加前提条件
客户端
- MVVM
- Kotlin, 协程
Android
- Koin
- Jetpack: 导航、数据绑定、LiveData、Paging、Room、ViewModel
- 资源
- AndroidX 测试
文章
待办事项:实现 android、ios、前端、后端的多个平台架构
Android 文章
- 移除 RecyclerView 的样板代码
- 在 Retrofit2 中使用协程进行 API 调用和错误处理
- LiveData 和事件
- MVVM 概念和减少 Activity/Fragment/ViewModel 上的样板代码
- 高效地使用 Android X 进行测试
- 重构到新架构
示例
- 示例:逐步显示 Simple Android Architecture 的用法
- Sunflower 示例:这是将 Android Sunflower 示例 转换的版本
- 测试样例:这是Android 测试 Codelab的转换版本。
规划
目前该平台只专注于 Android 开发。但凭借 Kotlin 多平台,将支持 Spring、Ktor、iOS 和前端。
许可协议
Copyright 2020 Jeonghyun Kim
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://apache.ac.cn/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.