Giter Club home page Giter Club logo

android-sniped's Introduction

Android SNIPED · ⚠️ deprecated

Build Status Coverage License

Introduction

SNIPED (Screens Navigators Interactors Presenters Entities with Dependency injection, etc...) is a clean architecture approach to Android application development using the MVP Model-View-Presenter pattern.

It is an evolution of the popular MVP (Model View Presenter) pattern with influences from the VIPER (View Interactor Presenter Entity Router) architecture on iOS.

💡 Why

The objective of the project is to empower Android software engineers by providing them with a framework built around best practices proven to work for building readable and highly maintainable applications.

Similar to what the Angular framework brought into the web development worlds with its set of standards for application building blocks, SNIPED plans to improve the coding quality in the Android space by introducing a common understanding for structuring an application and modeling its components.

The end goal is to maximize the maintainability and testability, therefore the quality of the software product.

⚙ How

It emphasizes the idea of building software with testable pieces that are easily identifiable, serve a specific and obvious purpose, and fit together with each other in a logical manner.

SNPIED describes well defined sets of building blocks that are common to complex, maintainable and testable applications and promotes clean coding where entire features can be quickly added by simply replicating these parts and implementing them with the necessary logic.

It does this by defining 6 main building blocks common to every application:

  • 📱 Screens (Views)
    Contain UI logic and are the part usually responsible for calling Android SDK code. They display what the Presenter decides, delegate user actions back to the Presenter and inform it about their state.
    → Views should be plain, simple and contain no business logic.

  • 🏁 Navigators
    Small, single purpose components defining the navigation between Screens together with the data passed in between.
    → While still using the Android SDK, these classes have the purpose of extracting the navigation logic from the view and enabling Presenters to handle it.

  • 🎮 Interactors
    A class for every particular use case, these are responsible for fetching or modifying data and abstracting away the data sources. Presenters request data from Interactors and delegate operations on data as a result of user actions. Multiple Interactors can be operated by higher level Interactors, E.g.: when performing authentication, which could involve multiple back-end calls, data caching and additional processing.
    → Contain only business logic and have no knowledge of the View, or the View about them.

  • 🎬 Presenters
    The main bridge between the user (interface and interaction) and the application logic. Presenters ask interactors for content and process it before passing it to the view. On the other hand, when user interaction is involved, presenters will be in charge of acting upon the events and delegating the business logic, usually to the Interactors.
    → Contain business and view logic, connecting the two worlds, yet without any references to the Android framework.

  • 👥 Entities
    Models which are managed by Interactors usually through repositories.
    → Primarily contain data or simple getters and setters.

  • 🎁 Dependency Injection
    Everything is tied up together with a smart and well defined dependency injection approach to enable rich testability.

Getting Started

TODO: Guide users through getting your code up and running on their own system. In this section you can talk about:

  1. Installation process
  2. Customizing
  3. Software dependencies
  4. API references
  5. Project Structure
  6. Architecture
  7. Coding Style

Build and Test

TODO: Describe and show how to build your code and run the tests.

To Do

  • Add short intro and explain the meaning behind the S.N.I.P.E.D. name
  • Completely integrate Flipper
  • Migrate to AndroidX
  • Fill in base documentation
  • Document project structure and idea
  • Document adding a new feature
  • Add examples (As git branches ?)
  • Replace Gson with Moshi
  • Use Android Architecture components and the MVVM pattern
  • Add example with KOIN instead of Dagger2
  • Add CLI/Templates (?)
  • Add Yeoman generator
  • Add medium post & media resources (youtube video?)
  • Add example with Kotlin Coroutines instead of RxJava2 for Retrofit2

Changelog

TODO: Add link to changelog file

Contribute

TODO: Add link to CONTRIBUTING.md

License

Distributed under the MIT license. See LICENSE for details.

android-sniped's People

Contributors

ovitrif avatar

Stargazers

 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.