Giter VIP home page Giter VIP logo

android-cleanarchitecture's Introduction

Android-CleanArchitecture app

An Android app designed using Clean Architecture and MVP.

Description

This is an Android app designed for learning Clean Architecture and MVP patterns.

Architecture

The code is divided in 3 layers, Data, Domain and Presentation. The Domain is structured following the main premises of Clean Architecture. The app follows the dependency inversion principle using the protocol oriented approach that Java has on its foundations. The app has unit test for each layer.

Domain

On this layer belongs all the classes which main concern is handling the business logic of the app. Here you will see all the interactors (user cases) implementations as well.

- Entities

On this group you will find the enterprise business rules to be consumed by the app. Encapsulates the most general and high-level rules. They are the least likely to change when something external changes.

- Interface adapters

This is a set of adapters that convert data from the format most convenient for the use cases and entities, to the format most convenient for some external agency. Presenters and Controllers belong here.

- Use Cases

The code in this layer contains application specific business rules. Each use case is represented by a protocol, the internal implementation is separated from the interface. Having a protocol per Use Case enforces the Single Responsibility Principle, facilitates unit testing and improves traceability. The objects on this group relies on the entities and the services via interfaces (to preserve dependency inversion principle) and returns the data using DTOs to avoid exposing the entity layer and to model the data in a convenient way to be consumed by the App.

Presentation

The objects in this layer have the responsibilities described in the MVP architectural pattern. The Presenter relies on the UseCases to get the data and model in a convenient way to be shown in the UI.

Data

This layer retrieves all data that is needed in the app through a UserRepository implementation. With this implementation the data origin is transparent for the client.

License

©2017 Globant.

android-cleanarchitecture's People

Contributors

capraber avatar emilioqglobant avatar fanky10 avatar matiaslev avatar

Watchers

 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.