Coder Social home page Coder Social logo

mybasemvplibrary's Introduction

一个基于MVP模式的应用基础框架

此框架在之前自己总结的一套开发框架的基础上,加入了MVP模式,通过这个模式将View的更新展示操作和业务逻辑分割开来,这样可以使整个代码的可读性加强,化繁为简。

这个框架核心代码结构如下图:

框架结构图

  • baseadapter:里面是列表适配器的封装代码,通过这个可以使适配器代码看起来更简洁,此处代码是参考网上大神的总结而来;
  • baseui:里面是MVP模式的核心代码,以及ActivityCollections【视图集合类】和BaseApplication类;
  • httprequest:这里面会根据不同的项目自定制一些网络请求底层,这里就不上代码了,因为逻辑会因每个项目有不同的变化;
  • netstatus:网络状态监听类,集成在每个页面中,这样用户设备的网络状况一发生变化,就可以通知到页面做出相应的处理;
  • utils:这里面放置了各种工具类,详情可以看代码;
  • view:这里面放置一些自定义的视图控件。

mybasemvplibrary's People

Contributors

guxuewu avatar

Watchers

James Cloos 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.