This thread tracks the evolution of Slack's mobile codebases, focusing on modernization efforts to improve app architecture, adopt industry trends, and lay the groundwork for future innovation. Initial posts detailed the Duplo initiative's goals of stabilizing, modularizing, and modernizing iOS and Android codebases. This post details the decision to move away from a shared C++ client library (Libslack) due to integration overhead and hiring difficulties, and the subsequent development of separate platform-specific codebases. LibSlack was designed to encapsulate common business logic and data handling, aiming for a 'LibSlack sandwich' architecture with platform UI on top, LibSlack logic in the middle, and a platform layer at the bottom for native capabilities. It focused on data caching, lazy loading, and offline functionality. The choice of C++ was made for its cross-platform compiler support and modern features. Djinni was used for generating cross-language headers, though it had performance costs and limitations with JavaScript. Development and debugging involved a reference client and a move to daily CI builds with source code integration for easier debugging. Unit tests achieved ~70% coverage and were gated on PRs, with integration tests also required. Future work included on-device performance testing.
All Slack trails