Abstract

In order to let everyone can quickly for android componentization have a whole understanding, this article will from the multiple dimensions of some typical open source on the Internet componentization, comparing the development plan so as to better distinguish the characteristics of each modular solution, quick select suitable for their own use of in-depth study and use, in the interview asked when can also accomplish know fairly well.

preface


The concept of componentized development on Android platform has been very popular in recent years, and some students reported that they were frequently asked about it in interviews.

About modular development program on the Internet, open source library is more, many beginners feel confused, don’t know where to start, it is difficult to determine what kind of framework, its own business features suitable for use if all study again the cost is higher, and in the process of learning easier to remember some of the features of confusion of the program.

In order to let everyone can quickly for android componentization have a whole understanding, this article will from the multiple dimensions of some typical open source on the Internet componentization, comparing the development plan so as to better distinguish the characteristics of each modular solution, quick select suitable for their own use of in-depth study and use, in the interview asked when can also accomplish know fairly well.

Due to the limitation of space and individual effort, only selected the representative several modular scheme comparison, comparing the content of mistakes if you have, welcome to correct me, can leave a message in the comments or the issue and pr to me, and I together more perfect modular scheme contrast, reduce the difficulty of the developers to learn componentization technology.

Welcome to Watch and Star

Contrast table


The MarkDown syntax is not very friendly to table support, so a screenshot of the comparison table is posted below for your convenience. The detailed table is available on Github

👉 The picture on your mobile phone is not clear. Please click here for a larger picture

Related links to frames in the table


The serial number The name of the Related articles
1 CC wiki



CC framework Practice (1) : To achieve the function of logging in to the target interface after success



CC Framework Practice (2) : Componentization of Fragment and View



CC Framework Practice (3): Make jsBridge more elegant
2 Get DDComponentForAndroid Android complete componentization solution practice



Componentized design ideaOn Android componentization



Principle explanation articleAndroid complete componentization solution practice



Demo interpretation articleAndroid fully componentized demo released
3 ModularizationArchitecture Android Architecture Thinking (Modularized, multi-process)



ModularizationArchitecture tutorial
4 Ali ARouter Open source Best practices: Arouter, a page routing framework for the Android platform
5 Jumei componentization schemeDemo

(based onGather the Router)
The way of componentization practice of Jumei



Router: a routing framework supported by single products, components, and plug-ins
6 ActivityRouter ActivityRouter Routing framework: Use annotations to implement urls to start activities



Start the Activity with the URL

Brief introduction of other characteristic componentization schemes


  • 51 Credit card routing scheme OkDeepLink

    It was open source on the author’s Github account and has since been deleted. The author mentioned in the blog that the 2.0 version will be put on the company’s Github account, but it has not been released. There’s a fork version here

    This scheme uses aspectJ to implement automatic registration of routing tables, which is different from other schemes, but the authors of this scheme plan to scrap it because aspectJ is still too heavy

    This scheme is also mentioned in the article about routing security measures, including the use of SIGNATURE URL to shield illegal access, similar to the client to connect to the server HTTP request for parameter encryption verification

  • ModuleBus

    Introduction Document: Componentized development of cross-Module interaction –ModuleBus interaction

    What’s special about this solution is that it draws on the ideas of EventBus, where the registration/deregistration of components and the event sending of component calls are similar to EventBus

  • The routing solution is RouterKit

    What’s special about this scheme is its automatic component registration scheme: the routing table for each module is generated via APT and then copied to the assets directory of the app. During runtime, the asset directory is traversed to reflect the corresponding activity

  • Others (welcome to give me an issue or PR supplement!)

Added a little

Componentization of Android (Routing vs Component Bus)