• Stars
    star
    426
  • Rank 101,884 (Top 3 %)
  • Language
    Kotlin
  • Created almost 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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.

More Repositories

1

AndroidFillableLoaders

Android fillable progress view working with SVG paths. This is a nice option too if you want to create an interesting branding logo for your app. Based on the iOS project: https://github.com/poolqf/FillableLoaders
Java
1,996
star
2

FABProgressCircle

Material progress circle around any FloatingActionButton. 100% Guidelines.
Java
1,250
star
3

ExpandablePanel

Android library for creating an expandable to full screen view inside a viewgroup composition.
Java
422
star
4

hiroaki

Write idiomatic API integration tests using Kotlin (Unit and Instrumentation)
Kotlin
370
star
5

AndroidColorX

AndroidColorX is a library to provide color utilities as Kotlin extension functions.
Kotlin
316
star
6

Dagger2Scopes

Dagger 2 sample app implementing multiple scopes. Clean arquitecture.
Java
152
star
7

AndroidKodeinSample

Android Scoped DI using Kodein. Sample repo for https://caster.io/
Kotlin
68
star
8

Corleone

Java annotation processor to dispatch and concatenate background tasks through a simple syntax.
Java
46
star
9

ScalaForTheImpatient

Project created to learn Scala basics by solving all the scala exercises proposed by the book.
Scala
27
star
10

ComposeFillableLoaders

Port of AndroidFillableLoaders library to Jetpack Compose.
Kotlin
19
star
11

ShenronAPI

Dragon Ball character rest API written in Scala using Play framework
Scala
13
star
12

JetpackComposeAndInternals

The ultimate Jetpack Compose online course. Created and delivered by Jorge Castillo.
JavaScript
13
star
13

Lifecolors

Android camera app to pick colors by clicking on the image and infer complimentary color palettes.
Kotlin
9
star
14

ComposeConstraintLayoutSamples

Backup repo for a series of posts in https://jorgecastillo.dev
Kotlin
7
star
15

GetAPet

Pet adoption Android app currently under active development.
Kotlin
6
star
16

ConwaysGameOfLife

An implementation of Conway's Game of Life in Kotlin using Arrow
Kotlin
6
star
17

FlutterFabLoader

Flutter loading spinner to wrap a FloatingActionButton.
Dart
5
star
18

android-dev-challenge-compose

Android Dev Challenge Week 2
Kotlin
4
star
19

jorgecastilloprz.github.io

Personal blog https://jorgecastillo.dev
CSS
3
star
20

AndroidLintDocs

Gather all the possible knowledge about Android Lint in a single place.
Kotlin
3
star
21

DigitalNomadWallpapers

Flutter sample app gathering digital nomad, remote work and developer desktop setup wallpapers
Dart
2
star
22

LibGDXSampleGame

Sample game playground using LibGDK
Kotlin
2
star
23

ElectronSample

Basics on how to prepare the environment to build electron apps
JavaScript
2
star
24

SupportFragmentLifecycleTests

Basic lifecycle test project to double check some lifecycle calls ordering when a support fragment is replaced.
Kotlin
1
star