Slack succeeded in its effort to bring its iOS and Android apps up-to-date and adopt new design trends with enabling a full switch to Swift for iOS.

During the renovation of their iOS and Android apps, Slack engineers had to face the reality of two several year-old codebases that had grown organically and accumulated a significant tech debt over time, explains InfoQ.  After the rejection of the idea to completely rewrite and reuse their code across platforms, they decided for a complete refactoring.

Hence, this decision made customers migrate their legacy code and re-architect the apps in place, while keeping the app shippable and continuing development of new features.

To accomplish their result, the Slack engineers devised three different goals:

  • stabilizing their codebase to get rid of the tech debt;
  • modularizing the apps into separate components;
  • modernize their design and tech-stack commitments.

Stabilization

On iOS, it included rewriting in Swift the remaining parts of the app that were still written in Objective-C. According to Slack engineers, the coexistence of Swift and Objective-C code in the same project made compilation slower and impacted performance, but mostly hindered the adoption of new Swift language features.

They also had to rewrite some code that accessed Core Data directly and make it use their own Core Data-based persistent framework, which improved performance and stability.

On Android, most of the work aimed to split a couple of monoliths used for networking and database access.

What is more, the Slack team adopted the repository pattern, which made it easier to support smarter caching and improve performance. A key factor in the stabilization phase was tracking progress using clear metrics.

Modularization, aimed to carve a number of components out of the two existing monoliths. This effort reduced interdependencies and build times, which had grown larger with the codebase.

Slack engineers provided more thorough information on the original post from where you can get the full picture.

Tags: , , , , , , , , , , , , , , , ,
Nikoleta Yanakieva Editor at DevStyleR International
java2days conference link

Most popular in DevStyleR

Broadcom announces plans to buy VMware in $61 billion deal
Update One

Update One

10 May, 2022
Gameloft

Gameloft

9 May, 2022
Droxic

Droxic

27 April, 2022
Tarya Fintech Bulgaria