Publication Date



Technical Report: UTEP-CS-19-50

An extended version of the paper to be presented at the 14th International Conference on Software Technologies (ICSOFT 2019), Prague, Czech Republic, July 26–28, 2019.


Java and Android applications can be written in the same programming language. Thus, it is natural to ask how much code can be shared between them. In this paper, we perform a case study to measure quantitatively the amount of code that can be shared and reused for a multiplatform application running on the Java platform and the Android platform. We first configure a development environment consisting of platform-specific tools and supporting continuous integration. We then propose a general architecture for a multiplatform application under a guiding design principle of having clearly defined interfaces and employing loose coupling to accommodate platform differences and variations. Specifically, we separate our application into two parts, a platform-independent part (PIP) and a platform-dependent part (PDP), and share the PIP between platform-specific versions. Our key finding is that 37%--40% of code can be shared and reused between the Java and the Android versions of our application. Interestingly, the Android version requires 8% more code than Java due to platform-specific constraints and concerns. We also learned that the quality of an application can be improved dramatically through multiplatform development.