Like and follow, no longer get lost, your support means a lot to me!

🔥 Hi, I am Ugly. This article has been collected by GitHub · Android-Notebook. Welcome to grow with Peng Chouchou. (Contact info on GitHub)


preface

  • Componentization is the basis for the sustainable and high-quality development of the entire App. In recent years, the industry has been actively exploring and practicing the direction. In the process of deeply understanding the componentization architecture, you will constantly test the depth and breadth of your technology.
  • In practice, I also refer to the solutions of more than a dozen technical teams (such as Meituan, Youzan, Ali, etc.). In this series, I will summarize my thinking and practice on componentization. Please be sure to like and follow if you can help, it really means a lot to me.

Daco solution reference

1 have praise micro store IOS end

  • It points out the basic evolution of business modularization: “chaos” -> “intermediary model” -> “decentralization”
  • The communication requirements between modules are sorted out: UI page jump, action execution and complex data transmission, one-to-many notification broadcast;
  • “Copy and paste code” -> “Sink to common”

2. Have praise micro store Android terminal

  • Five adjustment directions are proposed: abstract basic module, public service decentralization, service of business module, abstract basic component, single/multi-module packaging
  • Introduces the landing scheme based on 3 basic component dependencies and 1 Gradle plug-in

Mogujie App

  • The implementation of inter-component communication is mentioned: URL hop, protocol sink (there needs to be a common place to hold the public protocl), implicit Intent
  • Component lifecycle management was mentioned: listening for system notifications, manually traversing calls in ModuleManager
  • Component versioning and continuous integration experiences are mentioned

4. Get the App

  • Component life cycle, service registry implementation are mentioned
  • The common layer defines component services and the Base layer defines common resources
  • Implementation code/resource isolation from runtimeOnly is mentioned;
  • The debugging, switching and intelligent configuration functions of JIMU plug-in are mentioned.
  • Two ways to invoke the component declaration cycle are mentioned: Javassist and Reflection;
  • Mentioned solutions for initializing components in order: StartUp, DAG

5. Ctrip App

  • The use of a data bus or URL bus for page and function hopping is mentioned
  • Mentioned the custom Gradle plugin to customize the packaging

6. Alipay App

  • A Quinox client framework based on Bundle and mPaaS package plug-in is introduced to solve the problems of modularization and dynamics.
  • – Mentioned the solution to duplicate resource ids: modify AAPT to specify a different packageId for each Bundle;

7. Hand tao App

  • Mentioned the hidden dangers of hand tao All In (juhuasuan.com, Tmall, lottery) scheme: performance, reuse, stability;
  • Mentioned how the container framework Atlas works;

8. Iqiyi App

  • The disadvantages of using services to communicate across process components are mentioned;
  • The function and core principle of componentized cross-process communication framework Andromeda are introduced.

9. WeChat App

  • Mentioned the evolution of wechat architecture: simple layered architecture -> multi-process architecture -> multi-sub-project parallel development architecture;
  • – Mentioned the centralization of infrastructure projects: more and more code/events are “naturally” sinking into infrastructure projects;
  • Three goals of modularization are proposed: changing communication mode, redesigning modules, and constraining code boundaries
  • The communication mode of service registration is proposed
  • A novel method of interface exposure is proposed: change the file suffix to.api(With include_with_api)
  • Module lifecycle: Dependency (), configure(), execute()
  • Pins engineering structure is designed to constrain code boundary
  • The considerations of componentization: dynamics and isolation are put forward

10. Meituan App

  • Modular – Event is designed as a component message bus
  • A componentized routing framework WMRouter is designed

The resources

The Componentized Architecture of Android. By King Cang

Yizan Technical team:

Qiezi: How can a mobile app with likes Create “Arbitrary Gates” on a Page

Qiezi, Youzan Weimall — A Componentization Solution for Android

Modular Architecture Design Practices for Mobile iOS by Jackie

Tencent Technology Team:

Practice of refactoring Android modular architecture on wechat, by carlguo

Alibaba Technical Team:

Do you know how to build the container structure of Alipay? – milk cover

Atlas- The past life and future Road of Handamoy componentized Framework – by Handamoy team

Meituan Technical Team:

Evolution of container Architectures for Takeout Clients. By Sai Tong Guo and Hong Xu

“Android componentization scheme and Component Message bus Kaji-Event Combat” — written by Hai Liang

The Evolution of The Android Message Bus: Replacing RxBus and EventBus with LiveDataBus. By Liang Hai

“WMRouter: Android Open Source Routing Framework for Meitutakeout” by Zijian Erudan Yun Chi

Meituan Maoyan Android Modular Combat – Probably the most detailed Modular Combat ever – by Happylion_Heart

Iqiyi Technical Team:

Andromeda Parsing, a componentized cross-process communication framework for Android. By WanderingGuy

Get technical team:

The Release of a Fully componentized Android Demo. By Bamboo Lattice

Complete componentization of Android — Code and Resource isolation. By Bamboo Lattice

Componentization: Sequential Initialization of Components without Code Isolation. By Leo Bert-Lan

On Componentization of Android, by Zhang Mingqing

Ctrip Technical team:

Ctrip mobile App Architecture Optimization journey by Chen Haoran

Mogujie Technical Team:

The Componentization of Mogujie App. By Limboy

The Road to Componentization of Mogujie App, Continuation. By Limboy

Other:

Understanding Android componentization/Modularization! “– said the moving turtle

Ideas and Practices of Componentized Development for Android. By Popular _Linda

Here are some Things I Don’t know How to Say about Modularity on Android

Componentization of Android, by Hua Yang Zhang

Analysis of componentized Architecture of Mushroom Street, Didi, Taobao and wechat by Liu Xiaodu

Practice of Componentized Android Business Development by Tao Zhang, KYmJS

Implementing Module API for Android by Tyhj


Recommended reading

  • Cryptography | is Base64 encryption algorithm?
  • Interview questions | back algorithm framework to solve problems
  • The interview questions | list questions summary algorithm
  • Computer network | graphic DNS & HTTPDNS principle
  • Say from Android Android | : text to TextView process
  • Android | interview will ask Handler, are you sure you don’t look at it?
  • Android | show you explore LayoutInflater layout analysis principle
  • Android | View & fragments & Window getContext () must return to the Activity?

Thanks for liking! Your “like” is the biggest encouragement to me! Welcome to attentionPeng XuruiThe lot!