Scaling Slack’s Mobile Codebases: Modularization

This post details the 'Modularization' phase of the Duplo initiative for Slack's mobile codebases. It explains the strategy of breaking down app targets into smaller, independent modules (Features, Services, Libraries) on both iOS and Android to reduce interdependencies, decrease build times, and allow for independent development. Key benefits such as improved build times, clearer code ownership, and disentangled dependencies are discussed. On iOS, the adoption of Bazel as the build system is highlighted as crucial for modularization and performance gains, including the shift from dynamic to static library linking. The post also covers the use of code generation for creating new modules, managing CoreData models, and handling feature flags. The Android modularization strategy, including its module types and dependency injection approach with Dagger, is also outlined.