Elsevier

Pervasive and Mobile Computing

Volume 39, August 2017, Pages 214-230
Pervasive and Mobile Computing

An empirical analysis of energy consumption of cross-platform frameworks for mobile development

https://doi.org/10.1016/j.pmcj.2016.10.004Get rights and content

Abstract

The increasing fragmentation of mobile devices market has created the problem of supporting all the possible mobile platforms to reach the highest number of potential users. One possible solution is to use cross-platform frameworks, that let develop only one application that is then deployed to all the supported target platforms. Currently available cross-platform frameworks follow different approaches to deploy the final application, and all of them has pros and cons. In this paper, we evaluate and compare together the current frameworks for cross-platform mobile development considering one of the most important aspect when dealing with mobile devices: energy consumption. Our analysis shows and measure how the adoption of cross-platform frameworks impacts energy consumption with respect to the native mobile development, identifies which are the most consuming tasks, and tries to define a final rank among all the different approaches. Moreover, we highlight future development necessary to improve performances of cross-platform frameworks to reach native development performances.

Introduction

Smartphones are rapidly becoming more and more present in everyday life of users. Thanks to their increasing computing capabilities and an ample set of different sensors, e.g., accelerometer, barometer, environmental thermometer, etc., smartphones play both the role of mobile workstations and of augmented devices, able to sense the environment and monitor user activities. Smartphones can be used for context awareness  [1], user activity recognition  [2], [3], health monitoring  [4], etc.

The variety of smartphones available on the market, in terms of, for example, models, vendors, cost, target users and available sensors, has accelerated the diffusion of these devices, since they reach all user needs. All these devices do not share the same operating system  [5], so, if market fragmentation introduced by vendors is a positive aspect from the consumer point of view, reducing the final cost for the users, it is a huge problem for developers.

Developers of mobile applications aim for a, as wide as possible, set of target users, i.e., customers. Considering a business application that has to be paid, a wider set of paying customers means higher earnings. Moreover, since several applications have medical purposes, e.g., ambulatory treatment of particular diseases  [6], [7], [8], excluding a set of possible patients depending on the operating system of their smartphone is a strong limitation.

Since all the operating systems currently used on mobile devices, i.e., Android, Apple, Windows Phone, Blackberry, etc., do not share any API or IDE or programming language, mobile development imposes a critical decision. Given that developers aim for the highest number of users, the choice to support only one particular mobile operating system, discarding the others, can dramatically reduce the target users of the application. On the other hand, supporting all the available operating systems deeply increases development costs, in terms of required time, people working on the application, required programming skills, etc.

To solve this problem, in the last few years, particular attention has been posed to frameworks for cross-platform mobile development. Many differences exist, and will be discussed in Section  3, but the underlying idea is to develop the application only once, using a framework specific language, e.g., Javascript or C++, and to deploy this application to all the operating systems supported by the framework. It is clear that, in this way, the required development time, skills and costs are drastically reduced.

Several authors analyzed these frameworks and highlighted the main differences. They used different criteria, as the supported devices and operating system, native APIs, accessibility of the created application, native user interface, etc.  [9], [10], [11], [12], [13], [14], [15], [16]. Considering all these analysis, one of the most important aspect when dealing with mobile computing and devices is completely missing, which is the main motivation of this work: the evaluation of energy consumption issues.

Energy consumption is one of the most important aspects that has to be considered when dealing with mobile development and applications  [17], [18], [19], [20]. In fact, if we consider for example the definition of ubiquitous computing by Mike Weiser  [21], one of the fundamental aspects is that technology must be invisible. Smartphones can be considered part of the so-called invisible technology, since they are always present in individuals’ every day life. But this invisible technology can become visible and even annoying if it requires to recharge the device several times during the day, interfering with people’s habits and lifestyle. Moreover, Wilke et al.  [22] have shown that mobile applications which drain device’s battery are soon rejected by the users.

The aim of this study is to analyze currently available cross-platform frameworks and to measure how their architecture impact energy consumption. The proposal and development of a new cross-platform framework is out of the scope of our research, but combining together experimental results and cross-platform framework architectures, we will highlight critical aspects on which future development should focus to increase framework performances.

The first result of this paper is the testbed applications used in the experiments.1 We measured the energy consumed by a set of very simple applications which cover all the features available in the most common applications. We created therefore two complete sets of applications (one for the Apple platform and one for the Android platform) which can be used as a benchmark to measure and compare performance of cross-platform frameworks. In particular, we measured energy consumed while retrieving and showing (or not) data from different sensors. Despite the results related to energy consumption, the developed applications can be used to analyze other interesting data about frameworks performance, e.g., response time, memory/disk usage, etc.

We used an external power monitor during the experiments, the Monsoon PowerMonitor, since it avoids problems caused by possible unknown and not measurable overhead, that could be generated by applications running in background on the smartphone and monitoring energy consumption, e.g., PowerScope  [11].

As discussed in Section  3, cross-platform frameworks for mobile development are very different in the way they produce the final application. Indeed, cross-platform applications can be very different from native applications. The main contribution of this paper is to investigate how the choice of a cross-platform framework affects energy consumption of the final application, comparing applications developed with different frameworks and native applications developed from scratch. In particular, we investigated the consumption of retrieving data from different sensors, e.g., accelerometer, light sensor, GPS, etc., since they are becoming very important in many mobile applications, and the consumption of updating (or not) the user interface.

The analysis identifies which are the most consuming tasks, and defines a final rank among all the different approaches. Moreover, both Android and Apple devices were considered, and several interesting results showed differences in performances of the same framework in the two different environments.

In particular, the main results showed by this analysis are:

  • applications developed using a cross-platform framework lead to an higher energy consumption, even if the framework generates real native applications;

  • to update the user interface represents the most expensive task, and it is the main cause of the increased energy consumption;

  • the same framework and application can have different performances depending on the platform where the application is deployed, meaning that it is not possible to derive a general ranking of the considered frameworks and approaches among all the mobile platforms;

  • the update frequency of data retrieved by sensors and their visualization heavily affects energy consumption, meaning that it is really important to take into consideration this aspect when dealing with sensor data.

However, in this paper we do not assert that the development of a good cross-platform framework is not possible, but current development of these frameworks is only at the beginning, and energy consumption improvement is a milestone for future development. This paper makes a step further in this direction, identifying which are the components, according to each particular class of framework, that have the highest impact on energy consumption, and therefore need to be improved.

Preliminary ideas about the analysis of power consumption due to the introduction of frameworks for cross-platform development appeared in  [23], but this paper contains a very limited discussion: the paper does not consider the Apple platform but only one Android device, and it tested only Phonegap and Titanium frameworks.

The paper is organized as follows: Section  2 explores the related works and the state of the art, Section  3 describes cross-platform frameworks classification, highlighting pros and cons of each approach. Section  4 describes experiments setup, whose results are reported in Section  5. Section  6 discusses the results obtained with the experiments and proposes some guideline for the development of more efficient frameworks. We finally conclude in Section  7.

Section snippets

Related works

Many research papers  [12], [13], [10], [14], [24] analyzed the development of mobile applications based on cross-platform frameworks. Heitkotter et al.  [10] evaluated frameworks considering licensing, documentation and support, learning success and the possibility to customize user interfaces. Palmieri et al.  [14] proposed a set of evaluation criteria, containing the programming environment and the APIs provided by each considered framework.

Charland and Leroux  [24] evaluated performances of

Frameworks classification

Frameworks for cross-platform development can be divided into four classes  [15]: the Web Approach, the Hybrid Approach, the Interpreted Approach and the Cross-Compiled Approach. This classification is very useful to understand the final results of the experiments, since each framework class deeply influences the performances of the deployed application.

The Web Approach (WA) consists of developing a web application, using HTML, CSS and Javascript, which can be accessed through the browser on

Methodology

In this section we provide details about the hardware and software setup used during the experiments described in this paper. In order to cover the wider set of devices and possible users, applications were deployed both for the Apple and the Android platforms. These two operating systems together cover about 96% of the mobile devices market  [5].

Experimental results

In this section, we report the results of the experiments. As already discussed, each experiment runs the application for two minutes, and each test was repeated three times. We then calculated the mean value of the “Consumed Energy” of the three runs and the standard deviation, denoted by ±n where nN. The “Consumed Energy” value returned by the PowerMonitor interface is measured in μAh and is the most representative value of power consumption, so it can be used to compare performances of the

Energy consumption

Data retrieved from the experiments discussed so far, leads to some considerations. An interesting case study is represented by the MoSync framework. As already explained before, this framework follows the Cross-Compiled Approach, meaning that it generates a real native application, translating the code into real native code. MoSync supports two programming languages, C++ or Javascript. We tested both the possibilities.

The experiments showed that the C++ implementation, when dealing with data

Conclusions

Market fragmentation due to the variety of existing mobile devices and to the availability of different operating systems have posed new important issues in mobile applications development, since mobile applications should reach the highest number of possible users.

To overtake this problem, cross-platform frameworks, that let develop one single application that is further deployed to each target mobile OS, are currently under development and analysis.

The main contribution of this paper is the

References (38)

  • A. Merlo et al.

    A survey on energy-aware security mechanisms

    Pervasive Mob. Comput.

    (2015)
  • G.D. Abowd et al.

    Towards a better understanding of context and context-awareness

  • L. Bao et al.

    Activity recognition from user-annotated acceleration data

  • M. Ciman et al.

    Stairstep recognition and counting in a serious game for increasing users’ physical activity

    Pers. Ubiquitous Comput.

    (2016)
  • W.S.J. Yong-Gyu Lee et al.

    Smartphone-based mobile health monitoring

    Telemed. e-Health

    (2012)
  • IDC Corporate USA, Smartphone OS Market Share, 2014....
  • A. Saldarriaga, J. Perez, J. Restrepo, J. Bustamante, A mobile application for ambulatory electrocardiographic...
  • J. Oresko et al.

    A wearable smartphone-based platform for real-time cardiovascular disease detection via electrocardiogram processing

    IEEE Trans. Inform. Tech. Biomed.

    (2010)
  • M. Ciman et al.

    Individuals’ stress assessment using human–smartphone interaction analysis

    IEEE Trans. Affective Comput.

    (2016)
  • M. Ciman, O. Gaggi, N. Gonzo, Cross-platform mobile development: a study on apps with animations, in: Symposium on...
  • H. Heitkotter et al.

    Evaluating cross-platform development approaches for mobile applications

  • J. Flinn, M. Satyanarayanan, Powerscope: a tool for profiling the energy usage of mobile applications, in: Proceedings...
  • S. Xanthopoulos, S. Xinogalos, A comparative analysis of cross-platform development approaches for mobile applications,...
  • I. Dalmasso, S. Datta, C. Bonnet, N. Nikaein, Survey, comparison and evaluation of cross platform mobile application...
  • M. Palmieri, I. Singh, A. Cicchetti, Comparison of cross-platform mobile development tools, in: Proceedings of the 16th...
  • R. Raj, S. Tolety, A study on approaches to build cross-platform mobile applications and criteria to select appropriate...
  • W.S. El-Kassas et al.

    Taxonomy of cross-platform mobile applications development approaches

    Ain Shams Eng. J.

    (2015)
  • L. Bloom, R. Eardley, E. Geelhoed, M. Manahan, P. Ranganathan, Investigating the relationship between battery life and...
  • A. Rahmati, A. Qian, L. Zhong, Understanding human–battery interaction on mobile phones, in: Proceedings of the 9th...
  • Cited by (47)

    • A comparative study on the energy consumption of Progressive Web Apps

      2022, Information Systems
      Citation Excerpt :

      The related work presented in this section shows a strong focus on the Android Native development approach. The studies concerning the energy consumption of MCPD approaches [9,10,42,43,54] have emphasized on aspects such as networking, sensors and different processing scenarios or benchmarks. Energy-related aspects of UI rendering and interaction scenarios of MCPD approaches are yet a research gap in the literature.

    • Systematic literature review of mobile application development and testing effort estimation

      2022, Journal of King Saud University - Computer and Information Sciences
    • Power profiling and monitoring in embedded systems: A comparative study and a novel methodology based on NARX neural networks

      2020, Journal of Systems Architecture
      Citation Excerpt :

      These components are the major factors when it comes to power consumption [26]. The smartphone contains other peripherals, but their power draw is considered to be marginal [88] and a part of the static power consumed by the device. For instance, the capacitive touch layer on the screen is considered to be consuming a marginal and static amount of power [89].

    • A mobile sensing and visualization platform for environmental data

      2020, Pervasive and Mobile Computing
      Citation Excerpt :

      Finally, we plan to investigate the tradeoff between sensing effectiveness and energy consumption in determining the best sampling frequency [31–34].

    View all citing articles on Scopus
    View full text