Android componentization: how do we learn and use componentization?

Preface

Last week, I shared an article about Android componentization ↓↓↓
A preliminary exploration of Android componentization [including Demo]
Later, I saw a friend in the evaluation area expressing their views on the knowledge point of "componentization".

I think what this friend said is very reasonable. Today I want to discuss with you the knowledge point of "componentization".

Why do we need to carry out componentized development?

Here is an article recommended: Why do component-based development?

Here is a brief talk for friends who are afraid of trouble. There are many disadvantages in a single project development model, and the following pain points are often encountered:

  • Any modification and debugging of the project must compile the entire project, which is very inefficient
  • Not conducive to multi-person team collaborative development
  • Inability to reuse functions
  • Serious coupling between business modules
  • Not conducive to the maintenance of later project functions and iterative development

The above problems have seriously affected the development efficiency and quality of our team, so the author strongly recommends component development.

This article describes the advantages and disadvantages of single project development and component development, these are some insights in the actual work process. It should be noted that we don't want to componentize for the sake of componentization, we have to decide based on the actual situation. If the benefits of componentization far outweigh the development of a single project, then you should boldly use componentized development solutions.

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. The life cycle of component loading, unloading and dimensionality 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 the occurrence of coupling.

The above questions are why everyone feels good when they hear "componentization", but they feel so difficult when they go into battle.

The following is an introduction to the advanced Android component enhancement practical manual compiled by an Ali P8 boss who stayed up all night. It contains a summary of his many years of component development experience and pitfalls.

( This information contains demos and analysis of many big projects. If you just need it, you can like this article, and then leave a message "666", private message me to get it )

The first chapter Android componentization first familiar directory

  • The difference between componentization and modularization
  • The difference between componentization and plug-inization
  • Advantages of component development
  • Business logic layer
  • Problems encountered in component development
  • Solve the problem from componentized actual combat
  • Android componentization foundation
  • ……

Chapter 2 Android Componentization Preliminary Directory

  • Componentized demonstration case
    Overview
    Modularization and componentization
    Componentized Demo
    component application and library dynamic switching
    ...
  • WanAndroid APP component 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 and release
    JIMU user guide
    . Feelings of componentized split
    ...

  • WeChat App
    WeChat Android Modular Architecture Reconstruction Practices
    WeChat Android Architecture History
    Why Reconstruct WeChat
    ...

  • Mogujie App
    Mogujie App's componentized realization method
    Component life cycle management
    Shell engineering
    Problems encountered
    Continuous integration
    Peripheral facilities
    ...

  • IQIYI App
    Service-based IPC
    communication The core appeal of component-based cross-process communication
    Andromeda
    architecture analysis
    ...


  • The evolution of the containerized architecture of the Meituan App food delivery client The
    panorama of the Meituan food delivery containerized architecture Panorama
    Takeaway cross-end container construction
    Takeaway page container construction
    Metrics of the
    takeaway containerized architecture The monitoring, operation and maintenance of the
    takeaway containerized architecture The release capability of the takeaway containerized architecture
    ...

  • Meituan Android componentization solution and component message bus modular-event actual combat
    ...

  • The evolution of Meituan's Android message bus: Replace RxBus, EventBus with LiveDataBus
    ...

  • Ctrip App

  • Alipay App

  • ……

The above is the 209 pages of Android componentized and strengthened actual materials compiled by Ali bosses who stayed up all night. Friends who need it, click the card below to get the complete document.

Those in need can directly click the blue font here to get the complete document.

Recommended learning methods

In fact, although component-based learning is not easy, it is not difficult, mainly due to the following three points:

  • Theory ducking
  • Look at the source code more
  • Consolidation in actual combat

Combine the information compiled by this big guy to elaborate . The first is to read the principle knowledge of componentization in the book, first practice Qi to build the foundation, and then study the "Training Secrets" (Advanced Android componentization and strengthening actual combat data), look at the details of the componentization department in the supporting source code, start to build up the core Handwritten code according to the actual combat project, practice more, fight monsters and upgrade, and finally transform the spirit.

"Look at the source code", "Handwritten code"... These can't just talk about it. Only thinking about technology without understanding the principle is like water without a source, a tree without a root, and there is no way to achieve long-term development. "It's always shallow on paper, and I absolutely know how to do it." You just don't do it. All you know are the thoughts that stay in your head. You never know what unexpected BUGs will appear in actual combat.

Listening to my advice, there is no future for Android programmers who are only proficient in CV. When you can't work overtime, your value in the company will be squeezed out. Only the end is eliminated.

to sum up

The most valuable part of this information is the actual combat project.

The theoretical part of the textbook is enough, but the actual analysis is difficult to find. Reading this information is just talking to the big guys, and I believe you must have gained a lot.

PS: In addition to learning, this information can also be used as an interview book. There are many component analysis of large projects. I believe you will be able to talk about it when you face the interviewer again after reading it.

Finally, I hope you all work smoothly, no bugs, no overtime, no working friends, smooth interviews, and constant offers.

Those in need can directly click the blue font here to get the complete document.

Guess you like

Origin blog.csdn.net/weixin_49559515/article/details/112276617