Giter Club home page Giter Club logo

agustiyann / android-clean-architecture Goto Github PK

View Code? Open in Web Editor NEW
60.0 3.0 9.0 646 KB

:zap:Sample Android App with Clean Architecture ( 3 layers ) Modular Project, MVVM pattern, Coroutine Flow, Koin etc...

License: Apache License 2.0

Kotlin 100.00%
clean-architecture mvvm coroutines-flow koin koin-injection anime room-database navigation-component modularization architecture datasource android robert open-source kotlin flow android-clean-architecture-sample android-clean-architecture-kotlin

android-clean-architecture's Introduction

Android Clean Architecture

agustiyann GitHub GitHub last commit

What is Clean Architecture?

Clean Architecture is a software engineering development architecture created by Uncle Bob (Robert C. Martin). The essence of this architecture is separation of concern. So that we can read the code in the project more easily.

In addition, the main idea of ​​using Clean Architecture is to produce a system that is Independent of Framework, Testable, Independent of UI, Independent of Database, and Independent of External. This is an overview to represent Clean Architecture suggested by Robert C. Martin:

Use this pattern in an Android project

In a typical android project it is divided into 3 layers like this:

  • Presentation Layer contains the UI and Presenter / ViewModel which will control the views. This UI will depend heavily on the Use Case.
  • Domain Layer contains Entities, Use Case, Repository Interface. This is the most core layer and is associated with business processes.
  • Data Layer contains Repository Implementation and DataSource which can be Local DataSource (database) and Remote DataSource (network).

Modularization

Modularization is a technique of breaking an Android project into sections called modules. With modularization we will get a lot of advantages over implementing the monolith (only one part) in our project.

Tech stack & Open-source libraries

  • Kotlin based, Coroutines + Flow for asynchronous.
  • Koin for dependency injection.
  • Jetpack Libraries
    • LiveData - notify domain layer data to views.
    • ViewModel - UI related data holder, lifecycle aware.
    • Room Persistence - construct a database using the abstract layer.
  • Architecture
    • MVVM Architecture (View - DataBinding - ViewModel - Model)
    • Repository pattern
  • Glide - loading images.
  • Retrofit2 & OkHttp3 - construct the REST APIs and paging network data.
  • Gson - JSON representation.
  • Timber - logging.
  • Material-Components - Material design components.
  • Leak Canary - memory leak detection library for Android.
  • Security
    • SQLCipher - protecting data.
    • ProGuard - disguise the code so that it is difficult to read by others after reverse engineering.
    • Certificate Pinning - secure connection from mobile to server.
  • Lottie - displays animation in JSON format.
  • Shimmer - create a shimmer effect on the application.

License

   Copyright 2020 Agus Tiyansyah Syam

  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.

android-clean-architecture's People

Contributors

agustiyann avatar devdoyes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.