Coder Social home page Coder Social logo

hamidrezaamz / magicalnews Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 266 KB

This repo is based on MVVM + Clean Architecture that contains some sort of android framework common technologies!

Kotlin 100.00%
android clean-architecture coroutines flow mvvm retrofit2 hilt room

magicalnews's Introduction

MagicalNews

This repo is based on MVVM + Clean Architecture that contains some sort of android framework common technologies!

Technologies

  • Flow and Coroutine
  • Room as Database
  • Hilt as dependecy injector
  • Retrofit as Api caller
  • Google GSON as json parser and convertor
  • Lifecycle for ViewModel and LiveData

Layers of Clean Architecture

In this repo I try to use clean principles. Let's take a look at Clean Architecture diagram.

1_02Ink_nKAVnzLS8NA3rm_A

Clean architecture is a method of software development in which you should be able to identify what a program performs merely by looking at its source code. The programming language, hardware, and software libraries needed to achieve the program’s goal should be rendered obsolete.

As you see we have 3 main layers: Presentation , Domain, Data

  • Presentation or APP: A layer that interacts with the UI, mainly Android Stuff like Activities, Fragments, ViewModel, etc. It would include both domain and data layers.
  • Domain: The domain layer contains all the use cases of your application.
  • Data: This has all the repositories which the domain layer can use. This layer exposes a data source API to outside classes.

Network API

In this project I use News API as backend provider. It is a simple, easy-to-use REST API that returns JSON search results for current and historic news articles published by over 80,000 worldwide sources.

Conclusion

As developer you can have your own layers and directories, the above project is just a sample of my View on Clean architecture.

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.