The purpose of this repo is to follow up Clean Architecture principles by bringing them to Android. It is worth saying that the idea is to take advantage of the Kotlin Programming Language features plus also pull in lessons learned and ideas from other interesting approaches like Functional Programming.
Architecting Android… Reloaded
There is another Android Clean Architecture repository written in Java: https://github.com/android10/Android-CleanArchitecture with really nice discussions: https://github.com/android10/Android-CleanArchitecture/issues.Article, lessons learned and some more material coming up. Check the following known bugs and TODO list.
Architecting Android…The clean way?
Architecting Android…The evolution
Clean Architecture…Dynamic Parameters in Use Cases
Here are some useful Gradle/adb commands for executing this example:
./gradlew runApp
- Builds and install the debug apk on the current connected device../gradlew compileApp
- Builds the debug apk../gradlew runUnitTests
- Execute unit tests (both unit and integration)../gradlew runAcceptanceTests
- Execute acceptance and instrumentation tests in the connected device../gradlew runTestCoverage
- Reports code coverage on tests within the Android codebase../gradlew runStaticCodeAnalysis
- Run static analysis on the Android codebase.Refer to the issues section: https://github.com/android10/Android-CleanArchitecture-Kotlin/issues
Copyright 2021 Fernando Cejas
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
http://www.apache.org/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.
kotlin-android-extensions插件的实现原理:kotlin-android-extensions插件会帮我们生成一个_$_findCachedViewById()函数(使用这种奇怪的命名方式是为了防止和开发者定义的函数名冲突)。在这个函数中首先会尝试从一个HashMap中获取传入的资源id参数所对应的控件实例缓存,如果还没有缓存的话,就调用findViewById()函数来查找
*Android架构的四条黄金法则:* 1:满足方便利益相关者(视觉设计师,交互设计师,项目经理,数据库管理员,测试等等)例如交互设计师对接的程序员只需要打理和交互相关的代码,把这些代码分离出来,交互有修改时只要改动这些部分。 2:鼓励分离关注点 如上的例子,单独业务层单独分离出来。尽可能的多的清晰的分离业务层。 3:逃离真实世界 强调业务逻辑 隐藏Framework的细节。各个分离出来的业务层(
一、简介 Room 是 Google 官方推出的数据库 ORM 框架。ORM 是指 Object Relational Mapping,即对象关系映射,也就是将关系型数据库映射为面向对象的语言。使用 ORM 框架,我们就可以用面向对象的思想操作关系型数据库,不再需要编写 SQL 语句。 二、导入 apply plugin: 'kotlin-kapt' dependencies { ...
val Float.dp: Float // [xxhdpi](360 -> 1080) get() = TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, this, Resources.getSystem().displayMetrics ) val Int.dp: I
哔哩哔哩搜索谷歌官方中国就能找到谷歌官方 1:Kotlin开源域名: Kotlin对外开源的域名;Lotlinlong.org 2:Kotlin官方文档,源码,官博,公众号,Gradle文档 https://kotinlang.org/docs/reference/ gttps://gihub.com/JetBrains/kotlin https://blog.jetbrains.com/ko
Android-CleanArchitecture New version available written in Kotlin: Architecting Android… Reloaded Introduction This is a sample app that is part of a blog post I have written about how to architect an
Clean Architecture Solution Template This is a solution template for creating a Single Page App (SPA) with Angular and ASP.NET Core following the principles of Clean Architecture. Create a new project
另一个Kotlin团队研发的可以让开发更简单的插件是Kotlin Android Extensions。当前仅仅包括了view的绑定。这个插件自动创建了很多的属性来让我们直接访问XML中的view。这种方式不需要你在开始使用之前明确地从布局中去找到这些views。 这些属性的名字就是来自对应view的id,所以我们取id的时候要十分小心,因为它们将会是我们类中非常重要的一部分。这些属性的类型也是来
kotlin-android-template �� A simple Github template that lets you create an Android/Kotlin project and be up and running in a few seconds. This template is focused on delivering a project with static
如果你还记得,现在项目已经准备好去使用Kotlin Android Extensions。当我们创建这个项目,我们就已经在build.gradle中增加了这个依赖: buldscript{ repositories { jcenter() } dependencies { classpath "org.jetbrains.kotlin:kot
如何在我的中的每个项目中使用? 我的xml: