preface

On September 22, 2008, Google officially released the first Android phone. Apple first announced IOS at the MacWorld conference on January 9, 2007. The mobile application space has been evolving for more than a decade. According to App Annie’s latest Mobile Market report, the number of App downloads in 2020 will reach 218 billion, an increase of 7% year on year. According to Statista, the number of Apps on Google Play in 2020 is 3,148,932.

In the rapid development and competition of the mobile Internet, faster and higher quality delivery to users is obviously particularly important. But many products have been iterated for more than 10 years with the development of mobile Internet. In this process, the flow of personnel, the accumulation of technical debt and the renewal of technological ecology have produced a large number of legacy systems. Just like an old car with low displacement, no matter how big the road, no matter how skilled the driver, it is difficult to improve the speed when the system bottleneck of the vehicle itself is reached.

The legacy system

In past projects, we have encountered a large number of such legacy systems. These systems have the following characteristics.

  • Big mud ball architecture, millions of lines of code, more than 100+ developers
  • High internal coupling, code modification maintenance leads to a whole body, low quality
  • Slow compilation integration debugging, no automated testing, low development efficiency
  • Tech stacks are old, ancestral code, no one dares to touch

In this context, few teams choose to rewrite, of course, there is no good process management and methods, many rewrite and become new legacy systems. Some teams choose to refactor, but there are few methods and tutorials. Refactoring (2nd edition) is recommended here for basic refactoring techniques. Another book, The Art of Modifying Code, has many examples of developing based on legacy code. But for developers, the lack of more close to the actual mobile application project refactoring guidance and system methods. Many teams still haven’t addressed the root cause of the legacy system, relying only on continuous heap of people, a vicious circle.

CloudDisk Example

CloudDisk is a cloud storage application similar to Google Drive. The application has three core business modules: file, dynamic and personal center.

The project has been maintained for more than 10 years and currently has more than 100 useful developers. At present, the code is in a large module, about 30W lines, and it takes more than 10 minutes to compile. The team currently faces several major problems.

  1. Low development efficiency

Long compilation times and frequent code merge conflicts. Left with a huge technical debt, the team struggled to deliver demand

  1. Poor code quality

New issues are constantly modified, version testing is problematic, and there is no automated testing

  1. The release cycle is long

Often needs more than a month, the market feedback response is slow

We wanted to continue to address the issues the team encountered as the product iterated through an example of a condensed version of the legacy system that was closer to a real engineering project. From the aspects of architecture design and analysis, security reconstruction, basic ecological facilities, pipeline, compilation and construction, it introduces how to carry out continuous evolution step by step. We will share through articles and video demonstrations. I hope that through this series of articles, you can more systematically master the actual refactoring skills and landing methods in mobile application projects.

The outline

about

Welcome to the CAC Agile Coach public account. Wechat search: CAC Agile Coach.

  • Author: Huang Junbin
  • Blog: junbin. Tech
  • GitHub: junbin1011
  • Zhihu: @ JunBin