Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gs-ts/BitfinexClient
An Android app written in Kotlin that demonstrates a clean architecture with MVVM, websockets using WebScoket client Scarlet, and RxAndroid/RxKotlin.
https://github.com/gs-ts/BitfinexClient
android android-architecture-components bitfinex bitfinex-api bitfinex-websocket-api clean-architecture databinding-android diffutil-recyclerview koin kotlin mvvm rxandroid rxkotlin scarlet viewbinding websocket
Last synced: 3 months ago
JSON representation
An Android app written in Kotlin that demonstrates a clean architecture with MVVM, websockets using WebScoket client Scarlet, and RxAndroid/RxKotlin.
- Host: GitHub
- URL: https://github.com/gs-ts/BitfinexClient
- Owner: gs-ts
- Created: 2019-05-01T15:08:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-04T09:20:07.000Z (about 4 years ago)
- Last Synced: 2024-08-03T17:10:54.088Z (6 months ago)
- Topics: android, android-architecture-components, bitfinex, bitfinex-api, bitfinex-websocket-api, clean-architecture, databinding-android, diffutil-recyclerview, koin, kotlin, mvvm, rxandroid, rxkotlin, scarlet, viewbinding, websocket
- Language: Kotlin
- Homepage:
- Size: 213 KB
- Stars: 18
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-kotlin-apps - BitfinexClient - ts](https://github.com/gs-ts) | An Android app written in Kotlin that demonstrates a clean architecture with MVVM, websockets using WebScoket client Scarlet, and RxAndroid/RxKotlin.</br></br> <b>Tech Stack</b> : Koin, RxJava, Testing, Scarlet, Room, Data Binding, LiveData, ViewModel </br></br> <i> Last commit: 3 years ago</i> | π 16 </br> π΄ 8 </br> ποΈ 2 | (:art: Pattern / MVVM)
README
# BitfinexClient
An android app that showing the details of the BTC/USD currency pair, at real-time:
- a summary (current price, price change, volume, low, high) - ticker
- a table with the order book---
### MVVM pattern with Clean architecture developed with Kotlin.
Clean architecture consists of three layers:
- **Data**, includes data objects, databases, network clients, repositories.
- **Domain**, includes use cases of business logic. This layer orchestrates the flow of data from Data Layer to Presentation and the other way.
- **Presentation**, includes UI related components, such as ViewModels, Fragments, Activities.Each layer has its own entities/models which are specific to that package. Mapper is used for conversion of one layer to another.
##### Android Jetpack Components used:
- Activity
- Fragment
- ViewModel
- LiveData
- View Binding (used to replace `findViewById` and synthetic binding)
- Data Binding (used for [Layouts and binding expressions](https://developer.android.com/topic/libraries/data-binding/expressions)), example: [binding expression](https://github.com/gs-ts/BitfinexClient/blob/master/app/src/main/res/layout/bitfinex_fragment.xml#L49)
- ActivityScenario, for instrumentation test (part of AndroidX Test)
- Espresso##### Libraries:
- [Koin](https://insert-koin.io/), an easy-to-use DI framework. [Nice comparison with Dagger](https://medium.com/@farshidabazari/android-koin-with-mvvm-and-retrofit-e040e4e15f9d)- [RxKotlin](https://github.com/ReactiveX/RxKotlin) / [RxAndroid](https://github.com/ReactiveX/RxAndroid), RxJava bindings for Kotlin / Android
- [Scarlet](https://github.com/Tinder/Scarlet), a Retrofit inspired WebSocket client, manages the client-server connection for you. It makes use of a StateMachine to handle WebSocket connection correctly. Developed by Tinder, and has been in production for more than one year.
- [OkHttp](https://square.github.io/okhttp/), an HTTP client for Android and Java applications
- [moshi](https://github.com/square/moshi), JSON library for Kotlin and Java
- [Timber](https://github.com/JakeWharton/timber), a logger which provides utility on top of Androidβs Log class
##### Screenshots:
Sources:
- [Google I/O 2018 app β Architecture and Testing](https://medium.com/androiddevelopers/google-i-o-2018-app-architecture-and-testing-f546e37fc7eb)
- [Clean Architecture of Android Apps with Practical Examples](https://rubygarage.org/blog/clean-android-architecture)
- [Clean Architecture Guide (with tested examples): Data Flow != Dependency Rule](https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29)