Git Product home page Git Product logo

mvp-dagger-retrofit-sample-app's Introduction

MVP-Dagger-Retrofit-Sample-App

This project demonstrates Model-View-Presenter pattern + Dagger + Retrofit usage in android.

Model–view–presenter (MVP) is a derivation of the model–view–controller (MVC) architectural pattern which mostly used for building user interfaces. In MVP, the presenter assumes the functionality of the “middle-man”. In MVP, all presentation logic is pushed to the presenter. MVP advocates separating business and persistence logic out of the Activity and Fragment.

Dagger 2 is dependency injection framework. It is based on the Java Specification Request (JSR) 330. It uses code generation and is based on annotations. The generated code is very relatively easy to read and debug.

Retrofit is type-safe REST client for Android and Java which aims to make it easier to consume RESTful web services.

Following notable libraries have been used in this project

  1. Retrofit 2 for API interaction
  2. Dagger 2 for dependency injection.

I have used Dagger SubComponents to pass dependencies down in dependency graph.

Some nice articles for learning Dagger 2 :

  1. Dependency Injection with Dagger 2- CodePath
  2. Dependency injection with Dagger 2 - the API
  3. Introduction to Dagger 2, Using Dependency Injection in Android: Part 2
  4. An Introduction to Dagger 2 (Android DI) – Part 1

Happy Coding!!

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.