ArrowAndroidSamples

所属分类:虚拟/增强现实-VR/AR
开发工具:kotlin
文件大小:188KB
下载次数:0
上传日期:2020-04-01 03:51:12
上 传 者sh-1993
说明:  使用<http:arrow-kt.io>对Android架构进行功能编程

文件列表:
.travis.yml (524, 2019-11-08)
app (0, 2019-11-08)
app\build.gradle (3030, 2019-11-08)
app\proguard-rules.pro (942, 2019-11-08)
app\reports (0, 2019-11-08)
app\reports\report.detekt (181, 2019-11-08)
app\src (0, 2019-11-08)
app\src\main (0, 2019-11-08)
app\src\main\AndroidManifest.xml (1229, 2019-11-08)
app\src\main\java (0, 2019-11-08)
app\src\main\java\com (0, 2019-11-08)
app\src\main\java\com\github (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\business (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\business\NewsUseCases.kt (754, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\business\model (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\business\model\DomainError.kt (740, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\business\model\NewsItem.kt (303, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\NewsRepository.kt (1476, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\DataSource.kt (1975, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\NewsApiService.kt (356, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\NewsAuthInterceptor.kt (615, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\dto (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\dto\NetworkNewsItem.kt (397, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\dto\NewsResponse.kt (194, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\error (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\error\NetworkErrors.kt (241, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\mapper (0, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\mapper\ErrorMapper.kt (403, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\data\network\mapper\NewsItemMapper.kt (555, 2019-11-08)
app\src\main\java\com\github\jorgecastillo\kotlinandroid\io\algebras\ui (0, 2019-11-08)
... ...

Arrow Android Samples ===================== [![Build Status](https://travis-ci.org/JorgeCastilloPrz/ArrowAndroidSamples.svg?branch=improve-reader-usage)](https://travis-ci.org/JorgeCastilloPrz/ArrowAndroidSamples) [![Kotlin version badge](https://img.shields.io/badge/kotlin-1.3.50-blue.svg)](http://kotlinlang.org/) [![Arrow version badge](https://img.shields.io/badge/arrow-0.10.2-blue.svg)](http://arrow-kt.io/) Functional Programing Android architecture approaches using [Arrow](http://arrow-kt.io/). # How to import it Since the project uses the [News API](https://newsapi.org/) you will need to add `newsApiKey=your_news_api_key` to your home `gradle.properties` to be able to compile and run it. You can also add them by command line: `./gradlew detektCheck build -PnewsApiKey="\"whatever\""` # Approach used This project uses the so called `Tagless-Final` Functional Programming style. Tagless-Final is focused on never depending on concrete data types like Option or Try, but make the program depend on an unknown `F` type end to end instead. Then we use Type Class constraints (behaviors) that work over that `F` to encode our programs, leaving the decision about which concrete type to use (or in other words: what type fix `F` to) to the moment when we are ready to run the code, or in other words, the "Runtime". ## IO Once you're at the "edge of the world" to run your program, you'll pass a proper runtime. In this sample we are fixing the `F` type that the program remains agnostic of to be `IO`. But it could actually be any type that supports asynchrony and concurrency, since those are the only constraints we have for this program. Attributions ------------ The library being used here to fetch super newsItems is the [MarvelApiClientAndroid](https://github.com/Karumi/MarvelApiClientAndroid) from [Karumi](https://github.com/Karumi). Developed By ------------ * Jorge Castillo Prez - Twitter profile For more Functional Programming content applied to Android you can [have a look at my blog](https://jorgecastillo.dev) ‘ License ------- Copyright 2019 Jorge Castillo Prez 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.

近期下载者

相关文件


收藏者