Code Reuse between Java']Java and Android Applications

被引:3
作者
Cheon, Yoonsik [1 ]
Chavez, Carlos, V [1 ]
Castro, Ubaldo [1 ]
机构
[1] Univ Texas El Paso, Dept Comp Sci, El Paso, TX 79968 USA
来源
ICSOFT: PROCEEDINGS OF THE 14TH INTERNATIONAL CONFERENCE ON SOFTWARE TECHNOLOGIES | 2019年
关键词
Code Reuse; Multiplatform Application; Platform Difference; Android; !text type='Java']Java[!/text;
D O I
10.5220/0007843702460253
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 multiplatform development environment consisting of platform-specific tools. 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 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.
引用
收藏
页码:246 / 253
页数:8
相关论文
共 19 条
[1]   On code reuse from StackOverflow: An exploratory study on Android apps [J].
Abdalkareem, Rabe ;
Shihab, Emad ;
Rilling, Juergen .
INFORMATION AND SOFTWARE TECHNOLOGY, 2017, 88 :148-158
[2]  
Ambler S., 1998, SOFTWARE DEV, V6, P30
[3]  
[Anonymous], 2014, PROC 11 WORK C MININ
[4]  
Bronsard F., 1991, S SOFTW REUS BOST MA, P19
[5]  
Brown AlanW., 2004, SOFTWARE SYSTEM MODE, V3, P314, DOI [DOI 10.1007/S10270-004-0061-2, 10.1007/s10270-004-0061-2]
[6]  
Cheon Y., 2019, P 2019 IEEE 17 INT C, P1, DOI [10.1109/SERA.2019.8886800, DOI 10.1109/SERA.2019.8886800]
[7]   Commonality and variability in software engineering [J].
Coplien, J ;
Hoffman, D ;
Weiss, D .
IEEE SOFTWARE, 1998, 15 (06) :37-+
[8]  
Durschmid Tobias, 2017, 2017 IEEE/ACM 4th International Conference on Mobile Software Engineering and Systems (MOBILESoft). Proceedings, P58, DOI 10.1109/MOBILESoft.2017.12
[9]  
Gamma Erich., 1994, DESIGN PATTERNS
[10]  
Gonzalez H., 2015, 8 EUR WORKSH SYST SE