background
As an important branch of Android client technology, componentization has been the direction of active exploration and practice in the industry in recent years. The various Android development teams in each big factory are also trying and practicing different componentized solutions, and there are many high-quality outputs in the componentized communication framework. This article mainly introduces our componentization solution, hoping to inspire students who are engaged in Android componentization development.
Why componentize
In recent years, why do so many teams practice componentization? What benefits can componentization bring to our projects and codes? We believe that componentization can bring two biggest benefits:
1. Improve component reusability
Some people may think that it is very simple to improve the reusability, directly make the code that needs to be reused into an Android Module, package the AAR and upload the code warehouse, then this part of the function can be easily introduced and used. But we feel that this is not enough. Whether the AAR library uploaded to the warehouse can be easily reused needs to be restricted by componentized rules, so as to improve the convenience of reuse.
2. Reduce the coupling between components
We need to split the code into different modules through the rules of componentization, and the modules must be highly cohesive and low-coupling. The modules cannot be called directly either, which requires the support of the component communication framework. Reducing the coupling between components can bring two direct benefits:
1. The code is easier to maintain
2. The bug rate of the module is reduced
How to achieve componentization
The issues that need to be considered in order to achieve componentization mainly include the following:
- Code decoupling. Disassembling and decoupling a huge project is a very time-consuming and labor-intensive work, but it is also the most basic and important step
- Data transfer. Each component may be provided to other components, the main project and the component, the data transfer between the component and the component
UI jump. - The life cycle of the component. Life cycle of component loading, unloading and dimension reduction
- Integrated debugging. How to compile components on demand during the development phase? There may be only one or two components involved in the integration during a debugging, so the compilation time will be greatly reduced and development efficiency will be improved.
- Code isolation. How to prevent coupling.
The following is the most comprehensive advanced Android component enhancement practical manual on the entire network, covering the entire Internet company. Due to space limitations, not all content will be displayed. Only screenshots can be displayed. The complete content has been organized into a PDF document.
Friends, if you need the "Advanced Android Componentization and Strengthening Practical Combat" manual, click me to get it~
The first chapter Android componentization
The difference between
componentization and modularization The difference between componentization and plug- inization
The advantages of componentization development
Business logic layer
The problems encountered in componentization development
Solve the problems from componentization actual combat
Android componentization basis
...
Chapter 2 A Preliminary Catalogue of Android Componentization
Componentized demonstration case
Overview
Modularization and componentization
Componentized Demo
component application and library dynamic switching
...
WanAndroid APP componentized project actual combat with demo
version update
renderings
Main functions
Project directory structure
Main open source framework
...
Chapter 3 Architecture Evolution (Dachang Chapter)
- Looking at the practice of
componentized architecture from the Zhixing Android project . Reasons and goals of
componentized adjustments. Overall planning of
componentized architecture adjustments. Some problems encountered in componentized architecture adjustments.
- Get App
Android completely componentized demo released
JIMU user guide
. Feelings of componentized split
...
-
WeChat App
WeChat Android Modular Architecture Reconstruction Practice
WeChat Android Architecture History
Why WeChat Reconstruction
...
-
Mogujie App
Mogujie App's componentized realization method
Component lifecycle management
Shell engineering
Problems encountered
Continuous integration
Peripheral facilities
...
-
Service-based IPC communication of iQiyi App
The core appeal of componentized cross-process communication
Andromeda
architecture analysis
...
-
US Mission App
takeaway client container architecture of the evolution of
the US group takeout container architecture panorama
takeaway across the end of the container construction
takeaway page container building
measure takeout container architecture of
takeaway container architecture of the surveillance operation and maintenance
publishing capabilities takeout container of architecture
...
Meituan Android component solution and component message bus modular-event actual combat Meituan Android message bus evolution road: Replace RxBus, EventBus
WMRouter with LiveDataBus: Meituan takeaway Android open source routing framework Meituan Maoyan
android modular combat-may be the most Detailed modular combat
- Ctrip App
Ctrip Mobile App Architecture Optimization Tour
...
-
Alipay App
Quinox Introduction
Bundle Introduction
Resource Management
Containerization
...
-
Atlas-What is Atlas, a componentized framework for hand-shopping ?
The birth of componentization.
Decoupling and dependency
. Evolution of performance
...
-
Youzan Micro Mall
Overview of Component Transformation
Implementation Plan
Practical Application Case
...
to sum up
After componentization, the code structure is very clear, and the hierarchical structure and the interaction between them are very clear. Anyone in the team can easily draw the code structure diagram. This was impossible before, and each The compilation time of the components has been reduced from 10 minutes to tens of seconds, and the work efficiency has been greatly improved. The most important thing is that after decoupling, each time the development needs, the code faced is less and less. Code baggage can be said to have reached the ideal situation of "the less code you write".
If you are an Android developer, it is very necessary to learn componentization, and a deep understanding of the actual combat of componentization is the most important thing.
Due to space reasons, this advanced Android componentization practical manual has been organized into a PDF document. If you need a complete document, please like + comment [1] to get the information for free!
This article has been included in the open source project: https://github.com/Android-Alvin/Android-LearningNotes , which contains self-learning programming routes in different directions, interview questions/faces, and a series of technical articles. The resources are continuously updated …