%0 Journal Article %T 基于Android开发的组件化应用与实践
Componentization Application and Practice Based on Android Development %A 包晓安 %A 韦奇 %A 张娜 %A 徐璐 %J Software Engineering and Applications %P 379-389 %@ 2325-2278 %D 2019 %I Hans Publishing %R 10.12677/SEA.2019.86047 %X 针对当前Android应用开发存在协作开发冲突多、业务代码耦合高、开发效率低以及应用体量大等问题,本文提出一种组件化开发方案。通过IDE将项目划分成多个业务组件,各个组件间相互独立,并使用Gradle工具将开发模式调整为组件模式或集成模式。在组件模式下,基于单个组件进行编译调试;在集成模式下,整合所有组件生成最终APP。但是Android开发中常用的组件间通信路由框架功能复杂、体量较大,而且组件间相互独立易造成资源冗余,这会增加应用的体量,提高安装的流量成本。因此,提出一种新的轻量级组件间通信路由框架ERouter并结合资源压缩、选取轻量级第三方库等操作实现应用优化。本文以智慧宿管平台为例,以上方案有效地解决了应用开发中协作开发冲突多、代码耦合高、项目工程编译慢以及应用体量大等问题。
Aiming at the current problems of Android application development, such as conflicts in collabo-rative development, high coupling of business code, low development efficiency, and large appli-cation volume, this article proposes a componentized development solution. The project is divided into multiple business components through the IDE; each component is independent of each other, and the development mode is adjusted to a component mode or an integration mode using Gradle tools. In component mode, compiling and debugging are based on a single component; in integrated mode, the final APP is generated with all components integrated. However, the intercomponent communication routing framework commonly used in Android development is complex in function and large in volume, and the independence between components easily results in resource redundancy, which will increase the volume of the application and increase the cost of installation traffic. Therefore, a new lightweight inter-component communication routing framework ERouter is proposed, which combines resource compression and selection of lightweight third-party libraries to achieve application optimization. This article takes the intelligent dormitory manager platform as an example. The above scheme effectively solves the problems including many collaborative development conflicts, high code coupling, slow project engineering compilation, and large application volume in application development. %K Android应用开发,组件化开发,ERouter,应用优化,智慧宿管平台
Android Application Development %K Componentized Development %K ERouter %K Application Optimization %K Intelligent Dormitory Manager Platform %U http://www.hanspub.org/journal/PaperInformation.aspx?PaperID=33612