Need help with ArrowAndroidSamples?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

JorgeCastilloPrz
418 Stars 36 Forks 211 Commits 3 Opened issues

Description

Functional Programing Android architecture using http://arrow-kt.io/

Services available

!
?

Need anything else?

Contributors list

# 40,990
Java
Kotlin
polymor...
Shell
190 commits
# 35,171
Scala
Postgre...
polymor...
typecla...
8 commits
# 121,549
Kotlin
Shell
Android
bluetoo...
1 commit
# 182,708
Kotlin
CSS
Shell
1 commit

Arrow Android Samples

Build Status Kotlin version badge Arrow version badge

Functional Programing Android architecture approaches using Arrow.

How to import it

Since the project uses the News API 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 from Karumi.

Developed By

Twitter profile

For more Functional Programming content applied to Android you can have a look at my blog 👍

License

Copyright 2019 Jorge Castillo Pérez

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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.