Giter Club home page Giter Club logo

mvp_rxjava_retrofit's Introduction

MVP_RxJava_Retrofit

  本demo的整体上是用MVP+RxJava+Retrofit来实现的,充分的让activity的逻辑部分都放到了presenter里面,实现了逻辑与界面之间的分离,本例子的网络请求部分是用RxJava+retrofit这个组合来实现的,顺便对retrofit再次进行了异常封装,能够更好的用在自己项目中。当然这个demo目前还是有缺点的,其目前缺点如下:

  • 主要是此demo用presenter时没有把presenter与activity、fragment的生命周期进行关联,所以在fragment里面,presenter有可能回报空。
  • 由于此demo直接通过retrofit进行解析数据的,因此我们不能获取到json的格式,所以我们需要先把json格式搞清楚才能解析成功
  • gson解析失败后程序也能正常往下运行,所以当返回结果错误时要看一下gson是否解析正确

mvp_rxjava_retrofit's People

Contributors

lmh19941113 avatar

Stargazers

 avatar

Watchers

 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.