All Projects → AweiLoveAndroid → Applicationhelper

AweiLoveAndroid / Applicationhelper

Licence: apache-2.0
快速解耦Application的逻辑,教你实现Application的隔离型框架

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Applicationhelper

Memorize
🚀 Japanese-English-Mongolian dictionary. It lets you find words, kanji and more quickly and easily
Stars: ✭ 72 (-35.14%)
Mutual labels:  application
Prevue
🎨 All in One Prototyping Tool For Vue Developers.
Stars: ✭ 1,278 (+1051.35%)
Mutual labels:  application
Awesome No Login Web Apps
🚀 Awesome (free) web apps that work without login
Stars: ✭ 1,326 (+1094.59%)
Mutual labels:  application
Stickynotes
A Sticky Note Application
Stars: ✭ 74 (-33.33%)
Mutual labels:  application
Lisk Core
📟 Lisk blockchain application platform
Stars: ✭ 79 (-28.83%)
Mutual labels:  application
Laravel Electron
Making Laravel desktop application using Electron Js
Stars: ✭ 89 (-19.82%)
Mutual labels:  application
Touch Bar Preview
💻 Touch Bar Preview is a tiny app to display your designs on the MacBook Pro's Touch Bar.
Stars: ✭ 69 (-37.84%)
Mutual labels:  application
All In One
👔 Health care application for reminding health-todo lists and making healthy habits every day.
Stars: ✭ 109 (-1.8%)
Mutual labels:  application
Beagle Im
XMPP client for macOS based on TigaseSwift XMPP library
Stars: ✭ 86 (-22.52%)
Mutual labels:  application
Ds With Pysimplegui
Data science and Machine Learning GUI programs/ desktop apps with PySimpleGUI package
Stars: ✭ 93 (-16.22%)
Mutual labels:  application
Reactype
🧪 Prototyping Tool for exporting React/Typescript Applications!
Stars: ✭ 1,203 (+983.78%)
Mutual labels:  application
Quick Screen Recorder
Lightweight desktop screen recorder for Windows.
Stars: ✭ 80 (-27.93%)
Mutual labels:  application
Nanoleaf Desktop
A modern desktop application for the Nanoleaf Aurora and Canvas
Stars: ✭ 90 (-18.92%)
Mutual labels:  application
Autohotkey Script Open Show Apps
AutoHotkey script to open, restore or minimize, Window's and Chrome's Apps using hotkeys
Stars: ✭ 73 (-34.23%)
Mutual labels:  application
Yii Base Web
Stars: ✭ 102 (-8.11%)
Mutual labels:  application
Snipit
Snipit allows you to capture and save interesting sections from any source of information. Be it textbooks, journals, computer screens, photographs, flyers, writings on a whiteboard, etc.
Stars: ✭ 70 (-36.94%)
Mutual labels:  application
Txt
A simple, private writing app.
Stars: ✭ 88 (-20.72%)
Mutual labels:  application
Desktop
Go/HTML/CSS/JS Desktop application scaffold.
Stars: ✭ 109 (-1.8%)
Mutual labels:  application
Oscp Prep
my oscp prep collection
Stars: ✭ 105 (-5.41%)
Mutual labels:  application
Contentajs
A nodejs server that proxies to Contenta CMS and holds custom code.
Stars: ✭ 90 (-18.92%)
Mutual labels:  application

ApplicationHelper


快速解耦Application的逻辑,教你实现Application的隔离型框架。当你的项目的Application中要用到很多初始化操作的时候,这个库就能派上用场。目前这个库只针对普通项目,对于组件化或者插件化还没做测试,目前不适用于组件化或者插件化,后续慢慢完善吧。

详细介绍请看我的博客: 一行代码快速解耦Application逻辑,让Application更简洁好维护


【前言】很多人在开发中使用了大量的第三放的库,或者自己封装的库,很多库都是需要在Application里面配置的,如果配置过多,导致Application过于臃肿,代码不好维护,可读性比较差。下面是我写的一个简单的库,帮你快速解耦Application,让你的Application显得更简洁,更好维护。

1.首先来一张调用的图,如下,是不是很简单:

调用方式


2.下面看一下ApplicationHelper这个类做了什么事情:

这是一个单例的类,调用init方法传入上下文,然后调用init开头的方法,比如initNetWork()就表示初始化网络操作的一些逻辑。

ApplicationHelper这个类简单介绍


3.ApplicationHelper实现了IInitMethods接口,这个接口主要用来规范有哪些逻辑要处理,它是初始化的所有方法的顶层接口,用于规范有哪些逻辑需要做,比如网络库,图片库等。

IInitMethods接口


4.ApplicationHelper类调用了InitWrapperImpl这个类,通过InitWrapperImpl.getInstance()返回一个实例对象,然后调用了init(mContext)方法,传入一个上下文,最后调用execute(XX,XX,XX)执行库的初始化的具体操作。

InitWrapperImpl这个类的一个简单说明


5.InitWrapperImpl这个类里面用到了常量类Contants,主要保存type类型,和库的名字的信息。

常量类Contants


6.InitWrapperImpl这个类它是实现了IInitWrapper接口,规范了具体的执行过程公用的一些接口方法。

IInitWrapper接口


到此,这个库基本就介绍完了,是不是很简单?赶紧用起来吧。

觉得不错的朋友们 ,给个star支持一下吧。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].