Code Monkey home page Code Monkey logo

androidrecenttask's Introduction

AndroidRecentTask

模拟微信多个小程序在概览屏幕中可见的效果,加入了一些设计模式相关的实践,由于是个小DEMO,有点过度设计的味道。

在安卓设备上 微信中打开小程序后返回,可以在最近使用的程序概览中查看到打开过的小程序,如果是打开普通的服务号公众号则不会,应该是微信在不同的子程序容器的启动配置做上做了处理。

  • 加入动漫《火影忍者》的元素,以几个影级别的忍者代表有特殊能力的小程序,几个普通上忍中忍代表普通的服务号公众号。
  • 项目中分为配置模块,忍者工厂模块,分工明确,低耦合,符合单一职责原则。
  • 不同的忍者使用不同的工厂方法实例化,业务层只需要和具体的忍者工厂接触。不依赖具体的生产逻辑,符合依赖倒转原则。
  • 忍者以及具体的工厂都用相应的接口和抽象类约束,各模块只和接口交互,面向接口编程,符合里氏代换。同时不同的接口分工明确,接口分离。
  • 配置模块涉及到多个初始化入参的配置,采用builder模式提升代码的优雅程度。
  • 一些npe等代码鲁棒性相关的判空操作,已收敛到基类中。

androidrecenttask's People

Contributors

gyappy avatar

Stargazers

Anuchit Singkhornart avatar

Watchers

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