The open source cross-platform application development frameworks for smart phones Naresh Babu M M, Y Sreeraman and E Purushotham Dept. of Information Technology, Sreenivasa Institute of Technology & Management Studies, Chittoor, Andhra Pradesh, India. {itsnaresh4u, sramany, e.purushotham}@gmail.com Abstract In this paper, we present a review and need for cross-platform-developer-tools as each operating system has its own architecture and interfaces. Unfortunately the mobile applications are platform dependent. This prompting a vital issue of choosing the mobile operating system for the application development process. The crossplatform mobile applications can be achieved in several ways, we provide a brief review at the existing frameworks. Further, we focus mainly on Open Source Frameworks although some commercial tools are listed, challenges in Mobile Application development and also the pros & cons of Cross-platform application development frameworks. Keywords- Cross-platform frameworks, Mobile OS, Mobile Application Development, Smart phones. I. INTRODUCTION In current mobile computing era, there is a steady growth in the demand for smart phones. With the emerging mobile computing systems, the mobile applications became very popular. Since each framework for developing cross-platform applications is certainly needed. Smart phones are manufactured with different physical, hardware and architecture functionality. Therefore certain API's may not be available on all smart phones as they depends on the platform, physical device features to implement its API's. Thus forth, every platform has its own development environment that supports different sets of programming languages and API's. Now-a-days, any smart phone device platforms can be classified into following distinct classes based on the operating systems they employ, namely: Android, Symbian, A. Google Android : In 2005 Google started the development of the Android platform. The native Android applications were written in Java. It offers its own virtual machine called the Dalvik VM for running the Java classes that are recompiled into Dalvik. To start developing native applications for Android, the Java SE Development Kit (JDK), the Android SDK, and a development environment (IDE) are required. In 2007 industry leaders such as Google, Motorola, Samsung, Sony Ericsson and Intel formed the Open Handset Dr. R C Cherukuri Dept. of Electrical & Electronics Engineering, Gyan Ganga Institute of Technology & Management, Bhopal, India. ravindranathc@gmail.com TABLE I. MARKET PENETRATION PER MOBILE PLATFORM Platform Sold Units (X 1000) Market (%) Android 36,267.8 36 Symbian 27,598.5 27.4 Apple ios 16,883.2 16.8 Research in Motion 13,004.0 12.9 Microsoft 3,658.7 3.6 Other Platforms 3,357.2 3.3 Share Alliance and its first key outcome was the Android Platform. Same year the first release of the Android SDK was released. B. Symbian: The historical background of Symbian is in the EPOC operating system for the Psion family of PDA's. Symbian is strongly linked to Nokia, which uses the Symbian OS for the majority of its smart phones. Developing for the Symbian Foundation s operating system can be done using the native C++ framework, Java ME, Adobe Flash, web applications, widgets using web technologies, Python, and with Qt, a free C-based framework owned by Nokia. Qt is the recommended framework for creating native applications for Symbian and Meego. C. APPLE ios: Apple introduced the first iphone in 2007 it started the new era in the smart phone market. IPhone s operating system is called ios (formerly iphoneos) that is based on Mac OS X. Application development for the iphone can be done on two platforms: using mobile web technologies, or using the native Cocoa Touch framework built on Objective-C. In order to develop application for the iphone, an Intelbased Macintosh computer running a Snow Leopard version of the Mac OS X is required. The iphone SDK available from the Apple Developers site includes the Xcode IDE, iphone simulator and additional tools. It is also possible to develop for ipod Touch and ipad with the same tools. 61 7 1
D. RIM Blackberry: BlackBerry is a product of Research In Motion (RIM). It was the third most sold mobile operating system in the world in 2010. The BlackBerry is specialized into the enterprise market, and should be taken into account when developing applications for enterprise markets especially in the US. The applications for BlackBerry can be developed using the BlackBerry Web Development or Java Application Development. The Web Development is for developing BlackBerry widgets, which are small web applications, built using HTML, CSS and JavaScript. The Java Application Development requires installing the Sun JDK, the Eclipse IDE for Java Developers with the BlackBerry plug-in and the BlackBerry JDEs. E. Microsoft Windows Mobile-OS: The original Windows Mobile was introduced at the millennium as an operating system for Pocket PCs. In February 2011, Nokia and Microsoft announced new partnership plans according to which Windows mobile-os will serve as Nokia's primary smart phone platform, and it will likely raise the Windows mobile-os market share. The applications are programmed using C# language with.net framework. There are two major frameworks on top of the.net framework core: Silverlight and XNA. Developing on this platform requires installing Windows Phone Developer Tools, which include Visual Studio 2010 Express, the Windows Phone Emulator, XNA Game Studio 4.0, Microsoft Expression Blend for Windows Phone, Silverlight, and.net Framework 4. The remaining paper is organized as follows. Section 2 discusses the challenges in Mobile Application Development. Section 3 contains the different Cross-Platform Mobile Application Development Frameworks. Section 4 discusses about the Pros and Cons of Cross-Platform Application Development. Section 5 concludes. II. CHALLENGES IN MOBILE ENVIRONMENT Generally there are two kinds of traditional mobile applications, web application and native application [2] Web applications reside on a server making installing or downloading applications, unnecessary. They comprise of web pages optimized for mobile devices and hence, can be developed using HTML, JavaScript and CSS and can be bookmarked for future use. Debugging and bug fixes are possible in real time. However, they cannot access the mobile devices features. For instance, a web application cannot access the device camera to capture images. Native applications are applications that are developed specifically for the type of mobile device. Native applications can take advantage of mobile devices functionalities like GPS, file storage, database, SMS, mail etc. They can be downloaded, installed and sold in application stores. The main drawback of native applications is that they need to be developed separately for each platform, hence increasing development time, cost and effort The challenges in Mobile Application development include: A. Limited Resources: The most important of these challenges is that mobile devices have limited resources, ranging from the cost of communication to data storage to power management Even though devices are becoming increasingly powerful in terms of computing power, storage capacity and communication bandwidth, all devices in the mobile ecosystem are not equally powerful and programmers must take into account the specifics of each device when developing applications. [4] B. Devices and Platforms Devices on which the mobile applications display and receive data usually have small screens and keyboards. So, developers must pay special attention to usability for example, offering one-touch navigation and removing certain features and facilities to display data sensibly. Interface design should also consider options such as voice activation, touchsensitive screens, innovative menus and styluses, and handwriting and gesture recognition. Mobile applications must be designed to suit a variety of handsets, which operate on different platforms and with different interfacing capabilities. The same application must work on multiple mobile devices with varying presentation formats, so we must consider device features and their operating platforms.[3] C. Security Every mobile device manufacturer understands the importance of security, and offers accommodations for it. For developers, however, that means each operating system has its own custom architecture. Sometimes different mobile platforms provide varying degrees of support for securing data stored on the device. At the same time, not every mobile application needs the same level of security, and users dislike multiple logins to access data on the device itself or back-end data. However, the responsibility for protecting data falls squarely on the application developers shoulders, so they must incorporate encryption into the application down to the file system level. D. User Experience This is especially important in cross-platform scenarios where screen sizes may not only differ but offer the option of portrait versus landscape. How is the screen real estate best used? What features should be available? Developers have to remember that users on the go are usually looking for specific information, and determine how to make that information as easy to find as possible 62 7 1
E. Input Limited input devices and a variety of possible interaction methods (keypad, stylus, touch screen). Text input is particularly cumbersome III. CROSS-PLATFORM APPLICATION DEVELOPMENT FRAMEWORKS In order to develop mobile applications using the write once, run anywhere paradigm, several solutions exist in industry today to address the issue of mobile platform heterogeneity. The demand for shorter mobile application development process has driven the need for cross-platform solutions. The idea of cross-platform mobile programming is that with the same codebase with little or no modifications a mobile application could be published into multiple mobile phone platforms. TABLE II. MOST SIGNIFICANT CROSS-PLATFORM TOOLS FRAMEWORK TYPE LICENSE Phonegap Framework Open Source Appcelerator Platform Open Source Rhodes Platform Open Source Mosync Platform Open Source Sencha Touch Framework OS/Commercial NetBiscuits Platform Open Source QT Framework Open Source FeedHenry Platform Commercial Unity3D Platform Commercial DragonRad Platform Commercial Grapple Framework Commercial MotherApp Framework Commercial Corona Platform Commercial WidgetPad Platform Open Source JQuery Mobile Framework Open Source JQTouch Framework Open Source WebApp.net Framework Open Source QuickConnectFamily Framework Open Source Cross-platform native frameworks let a developer to create a native, installable and mobile application distribution platform capable (i.e. App Store and Android Market) mobile software for multiple platforms using cross-platform APIs and usually HTML/CSS/JavaScript frameworks. However, building applications using native frameworks still requires the vendor SDKs installed and using the vendor-specific techniques for code signing and distributions. The layout and some API functions are also platform specific, so there will be some code modification for different platforms. There are a variety of frameworks and tools and it is useful to make a clear distinction of what they offer. So we have divided the frameworks into two groups: [5] Framework: Frameworks are set of libraries, software components and architecture guidelines that provides the developer with a comprehensive toolkit to build a complete mobile application from top to bottom. Platform: Platforms are set of frameworks, tools and services that not only allow the user to build a complete mobile application but also to configure, package and distribute it to app stores or the cloud. The tools to be discussed below are the Top Open Source Cross-Platform tools being used by developers: [13] A. PHONEGAP PhoneGap [6] is an open source development tool for cross-platform mobile development. Using PhoneGap, native applications can be developed with the use of standard web languages (HTML, CSS and JavaScript). As PhoneGap is still in pre-release phase, it is currently free of cost and will stay that way for open-source projects. Commercial application developed using PhoneGap will be charged when it has been publicly launched. Using PhoneGap, an application written once can be deployed to the platforms Android, ios, Windows Phone 7, BlackBerry, Symbian and Palm webos. Using PhoneGap, native applications are created which act as a wrapper application for a standard web browser control on the device. The created application handles the communication with the web application in such a way that the user has the experience that it uses a native application, but in fact it is using a web application which is executed on the device. Such a web application is defined using HTML and JavaScript and is presented like a normal web application would do. Therefore, PhoneGap applications are hybrid applications and not 100% native as they merely exist of a shell around the standard web browser control. This is in contrast with native applications, in which native userinterface controls of the platform are used for user interaction. The following diagram explains how PhoneGap architecture looks like: [7] In the above diagram we can see that PhoneGap provides a WebView which is nothing but a bare bone web browser without a Chrome UI. The native code in PhoneGap SDK 63 7 1
Figure 1. PhoneGap architecture exposes uniform APIs across multiple device platforms which are accessible to JavaScript running inside the WebView. As a web developer if you are using PhoneGap then it s less likely that you ll need to know the internals of the SDK (although it is always recommended to go through the source code in case you want to enlighten yourself as well as get fascinated by the tremendous efforts that the PhoneGap developers have put into it) B. SENCHA TOUCH 2 Sencha[8] began life in 2007 as a community effort to combine Ext JS, jqtouch and Raphaël, three popular UI libraries. In June 2010, the company renamed itself to Sencha. While Sencha is the commercial entity, Sencha Labs is a nonprofit entity that owns the intellectual property for the opensource software elements. Sencha products are available under a zero-cost license (for free apps only), a commercial paid-for license and an open source (GPL3) license. Sencha Touch is currently supported on WebKit browsers, including the popular Apple ios and Google Android platforms. Some might contend that this support isn't enough that all platforms must be supported for Sencha Touch to be taken seriously. When adopting a framework in the mobile web development realm, it's wise to look for two things: platform richness and feature richness. A framework that abstracts the most from HTML5/CSS3 in a form that s developer-friendly, and with a wide reach, is desirable. In this aspect, Sencha is astute in supporting the two most popular platforms and using their resources to provide rich, easy-to-use features for developers.[9] Sencha Touch 2, a high-performance HTML5 mobile application framework, is the cornerstone of the Sencha HTML5 platform. Built for enabling world-class user experiences, Sencha Touch 2 is the framework that enables developers to build fast and impressive apps that work on ios, Android, BlackBerry, Kindle Fire, and more. Sencha Touch 2 includes an updated and easier to use API, enhanced MVC, and richer documentation. To harness local hardware and system services, Sencha Touch 2 provides access to a wider set of native device APIs, allowing HTML5 developers to take advantage of hardware features. To broaden the reach of apps created with Sencha Touch 2, a free native packager is now included enabling app distribution to the Apple App Store and the Android Market. To Create a Sencha Touch 2 App step by step please refer: [10] C. APPCELERATOR TITANIUM Titanium Mobile[11] is a commercially supported, open source platform for developing cross-platform applications using web technologies. It is introduced in 2008 by Appcelerator Inc. Titanium Mobile currently offers support for generating native applications for the platforms Android and Apple ios (including ipad). Support for generating applications for the BlackBerry platform was announced in 2010, however this is not released publicly yet. Figure 2. Titanium Platform In order to access native platform functionality, Titanium Mobile provides a platform independent API which can be used for native UI components as well as native device functionality. Using a platform independent API called the Titanium SDK [12], Titanium Mobile offers an abstraction layer which can be used to define an application in a generic fashion. Defining an application can be done using the build-in editor by writing JavaScript code. In this way, an user interface and corresponding functionality can be defined by using JavaScript corresponding with the Titanium SDK. Titanium platform provides the necessary tools, compilers and APIs for building for the target platform, and a visual environment tool called Titanium Developer for creating, running and packaging Titanium applications. By submitting the source files written with Titanium Mobile to a web-based, cross-compilation tool, binaries are created which can be used to deploy on mobile devices. As Titanium Mobile cross-compiles the generic application defined using JavaScript into platform-specific versions, the output are hybrid applications. 64 7 1
D. MOSYNC MoSync was founded in 2004 as Mobile Sorcery, a development studio producing and publishing mobile games and is based in Stockholm, Sweden. Recognizing that writing games for additional platforms was very high cost, MoSync was created to bridge across-platform fragmentation and productise cross-platform development tools. The tool started as a way to address the hundreds of Java ME device variants through a single C++ codebase and over the years evolved into addressing most smartphone platforms. MoSync allows developers to use C++ or (as of recently) just HTML and JavaScript to target ios, Android, Windows Phone 7, Symbian, Java ME, Windows Mobile and Moblin platforms, with BlackBerry support under development. Developers can access native APIs through abstracted MoSync libraries while the app design can use native UI widgets.[13] MoSync has two primary runtime architectures - one implemented in C++ and one in Java. However, the design is very similar in both cases. [14] Plugins: Many frameworks include some extension or plugin architecture that allows you to build a native library and integrate it into the SDK. This really gives you the best of both worlds, you can develop missing or advanced features with the native tools, and then use the cross-platform SDK for common tasks. Decreased Development Time: The majority of crossplatform frameworks not only provides one tool for many jobs, but also simplifies development with dynamic languages and comprehensive libraries for common, repetitive tasks. Code Is Reusable: Rather than having to write the specific action or sequence for each platform, a developer can just write the code once and then reuse those bits in later projects or on other platforms. Easy for Web Developers: Because most frameworks are dynamic or scripting languages, they are easy for web developers to jump in and use. Moreover, most frameworks also support HTML5 and CSS3alongside the calls to more native functions. Consolidated effort: The most obvious benefit of choosing a cross-platform SDK is in reducing your overall effort for a given project. By targeting a single API, you save a great deal on development and maintenance of the code base.[15] Figure 3. Mosync Runtime Architecture MoSync uses a custom C++ compiler, which outputs MoSync Intermediate Language. This is fed into the pipe tool, along with the application resources and the MoSync libraries. The pipe tool builds code trees, analyzes, optimises and outputs either C/C++ source code, MoSync bytecode or Java bytecode. This is then packaged with the appropriate runtime for the platform, which MoSync claim has a footprint of about 100Kb. What s notable is that MoSync can create binaries for most platforms, including Android without their respective SDKs. IV. PROS AND CONS OF CROSS-PLATFORM DEVELOPMENT A. The pros of using Cross-Platform frameworks: Reduced Development Costs: This is perhaps the biggest advantage because it allows companies or brands to get an app onto other platforms without having to invest in a team or developer specific to that ecosystem. Easy Deployment: Deploying and compiling apps is much faster in a cross-platform scenario. This is especially true with many of the new cloud-based build tools that various frameworks are starting to push out. B. The cons of using Cross-Platform frameworks: Limited Control: Cross-platform SDKs are an abstraction of the various platforms into one uniform interface that should theoretically make development easier. But at the same time, this abstraction blurs your access to the underlying API, and your feature set may be more limited as a result. Vendor Lock-In: Most of the cross-platform frameworks build using their own subsets of JavaScript, which means that if you want to switch to another platform, that code you wrote before is likely not going to be reusable without a lot of work. Code Might Not Run as Fast: The cross-compilation process can sometimes be slower than using native tools and calls for an app. You Can t Always Use Your Own Tools: Most frameworks want users to use their own development tools and suites, and that can mean that a developer has to forgo his or her own IDE preferences and use something else. High-End Graphics and 3D Support is Often Limited: Fortunately, game-centric development platforms, like Unity are here to help fill in those gaps. API Freshness : It takes time for platform API changes to trickle through the various third party SDKs. You may have to wait awhile for the latest and greatest features to become available, if they become available at all. Again, you are 65 7 1
relying on the SDK developer s commitment to the project. [16] V. CONCLUSION We have introduced various existing Mobile Operating Systems and illustrated in brief the most significant tools used in 2012. Further, we have discussed several Cross-Platform tools that are Open Source and that highly used by the developers for developing applications. We have presented various pros and cons of using cross-platform frameworks. Thus, we found that the cross-platform frameworks are highly reliable while developing proprietary applications. In addition, the cross-platform developer tools have become the basis in developing various mobile based or mobile operated applications. REFERENCES [1] Gartner.http://www.gartner.com/it/page.jsp?id=1689814. [2] Harun, H.; Jailani, N.; Bakar, M.A.; Zakaria, M.S.; Abdullah, S.;, "A generic framework for developing map-based mobile application," Electrical Engineering and Informatics, 2009. ICEEI '09. International Confere vol.02, no., pp.434-440, 5-7 Aug. 2009. [3] Unhelkar, B.; Murugesan, S.;, "The Enterprise Mobile Applications Development Framework," IT Professional, vol.12, no.3, pp.33-39, May-June 2010. [4] Buthpitiya, S.; Luqman, F.; Griss, M.; Bo Xing; Dey, A.K.;, "Hermes -- A Context-Aware Application Development Framework and Toolkit for the Mobile Environment," WAINA, 2012 26th International Conference on, vol., no., pp.663-670, 26-29 March 2012. [5] Cross-platform mobile development. http://www.mole-project.net/. [6] Phonegap. http://www.phonegap.com/. [7] PhoneGap Architecture http://html5hu.wordpress.com/2011/10/05/amobil-fejleszts-leghatkonyabb-html5javascript-ben/ [8] SenchaTouch.http://www.sencha.com/products/touch/. [9] Build mobile web applications with Sencha Touch http://www.ibm.com/developerworks/opensource/library/wasenchatouch /index.html?ca=drs-. [10] How to Create a Sencha Touch 2 App http://miamicoder.com/2012/howto-create-a-sencha-touch-2-app-part-1/. [11] Sarah Allen, Vidal Graupera, and Lee Lundrigan. Pro Smartphone Cross-Platform Development: iphone, Blackberry, Windows Mobile and Android Development and Distribution. Apress, Berkely, CA, USA, 1st edition, 2010. [12] Appcelerator Inc. Appcelerator developer center. http://developer.appcelerator.com/. [13] Cross-Platform Developer Tools 2012 http://www.visionmobile.com/product/cross-platform-developer-tools- 2012/. [14] The runtime architecture. http://www.mosync.com/documentation/manualpages/runtimearchitecture. [15] http://mashable.com/2012/02/16/cross-platform-app-design-pros-cons/ [16] http://mobile.tutsplus.com/articles/theory/cross-platform-developmentconsiderations/. 66 7 1