Giter VIP home page Giter VIP logo

blogs's Introduction

MVI-Clean-Architecture

This is a sample app & basic code that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach.

The trick of the project is to demonstrate best practices, provide a set of guidelines, and present modern Android Application Architecture that is modular, scalable, maintainable and testable, suitable for bigger teams and long application lifecycle management.

Flow

This app uses MVI (Model View Intent) architecture.

Coroutines VS RXJava

They're different tools with different strengths. Like a tank and a cannon, they have a lot of overlap but are more or less desirable under different circumstances. - Coroutines Is light wight threads for asynchronous programming. - RX-Kotlin/RX-Java is functional reactive programming, its core pattern relay on observer design pattern, so you can use it to handle user interaction with UI while you still using coroutines as main core for background work.

How does Coroutines concept work ?

  • Kotlin coroutine is a way of doing things asynchronously in a sequential manner. Creating a coroutine is a lot cheaper vs creating a thread.

When I can choose Coroutines or RX-Kotlin to do some behaviour ?

  • Coroutines : When we have concurrent tasks , like you would fetch data from Remote connections , database , any background processes , sure you can use RX in such cases too, but it looks like you use a tank to kill ant.
  • RX-Kotlin : When you would to handle stream of UI actions like : user scrolling , clicks , update UI upon some events .....ect .

What is the Coroutines benefits?

  • Writing an asynchronous code is sequential manner.
  • Costing of create coroutines are much cheaper to crate threads.
  • Don't be over engineered to use observable pattern, when no need to use it.
  • parent coroutine can automatically manage the life cycle of its child coroutines for you.

Features ๐ŸŽจ

  • list of the author's name and image.
  • Display the description, posts and detail of the author that the user select.

Modules ๐Ÿšง

Modules are the collection of source files and build settings that allow you to divide your project into discrete units of functionality.

  • App Module

    :app module is an com.android.application, which is needed to create the app bundle. It contains dependency graph and UI related classes. It presents data to screen and handle user interactions.

  • Base Module

    :base module contains only framework related base classes that is used in other modules

  • Common Module

    :common module contains code and resources which are shared between other modules

  • Data Module

    :data module contains implementation of repository and local - remote repository interface adapt

  • Domain Module

    :domain module contains use cases and repository interface adapt

  • Local Module

    :local module contains local data source related classes

  • Remote Module

    :remote module contains remote data source related classes

  • Presentation Module

    :presentation module contains business logic

Each module has its own test.

Tech Stack ๐Ÿ”จ

blogs's People

Contributors

mahmoudyehiashehata avatar

Watchers

Mahmoud Ibrahim 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.