Giter Site home page Giter Site logo

dmo60 / mad Goto Github PK

View Code? Open in Web Editor NEW

This project forked from freeletics/khonshu

0.0 1.0 0.0 1.34 MB

Modern Android Development - The Freeletics way

Home Page: https://freeletics.github.io/mad

License: Apache License 2.0

Shell 0.59% Kotlin 99.41%

mad's Introduction

Modern Android Development - The Freeletics Way

At Freeletics use many of the Jetpack/AndroidX libraries but we don't always use them in the way they are advertised in Google's tutorials. This project show cases our own flavored version of Modern Android Development as well as some of our own utilties.

This repository is a work in progress. More will be added over time.

StateMachine

StateMachine is a very simple interface to implement a StateMachine with the concept of emitting state through a StateFlow and receiving input actions to mutate that state.

For an example on how to build such a state machine check out FlowRedux. To connect a StateMachine to a user interface you can look at Renderer for the Android View world. In compose the StateMachine can be observed using collectAsState() and actions can be dispatched to it by simply launching them from a CoroutineScope created with rememberCoroutineScope().

implementation 'com.freeletics.mad:state-machine:0.2.0'

TextResource

TextResource is a domain specific model to represent text. Abstracts text whether it a localized String sent by the backend, a simple Android string resource (with or without formatting args) or an Android plurals reosurce. This way business logic with text can be easily tested without requiring Context and running on a device.

For more information about the motivation for this abstraction check out this blog post.

implementation 'com.freeletics.mad:text-resource:0.2.0'

License

Copyright 2021 Freeletics GmbH.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.