All Projects → cobeisfresh → Cleanarchitecture Android Showcase

cobeisfresh / Cleanarchitecture Android Showcase

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Cleanarchitecture Android Showcase

Mosbymvi
Model-View-Intent (MVI) sample app built in Kotlin with Mosby, RxJava and RxBinding
Stars: ✭ 57 (-34.48%)
Mutual labels:  clean-architecture
Githubprojectbrowser
This is a sample Android Project that is based on Clean Architecture
Stars: ✭ 64 (-26.44%)
Mutual labels:  clean-architecture
Sample Code Movies
This repository contains sample code. Its purpose being, to quickly demonstrate Android and software development in general, clean code, best practices, testing and all those other must know goodies.
Stars: ✭ 81 (-6.9%)
Mutual labels:  clean-architecture
Aspnet Core Clean Arch
It is a clean architecture project template which is based on hexagonal-architecture principles built with .Net core.
Stars: ✭ 60 (-31.03%)
Mutual labels:  clean-architecture
Vue Shopping Clean Architecture
Shopping cart app demonstrate clean architecture
Stars: ✭ 60 (-31.03%)
Mutual labels:  clean-architecture
Blockked
Blockked - blockchain.info companion (and educational) app for Android
Stars: ✭ 69 (-20.69%)
Mutual labels:  clean-architecture
Tdcapp
Sample app which access the TDC (The Developer's Conference) REST API.
Stars: ✭ 55 (-36.78%)
Mutual labels:  clean-architecture
Android Mvp Architecture
MVP + Kotlin + Retrofit2 + Dagger2 + Coroutines + Anko + Kotlin-Android-Extensions + RX-java + Mockk + Espresso + Junit5
Stars: ✭ 82 (-5.75%)
Mutual labels:  clean-architecture
Android tmdb clean architecture
Showcase of clean architecture concepts along with Continuous Integration and Development for modular Android applications. Includes test suits (functional and unit tests) along with code coverage.
Stars: ✭ 63 (-27.59%)
Mutual labels:  clean-architecture
Telegraph Android
Telegraph X is Android client for Telegra.ph minimalist publishing tool (made by Telegram team) that allows you to create and manage publications
Stars: ✭ 78 (-10.34%)
Mutual labels:  clean-architecture
Pinboard Kotlin
Unofficial Pinboard android app, developed as a playground to study many topics related to Android. Kotlin + Coroutines + MVVM
Stars: ✭ 60 (-31.03%)
Mutual labels:  clean-architecture
Lady Happy Android
Open Source multi-module app for Handmade Hats company with modern approaches under the hood.
Stars: ✭ 60 (-31.03%)
Mutual labels:  clean-architecture
Dotnet Template Onion
Onion Architecture with .NET 5/.NET Core and CQRS/Event Sourcing following a DDD approach
Stars: ✭ 70 (-19.54%)
Mutual labels:  clean-architecture
Stocktradetracking
A showcase for modularized MVVM Architecture for Android, powered by Kotlin Coroutines and Clean Architecture.
Stars: ✭ 60 (-31.03%)
Mutual labels:  clean-architecture
Clean Architecture Components Boilerplate
A fork of our clean architecture boilerplate, this time using the Android Architecture Components
Stars: ✭ 1,241 (+1326.44%)
Mutual labels:  clean-architecture
Go Restful
🚀 A real world production-grade RESTful Web Services proof-of-concept project.
Stars: ✭ 58 (-33.33%)
Mutual labels:  clean-architecture
Event Sourcing Castanha
An Event Sourcing service template with DDD, TDD and SOLID. It has High Cohesion and Loose Coupling, it's a good start for your next Microservice application.
Stars: ✭ 68 (-21.84%)
Mutual labels:  clean-architecture
Swift Design Patterns
🚀 The ultimate collection of various Software Design Patterns implemented in Swift [Swift 5.0, 28 Patterns].
Stars: ✭ 85 (-2.3%)
Mutual labels:  clean-architecture
Monolith Microservice Shop
Source code for https://threedots.tech/post/microservices-or-monolith-its-detail/ article.
Stars: ✭ 83 (-4.6%)
Mutual labels:  clean-architecture
Basekotlinandroid
Base Project Android with Kotlin and MVVM
Stars: ✭ 74 (-14.94%)
Mutual labels:  clean-architecture

Purpose of the project

Purpose of this project is to showcase an example of Android application architecture with focus on Clean Architecture. It also provides a useful template that all future projects should implement in order to achieve better consistency among them.

Table of contents:

  1. Why clean?
  2. Implementation
  3. Layers
  4. App
  5. Domain
  6. Data
  7. Libraries

Why Clean architecture

There are few well-known arhitectural patterns like MVC, MVP or MVVM that provide elegant solutions to separating application's UI code from the rest of the project. While in some cases it can be enough, we wanted to create a consistent architecture throughout whole application and not only in the presentation layer.

How is it implemented

Clean architecture onion diagram Onion diagram above is Uncle Bob's well-known representation of Clean Architecture and it is the basis for this showcase project.

Layers / modules

As you can see on the diagram above application's code is separated into 4 layers. We will represent these 4 layers as 3 modules in our project, merging Entities and Use Cases from the diagram into one Domain layer. Project structure is then divided into:

  • app module
  • domain module
  • data module

To wire it all up and to manage dependencies inside our codebase we are using Koin dependency injection framework.

App module

We have left default name for this one. This module contains all of the code related to the UI/Presentation layer. This includes things like Activities, Fragments and ViewModels.
We'll use MVVM arhitectural pattern to separate our UI from the rest of the app. Presentation layer is built using Android Architecture Components: ViewModels, Lifecycle and LiveData elements.

Domain module

Domain module contains application's business logic. This is the core part of every app and it should be clear what project is all about just by looking at these files/classes. This module should also be independent of any framework. That's why it is the innermost layer in Uncle Bob's onion diagram. Following the dependency inversion rule this module shouldn't depend on anything from app or data module. We will hold our Use Cases and business models in this module. We'll also store repository abstractions in this module. This allows us to communicate with the rest of the application following The Dependency Inversion Principle.

Data module

Data module holds all concrete implementations of our repositories and other data sources like databases or network, split into corresponding packages. Every data source holds its own model classes. Every model class that is going to be saved into the database or is going to be used in the domain layer should implement DomainMapper and RoomMapper and their respective methods in order to prepare data for the next layer. This step will help us filter out data that is not valid or may not be used further in the app.
To cache our data locally we are using Google's Room Persistance Library.
We are also using Retrofit for network requests and Gson for parsing json responses.

Third party libraries

License: MIT

Created by COBE Copyright 2019 COBE

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].