android-architecture

Introduction: Functional Android Architecture sample using Kotlin and Kategory
More: Author   ReportBugs   
Tags:

App Screenshot

This version of the app provides a complete functional architecture using Arrow.

  • Provide a basic Model-View-Presenter (MVP)
  • Provide complete architecture covering same features found on the mvp-clean samples but in a functional way.
  • Use tagless final style based on typeclasses for abstracting over implementation details.

How to contribute

Default branch is todo-mvp-kotlin-arrow-fp, following the mandatory branch naming for the Google architecture blueprints repo. To contribute, just open your PRs targeting that branch.

Some key points:

  • We want to cover the same use cases and replicate the same screens from the original repo (already implemented on this one by Google but under a basic Kotlin style). So we basically need to port those to a different architecture using Arrow.
  • We are completely free to remove/add layers, levels of abstraction or whatever, to compose the architecture the way we want. We just need to keep the user visible features as they are in terms of usage.
  • We must think about readability and clarity since the goal is to create a base blueprint for the android community to give them a point to start. We don't want to go for super fancy things or styles to showcase how powerful is Arrow, but instead for a "base functional android architecture" for reference. That would be my advice on this, after taking a deep look on what other samples are covering and the scope of the blueprints repo.
  • We must cover the same use cases on tests.
  • A good way to iterate over is to pick one activity and iterate over it, leaving the resting ones untouched. Once we agree on a given approach, we can move forward and port that to the resting activities. We can easily start by a leaf node on the navigation tree, like the AddEditTaskActivity which is used to add or edit an already existent task on the todo app.

Current status

Currently the app is just a copy of the todo-mvp-kotlin branch from the original repo, so we start working on top of it. Google suggested to use one of the existent branches to iterate over.

Relevant Dependencies

  • Kotlin stdlib
  • kotlin-android plugin
  • Arrow

Features

Complexity - understandability - resources

High: You need to have a good Kotlin knowledge and be aware of some functional concepts. For deeper details, please check:

Testability

  • Lets write here some concerns about testability and how we are approaching to them on this sample.
Apps
About Me
GitHub: Trinea
Facebook: Dev Tools