Abstract

Software developers, including those of the Android mobile platform, constantly seek to improve their applications’ maintainability and evolvability. Code smells are commonly used for this purpose, as they indicate symptoms of design problems. However, although the literature presents a variety of code smells, such as God Class and Long Method, characteristics that are specific to the underlying technologies are not taken into account. The presentation layer of an Android app, for example, implements specific architectural decisions from the Android platform itself (such as the use of Activities, Fragments, and Listeners) as well as deal with and integrate different types of resources (such as layouts and images). Through a three-step study involving 246 Android developers, we investigated code smells that developers perceive for this part of Android apps. We devised 20 specific code smells and collected the developers’ perceptions of their frequency and importance. We also implemented a tool that identifies the proposed code smells and studied their prevalence in 619 open-source Android apps. Our findings suggest that: 1) developers perceive smells specific to the presentation layer of Android apps; 2) developers consider these smells to be of high importance and frequency; and 3) the proposed smells occur in real-world Android apps. Our domain-specific smells can be leveraged by developers, researchers, and tool developers for searching potentially problematic pieces of code.

Highlights

  • IntroductionAndroid is a Linux-based mobile development platform launched in 2008 by Google in partnership with several companies (Alliance 2007; Google 2017)

  • Android and its Presentation LayerAndroid is a Linux-based mobile development platform launched in 2008 by Google in partnership with several companies (Alliance 2007; Google 2017)

  • We investigate the following research questions (RQ): RQ1: What code smells do developers observe in the presentation layer of Android apps?

Read more

Summary

Introduction

Android is a Linux-based mobile development platform launched in 2008 by Google in partnership with several companies (Alliance 2007; Google 2017). In early 2011, Android became the leading mobile platform, having reached more than 87% market share in 2017. IOS, is only used by Apple’s products, totaling approximately 30 different models (Wikipedia 2017), Android is used by more than 24,000 different models of mobile devices according to a survey conducted in 2015 (OpenSignal 2015). This research focuses on analyzing elements related to the presentation layer of Android apps. We reviewed the official Android documentation for the presentation layer (Google 2016), from which we identified the following components: Activities, Fragments, Adapters, and Listeners

Objectives
Methods
Results
Discussion
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call