


The code best suited to move into the cross-platform library is the business logic and data handling. For example, LibSlack’s threading library is implemented using GCD on iOS and thread pools on Android, allowing us to better integrate with platform thread management. In addition, we want a base platform layer to take advantage of native functionality such as networking support, background tasks, and efficient threading. Which parts of the application code should be shared across platforms? Where is native code necessary, and where can common platform-independent code be used? We still want Slack to have a great native look and feel, so the UI layer should remain platform code and take advantage of platform APIs. Moving shared code into a platform independent library can greatly reduce development effort and improve consistency and quality across platforms. In addition, the same bug could arise on different platforms and have to be fixed multiple times, and there was inconsistent behavior of the same feature between the platforms - for example, lists of users had a different sort order in different clients. But it also meant that any time a new feature was added it had to be implemented multiple times, once for each platform. Slack’s initial approach of developing each platform client independently made sense at the time - it allowed platform engineers to quickly develop in the native languages for each platform, without any dependencies on other projects or platforms. This post covers the problems we are trying to solve, some challenges we have faced, and the tools and techniques we have used to solve them. There have been some bumps in the road and changes of direction as we developed the early versions of LibSlack, and as we tried to figure out ways to make it most useful to the client applications.

Sharing common code between different platforms has many benefits but also presents challenges.
#Windows slack client android
LibSlack is currently in use in the Slack iOS and Android apps, with a plan to expand to other platforms. About a year ago, Slack formed a new team, LibSlack, to develop a cross-platform C++ library to encapsulate common functionality and integrate it into client apps. Initially these different platform applications were developed independently at Slack, with separate teams and codebases for each of the mobile platforms and the desktop. Slack ships its client application on many different platforms - we currently support Mac, Windows, Linux, iOS, Android, and Windows Phone.
