Towards end-user development of REST clientapplications on smartphones
Gebremariam Mesfina, Tor-Morten Grønlib, Dida Mideksoc, and Gheorghita Ghineab,d
aAddis Ababa University, , Addis Ababa, Ethiopia
bWesterdals Oslo ACT,Faculty of Technology, , Oslo, Norway
cAddis Ababa University, , Addis Ababa, Ethiopia
dBrunel University,, London, UK
Abstract
Our previous work on the evaluation of a small cross-platform Smartphone application showed that its usability remains unaffected on the respective native platforms and the SDKs require only minimal configuration effort for adaptation. However, the evaluation process needs to be scaled up by incorporating higher level REST-based cross-platform application. The literature indicates that HTML5 can be used to develop client applications by composing REST web services within the context of Web 2.0. However, the possibility of implementing cross-platform Smartphone applications with REST services needs to be studied.In the study underlying this paper, we developed a REST-basedcross-platform application with PhoneGap. The application was deployed on the Android, Windows Phone, and iOS platforms; subsequently we evaluated its usability. The evaluation was conducted focusing on the developer’s adaptation effort to native platforms as well as on the end users.Accordingly, we observed that REST-based cross-platform Smartphone applications can be implemented with HTML5 and PhoneGap, which can be scaled-up into a REST service composition (web mash-up) tool. In addition, the usability of the application remains unaffected on the native platforms and adaptation required only minimal effort, mainlyfor the configuration of the respective SDKs.
Keywords: REST service; Usability; PhoneGap; Android; Windows Phone; iOS; Service Composition; Smartphone; Cross-platform
1.Introduction
Smartphones playa very important role in life, being used in education, healthcare, and business, to name but a few application areas. smartphones may be described as mobile phones with increased capabilities, such as touch screen, intelligence and alertness. For the purpose of this study, we consider smartphonesto boast features as described in (Liane, 2013);hence we define smartphones as mobile phones that are capable of accessing the Internet and of running a variety of mobile operating systems such as Google’s Android, Microsoft’s Windows Phone, and Apple’s iOS.
On top of the operating system, smartphones are equipped with software development kits (SDKs) that enhance the characteristics of smartphone application software and configurations such as reusability, and interoperability.Smartphone applications themselves can broadly be categorized into native and cross-platform basedon the software development environments they are produced from. Native applications belong to one category of smartphone applications that are written and developed for a specific operating system. They have unhindered access to device hardware and support all user interface and interactions available in the respective mobile operating environment (William, 2013).Cross-platform applications, on the other hand, can be dedicated mobile web applications, generic mobile web applications (also called mobile websites), and hybrid applications (William, 2013).
In this study, by cross-platform we understandthose dedicated mobile web applications which are designed to mimic the native applications of the host operating system but actually execute on a web browser. Such applications are implemented based on a web browser, using fundamental web technologies - HTML5, JavaScript, and Cascading Style Sheets (CSS).
Cross-platform smartphone applications can also be REST-based applications implemented by composing (mashing-up) REST web services. The REST web servicebelongs to the family of service-oriented architecture (SOA) implementation technologies. It is a client-server architecture designed to make HTTP-based stateless communication between the components of a composite application using URIs (Fielding, 2000).In terms of productivity and time to market, cross-platform smartphone applications are preferred to native ones. However, cross-platform smartphone applications are challenged by limitations in the user experience when deployed on native platforms(William, 2013).
Usability is defined in (ISO, 1998) as the extent to which a product can be used by specified users to achieve specified goals with effectiveness, efficiency and satisfaction in a specified context of use. Evaluating the usability of REST-based cross-platform smartphone applicationsis also of paramount importance.Accordingly, in this paperwe evaluate the usability of REST-basedcross-platform smartphoneapplications on their respective deployment operating platforms, which is an extension of our previous work(Gebremariam et al., 2014).
The paper is structured as follows. Cross-platform smartphone application development, REST-based application development, and issues related to usability oriented implementations with HTML 5 are discussed in sections 2, 3 and 4 respectively. A concrete comparison of usability of a REST-based cross-platform application on different platforms is presented in section 5. In section 6 we discuss our findings;finally, we draw our conclusions in Section 7.
2.Cross-platform Smartphone Applications
Smartphone operating systems are rich in libraries and built-in features. However, they still have to match and create a consistently high user experience, irrespective of the fact that their basic architecture and support of programming languages varies. Studies such as that of Henning, Sebastian, and Tim (2013)make the point that the proliferation of a fragmented smartphone market with multiple operating platforms makes the development of native mobile applications a challenging and costly endeavor. To improve this, the literature and industry envision cross-platform development approaches.
The essence of cross-platform environments is a subset of the software development environments aiming at building platform independent applications. Cross-platform application development environments work based on the general principle of “write once, and run everywhere”. In the smartphone application development, Dalmasso et al. (2013) described the general architecture available to cross-platform mobile application development tools. However, as pointed out by Henning, Sebastian, and Tim (2013), the diverse hardware and software platforms inevitably make portability a hassle for mobile application developers. Portability primarily depends on runtime support and the feasibility of achieving identical look-and-feel and functionality across platforms.
There are several attempts of implementations of cross-platform smartphone application development environments. For example, Java ME supports cross-platform development through configurations and profiles. Damianos and Daphne (2011) describe a configuration as the minimum Java VM features and library set for devices with similar processing and memory limitations, user interface requirements, and connection capabilities, while a profilecomprises libraries specialized in the unique characteristics of a particular device class.
In related work, Grønliet al. (2013) investigated the strengths and weaknesses of the mobile application development ecosystem and pointed out that developer support has improved the performance of developer tools which providea higher level abstraction of performance-critical third party libraries. However, cross-platform development environments are being challenged by the different implementations, immature platform support, as well as by the variety of devicesand browsers;in contrast, platform-specific ones like Windows Phone, iOS, and Android benefit from being tightly integrated with their respective operating system. Moreover, the work of Grønli et al.(2013) showed that there is better integration between the development environment and deployment devices on the platform-specific ones than that of the cross-platform environment. This indicates that the cross-platform application development is in its early stages.
Studies (Damianos and Daphne, 2011; Henning, Sebastian, and Tim, 2013; Isabelle et al., 2013) showed that cross-platform development tools are flourishing; they aim at addressing user experience, stability of framework, ease of updating, cost of development for multiple platforms, and the time to market of an application. When realized, the interests of many developers would be satisfied in terms of releasing applications for major mobile platforms and provide a consistent user experience across the platforms with minimal or no change to the original code. PhoneGap, Rhomobile, JQuery Mobile, and Xamarin are some of the cross-platform mobile application development tools available.
In the work described in this paper, we employ PhoneGap because of its popularity(Isabelle et al., 2011; Manuel, Inderjeet, and Antonio, 2012). PhoneGap is an open source cross-platform smartphone application development tool developed by Adobe Systems Inc. under the Apache license. It provides a toolbox for building native mobile applications using only HTML5, JavaScript and CSS (Isabelle et al., 2011; Manuel, Inderjeet, and Antonio, 2012). PhoneGap is quite popular among users mainly because of its flexibility, straightforward architecture and ease of use. Its architecture is mainly composed of the Web application, PhoneGap, and the operating system, along with native Application Programming Interfaces (APIs - Fig. 1).
Fig. 1. Interfacing Layers of the PhoneGap Architecture
PhoneGap is a “wrapper” that allows developers to enclose applications written in known programming languages into native applications (Manuel, Inderjeet, and Antonio,2012). That is, applications developed using PhoneGap are neither purely web-based and nor purely native and thus some layout rendering is done via web-view instead of the native language of the operating system; consequently there is a lack of support of HTML in some functions. PhoneGap does not provide its own IDE(integrated development environment) to develop applications, but developers have to write the source code with an IDE and port their code into other IDEs such as the Eclipse for Android and XCode for iOS. Thus far, PhoneGap permits the creation of applications for Windows Phone, Android, iOS, Bada, Symbian, and the WebOS operating systems.
In general, PhoneGap and other cross-platform development tools leverage device capabilities with the help of JavaScript APIs and generate the HTML code for presentation. However, the resulting code needs to be ported into specific operating systemslike the Windows Phone, Android, and iOS so that they behave like native applications. In the following section, we provide an overview of these operating systems and their corresponding integrated development environments.
2.1. Windows Phone
Windows Phone is the smartphone operating systems advocated by Microsoft. In the latest versions of Windows Phone, smartphone applications are written in managed code by frameworks that support multiple languages such as C# from the Microsoft.NET environment. Windows Phone is primarily built with the Windows Phone SDK together with Silverlight and XNA add-ons on Visual Studio. XNA is employed for 2D and 3D games development while Silverlightis used to develop powerfuland engaging interfaces.Programs created for Windows Phone are encapsulated into XAP files, which are packaged Silverlight applications(Grønli et al., 2013).
2.2. Android
Android is based on the Linux kernel and developed as an open source system platform. In addition to the operating system, Android provides a development environment to write managed code with Google’s Java libraries, and the Dalvik Virtual Machine for the smartphone applications to run on (eLinux, 2014).
The development environment enables rich multimedia, theuse of 2D and 3D graphic libraries, a customized SQL engine for persistent storage, and 3G, 4G and WLAN network capabilities (Grønli et al., 2013).Eclipse and IntelliJ IDEA are two main vendors of software development tools for Android.
2.3. Apple iOS
iOS is an operating system for many of Apple’s devices including the iPhone. Its applications are written in an object-oriented programming language called Objective-C, which is an extension of the C language; they use a library called Cocoa Touch. Development for iOS requires a computer or a VMware running Mac OS. Xcode (Apple, 2013)is the most commonly used integrated development environment to write iOS applications. It includes an editor, analysis tool, iOS simulator, and the SDK (Grønli et al., 2013). Recently the release of a new programming language from Apple, Swift, may lead to changes in the platform, but for the time being both Objective-C and Swift are equally supported.
To summarize, the cross-platform applications development approach makes a significant contribution to the productivity of mobile application developers. However, achieving an identical look-and-feel as well as an identicalfunctionality of applications (including REST-based ones) across target native platforms still needs to be clarified through further work - which we address in this paper.
3.REST-based Cross-platform Smartphone Applications
A REST web service, introduced by Fielding (2000), is a client-server architecture designed to make stateless communication with HTTP and includes the following set of principles:
─Conceptual entities and functionalities are modeled as resources identified by universal resource identifiers (URIs).
─Resources are accessed and manipulated via standardized HTTP operations (GET, POST, PUT and DELETE).
─System components communicate with these standard interface operations and exchange the representations of these resources.
In REST, a single resource may have multiple representations; and the communication is made through different states of resource representations by following the inter-links between resources.
3.1. Characteristics of REST Services
The REST web service views applications’ data and functionality from a resource perspective. They are declarative in that they focus on the description of the resources themselves, rather than describing how the operations are performed (Chii 2013; Cesare, Olaf, and Frank, 2008). REST web services are easily accessible because the URIs representing the resources can be shared and reused by any application, and are self-descriptive.
Accordingly, REST web services are widely used to build Web 2.0 applications and mashups (Cesare, Olaf, and Frank, 2008;Chii, 2013). Like web pages, they support caching in proxies, and gateways.Since, JSON is a lightweight, directly supported inside JavaScript, and human readable data exchange language, we employ JSON for the client-server communication of the REST web services (Nurzhanet al., 2009; Mark 2011).
In general, the above mentioned set of principles encourages REST applications to be simple, and lightweight. Hence, the REST approach is considered to be a good alternative to build flexible, scalable and loosely-coupled service-oriented architecture systems, and is what we employ in the study underpinning this paper.
3.2. REST Services Composition
In the REST web service model, the system is seen from the perspective of resources. Thus,service composition focuses on web resources associated to Web 2.0 mashups and state transfer between candidate web services(Xinyang, Jianjing, and Ying, 2009).Zhao and Prashant (2009) describe a mash-up as a web application that combines data from multiple sources into a single integrated application, where the data could come from local databases or other sources from the Internet via different protocols such as HTTP, RSS, ATOM, and REST web services. Web mashups are limited to fetching data from remote sources while the REST web service composition involves updating or manipulating data sources.
3.3. REST Services Composition on smartphones
Modern smartphones are sensor-rich, boasting a high processing power, with larger storage capacity, and improved screensize, as well as having enhanced connectivity and a variety of APIs; all these premises bode well for future smartphone applications development. Moreover, many of today’s smartphone applications are personalized (Jeff and Scott, 2012). However, they can do a useful job only if they communicate with one or more servers and access data. The best way to achieve this communication is through the composition (mash-up) of web services. To this end, the REST web service may be used to communicate and build other composite web services, mashups or applications for smartphones(Chen-Che, 2013; Narayana, 2006).
The above mentioned smartphonefeatures in combination with the capability of REST services enable smartphones to capture and process large amounts of information. For example,theycan leverage the user community and software practitioners to expand the capabilities of smartphonesso that they can host a number of state-of-the-art applications, such as peer-to-peer social networking, location-based services, collaborative environment, and data exchange (Chen-Che, 2013). However, the user experience of such applications is dependent on the screen size of the smartphone (Zhang, 2005).
Given the enhanced functionality of smartphones, it is thus not unreasonable to anticipate that the smartphone screen real-estate will be used for the composition of REST web services (Chen-Che, 2013). That is, the possibility of developing applications with REST services on smartphones would turn the smartphone into a small development computer to ubiquitously browse and touch code. Nonetheless, consumingREST web services onthe small screen real-estate requires an enhanced usability of the services; however, to the best of our knowledge, a real smartphone device has not been used as a software development, or REST-based service composition, environment.
Thus, in this paper, we illustrate the possibility of building a REST-basedcross-platformsmartphone application which would scale into an end-user cross-platform REST service composition (mash-up) tool for smartphones.
- HTML 5 and Usability of REST Services
Previous work such as (Marino et al., 2013) indicates that HTML5 is used for a better user experience in the composition of REST services. Thus, in this section we describe fundamental issues related to usability, HTML5 technologies, and the factors influencing the usability of REST web services.
4.1. Usability
Usability is one of the six quality characteristics of the ISO 9126 software quality model (ISO, 1998). It is defined as a set of attributes of software which bear on the effort needed for use and on the individual assessment of such use by a stated or implied set of users.Sommerville(2009) describes usability (user interaction) as the process of issuing commands and associated data to the computer system. User interaction has evolved from the command-line into a number of interaction styles which are easier to use, namely, direct manipulation with pointing devices, menu selection, form fill-in, command language, and natural language commands (Sommerville, 2009).Pressman (2001)also remarks that if a program is not user-friendly, it is often doomed to failure, even if the functions that it performs are valuable. Usability is thus an attempt to quantify user-friendliness and can be measured in terms of four characteristics: