Cross Platform Development Tools for Mobile Applications, a Performance and Cost Evaluation
Total Page:16
File Type:pdf, Size:1020Kb
Cross Platform Development tools for mobile applications, a performance and cost evaluation MÅRTEN PÅLSSON Master’s Thesis at CSC Author: Mårten Pålsson || [email protected] Supervisor CSC: Sten Andersson || [email protected] External Supervisor: Olle Bergling || [email protected] Examiner: Anders Lansner || [email protected] TRITA xxx yyyy-nn Abstract Since the introduction of smart-phones, cellular phones have changed from relatively simple communication devices to becoming more akin to small computers in their own right. The smart-phone market is riddled with different platforms, with the most popular being Google’s Android, and Apple’s iOS. Each of these platforms use their own operating sys- tems and technologies, making the smart-phone eco-system highly fragmented. This leads to problems for companies wishing to target more than one platform, since applica- tions developed for one device will not work on another. To solve this problem several different cross-platform de- velopment tools have appeared. These tools aim to provide developers with a solution along the lines of develop once and deploy anywhere. Cross-platform development tools come in many different forms and utilize different technolo- gies to allow applications to work on different platforms. This project has evaluated two of these approaches in order to to provide a suggestion on which is the most suit- able for a company wishing to develop applications for mul- tiple platforms. The evaluation has been based on a perfor- mance and cost analysis between a web-to-native wrapper and a source code translator. The result of this work is two-fold. Firstly the poten- tial financial gains are based on the skill set of the com- pany in question, and no clear differentiation can be seen between the two approaches. Secondly, while source code translators provide better performance compared to web- to-native wrappers, web-to-native wrappers are more flexi- ble and thus generally a better alternative when developing applications for multiple platforms. Referat En prestanda- och kostnadsanalys mellan korsplatformsverktyg för mobila applikationer Mobiltelefoner har utvecklats snabbt de senaste åren. Från att vara relativt simpla verktyg mest inriktade på telefo- ni, så har de utvecklats till små datorer med avancerad funktionalitet och hårdvara. Smart-phones, som de numera kallas, har tagit världen med storm och det finns ett stort antal olika plattformar på marknaden, varav de största är Android och iOS. Varje plattform har ett eget operativsy- stem som är baserad på egna teknologier, vilket har lett till att smart-phone marknaden blivit väldigt fragmente- rad. Detta ställer till problem för företag som vill utveckla applikationer till flera platformar då en applikation som utvecklats till en platform inte fungerar på andra. För att lösa det här problemet så har korsplatformsverktyg trätt fram. Dessa verktyg fungerar på många olika sätt och ut- nyttjar olika teknologier för att tillåta utvecklare att skapa applikationer som går att köra på flera olika plattformar. Det här projektet har jämfört två av dessa olika tillvä- gagångssätt, baserat på en prestanda- och kostnadsanalys, för att kunna föreslå vilket är det lämpligaste alternativet för ett företag som vill utveckla applikationer till flera plat- formar. Jämförelsen har gjorts mellan web-to-native wrap- pers och source code translators. Resultatet av detta arbete är tvådealat. Den potentiella finansiella vinsten är densamma för båda tillvägagångssät- ten och är baserad på den kompetens som redan finns in- om företaget. Vad gäller prestanda så presterar source code translators bättre än web-to-native wrappers. Däremot så är web-to-native wrappers mycket mer flexibla vilket gör dem till ett generellt sett bättre alternativ att att använda för att utveckla appliaktioner till flera platformar. Contents 1 Introduction 1 1.1 Background . 1 1.1.1 Smart-phone ecosystem . 2 1.2 Purpose . 3 1.3 Delimitations . 3 2 Frame of Reference 5 2.1 Native development . 5 2.1.1 Apple iOS . 5 2.1.2 Google Android . 6 2.2 Cross-platform development . 6 2.2.1 Approaches . 6 2.2.2 Tools . 8 3 Method 13 3.1 Performance evaluation . 13 3.1.1 Application Design . 14 3.1.2 PhoneGap . 15 3.1.3 MoSync . 15 3.1.4 Android and iOS . 15 3.1.5 Experiment setup . 16 3.1.6 Analysis . 16 3.2 Cost evaluation . 16 3.2.1 Questionnaire . 17 3.2.2 Interview . 17 4 Results 19 4.1 Performance evaluation . 19 4.2 Cost evaluation . 21 4.2.1 Interview . 21 4.2.2 Questionnaire . 22 5 Discussion 25 5.1 Performance evaluation . 25 5.1.1 PhoneGap . 25 5.1.2 MoSync . 26 5.2 Cost evaluation . 27 6 Conclusion 29 6.1 Future work . 29 7 References 31 Chapter 1 Introduction 1.1 Background Since the introduction of smart-phones, cellular phones have changed from relatively simple communication devices to becoming more similar to small computers. They have acquired increased processing power and functionality such as GPS, Internet connectivity and cameras. The smart-phone ecosystem is the home of several dif- ferent platforms with the most popular being Apple’s iOS, Google’s Android and Windows’ Windows Phone [20]. Each of these platforms have their own operating systems, development tools and programming languages. For companies it is desirable to reach as many markets as possible to increase their profits. However, the variety in platforms and the differences between them makes this an expensive prospect for companies developing mobile applications. Since each platform has its own programming language and run-time environment, applications developed for one platform cannot run on another. This means that developing an application for a specific platform requires intimate knowledge of that particular platform. It does not make things any easier that there are several differ- ent manufacturers producing devices for the same platforms - such as Samsung and HTC producing devices for Android. Companies wishing to target several platforms will have to acquire the competence to do so (such as programming languages and platform architecture), as well as either dedicate the resources needed for developing the same application in parallel for the different platforms, or spend twice as much time to develop the same application twice. This makes finding a way to develop applications from a single code base, that work on several different platforms, an attractive prospect. Fortunately, there exists several different methods to develop cross-platform ap- plications. One way to do this is to develop a pure web based application that runs in the device browser. However, this approach has some inherent restrictions com- pared to native applications. Among these are the reliance on constant connection to the Internet, as well as possible restrictions on which device level functionality (such as GPS and camera) the platform’s browser supports [17]. 1 CHAPTER 1. INTRODUCTION To address these problems several tools to develop native cross-platform appli- cations have emerged to offer a solution along the principle of “develop once, deploy everywhere”. There are numerous approaches, and combinations thereof, for these cross-platform development tools (CPTs), but generally the different methodologies used can be split into three broad categories; Web-to-native wrappers (an example is PhoneGap), source code translators (examples are XMLVM and MoSync) and run-times (an example is RhoMobile)[17]. 1.1.1 Smart-phone ecosystem The smart-phone ecosystem is in a constant state of flux. An example is the rise and fall of Nokia’s operating system Symbian; from a dominating 52.4% market share in 2009 [27], to Q3 2013 when it only held a 7% market share [29]. In 2009 Android was a newcomer to the smart phone market but was already predicted to become a big player in the future. Predictions were that Android would be second biggest actor on the smart phone market by 2013 after Nokia [27]. These predictions were proven to be incorrect as by Q3 2013 Android held a dominant position on the smart phone market with a 57% market share with iOS coming second, and Symbian – as stated above– only a shadow of its former glory. 13 Other Q3 2013 9 Q1 2013 5 Windows Phone 5 BlackBerry OS 6 5 Symbian 7 4 14 iOS 19 54 Android 57 0 10 20 30 40 50 60 Figure 1.1: Mobile OS growth in 2013. Source: (Global Web Index Q3 2013) As can be seen in Figure 1.1 on mobile OS growth in 2013: Android and iOS are dominant with 57% and 19% market shares respectively, while everyone else either lost shares or stayed the same. Thus it makes sense for a software company developing mobile applications to target Android first, and then expand to iOS. If an application were to be developed for both platforms it would reach a total of 76% of the global smart phone market. In statistics provided by Priori Data (2014)[19], on the total amount of downloads in the USA of the 150 most popular applications, it can be seen that only 8% for iOS and 0,3% for Android are paid for. These numbers are nowhere near conclusive, as you would need a complete overlook 2 1.2. PURPOSE of the global application market, but they do give an indication of a trend. That is, that iOS users are more prone to pay for their applications than Android users. This could give developers added incentive to target multiple platforms, since even though Android has the largest user base, the iOS user base proves more lucrative. 1.2 Purpose The purpose of this report is to evaluate different CPTs to find which approach is most suitable for a software development company wishing to develop native applications targeting multiple platforms.