Project Ubiquity A case study on the viability of cross-platform mobile development Martin Andreas Juell Norges Teknisk-Naturvitenskapelige Universitet Abstract This report seeks to assess whether using a cross-platform mobile development tool is a viable alternative to traditional mobile application development for Inspera AS, a Norwegian software company that makes cross-media publishing tools geared towards education. Based on input from Inspera, it outlines a series of criteria for selecting the optimal framework to use, focusing on development language, supported phone capabilities, and appealing UI controls. A series of dierent alternatives are reviewed, and Appcelerator Titanium is eventually selected as the optimal choice. Titanium is then used to develop a prototype, a mobile application for Creaza.com, one of Inspera's major current projects. Both the development process and the completed application are then compared to native development, providing both an Android developer's perspective and that of a web developer, with little experience in mobile development. As it turns out, cross-platform development tools can save vast amounts of time in several ways. Not only does the developer not have to develop one version for each platform, but he could also save time otherwise spent learning a required new programming language. In addition, some often implemented functionality is also very easily available in Titanium, possibly saving even more time. The main drawbacks are feature set, debuggability, and dependence on the framework used. The last part of the report readresses the question of platform choice, in light of the experience gained from prototype development in Titanium and the surfacing of Adobe AIR for mobile devices, seeing benets to dierent approaches, and recommending several for further experimentation, particularly AIR, which is a great t for Inspera. i Preface This report is a documentation of work performed as a specialization project in computer science in the fall of 2010 by Martin Andreas Juell. The project is completed in the rst term of the nal year of the 5-year integrated MSc program in Computer Science at the Norwegian University of Technology and Science (NTNU), and its scope is 15 units (half of the normal workload for half an academic year). The assignment has been dened in cooperation with Inspera AS and super- visor John Krogstie at the department of Computer and Information Science (IDI). The project examines various aspects of cross-platform mobile develop- ment in general, and Appcelerator Titanium specically, an attempt to de- termine to what extent Inspera can benet from using these tools. In a very fragmented market of mobile devices and platforms, harnessing these tools could be a critical factor in market survival, and they could lower the cost for small businesses to enter the application scene. I extend my thanks to my supervisors at Inspera, Sondre Bjørnebekk, Bjørn Rustberggard and John Arne Skjervold Pedersen, as well as my supervisor at IDI, John Krogstie, for providing invaluable feedback throughout the writing process. ii Contents 1 Background and objective . 1 1.1 The problem with platforms . 1 1.2 Inspera AS, Inspera Content Server and Creaza . 1 1.3 Objective of project . 2 1.4 Outline of report . 2 2 Choice of platform . 4 2.1 Criteria . 4 2.2 Reviews . 5 2.3 Final Consideration . 10 3 Development work . 11 3.1 Prototype: Creaza for Titanium . 11 3.2 Inspera Content Server API . 14 4 Dierences in Development Process . 15 4.1 Programming . 15 4.2 Debugging and Testing . 17 4.3 Overall Time Spent . 19 5 Dierences in Completed Application . 20 6 Discussion . 21 6.1 Choice of platform revisited . 21 7 Conclusions and future work . 26 References . 27 A Key Android terms explained . 28 iii iv List of Figures 1 The Camden Fringe, developed in PhoneGap for iPhone and An- droid . 7 2 Existing Creaza application for Android . 11 3 Creaza prototype implemented in Titanium . 13 4 Error message generated by Titanium . 18 5 Log output generated after closing of the Gallery picker activ- ity, before starting an actual upload, showing large amounts of memory being allocated, forcing garbage collection several times. 20 6 Orbium, a game developed in PhoneGap. Available for iOS, An- droid and Palm. 21 7 ExplorAmaze . 23 v Abbreviations AIR Adobe Integrated Runtime AJAX Asynchronous Javascript And XML AMF Adobe Message Format API Application Programming Interface ARM Advanced RISC Machine AS Aksjeselskap (Limited Company) ASP Active Server Pages BREW Binary Runtime Environment for Wireless CMS Content Management System CSS Cascading Style Sheets DSL Domain-Specic Language GPS Global Positioning System GTK+ Gimp ToolKit GUI Graphical User Interface HTML HyperText Markup Language HTTP HyperText Transfer Protocol IDE Integrated Development Environment IDI Institutt for Datateknikk og Informasjonsvitenskap (Department of Com- puter and Information Science) J2ME Java 2 Micro Edition JS JavaScript JSON JavaScript Object Notation MDA Model-Driven Architecture MXML Macromedia eXtensible Markup Language NTNU Norsk Teknisk-Naturvitenskapelig Universitet (Norwegian University of Technology and Science) OS Operating System OSS Open Source Software PIM Platform-Independent Model PHP Hypertext Preprocessor vi PSP PlayStation Portable REST Representational State Transfer RIA Rich Internet Application RISC Reduced Instruction Set Computer RIM Research In Motion (Makers of the BlackBerry) SD Secure Digital SDK Software Development Kit SOAP Simple Object Access Protocol UI User Interface URL Uniform Resource Locator XML eXtensible Markup Language XSL eXtensible Stylesheet Language XSLT XSL Transformation 1 Background and objective 1 1 Background and objective 1.1 The problem with platforms Sophisticated portable devices capable of running third party applications (e.g. smartphones) are rapidly becoming widespread, and the market for such appli- cations has matured. However, these devices operate on vastly diering plat- forms, and to develop an application for iOS, Android, Palm WebOS, Windows Mobile, Symbian OS, Samsung Bada, and BlackBerry, one must write the same application seven times, and maintain all seven codebases separately. Expenses related to development, testing, bug xing and maintaining security can quickly outweigh the value the application provides. The concept of platform fragmentation and the desire to develop software across the boundaries that are set by each platform was not born with mobile devices. Operating systems and programming languages for conventional com- puters also dier substantially, both in terms of syntax and features, and best practices tend to vary. [7] One general way to mitigate this is by using a model- driven architecture (MDA). The MDA approach is based around expressing the functionality of software as a platform-independent model (PIM), written in a formal, domain-specic language (DSL). Using standardized, platform-specic rules and tools, the PIM is then translated into platform-specic models in a computer-assisted process. The aim is to increase software quality, development speed, portability and reusability. [14] Modern desktop applications wanting to reach both the Mac OS, Linux and Windows platforms have the same problem, and can solve it in several ways. Using a programming language like Java leverages the fact that almost all necessary platform adjustments are done in the Java implementation for each platform, and the application developer does not have to think much about them. One example of such an application is Eclipse (www.eclipse.org), the IDE used for development in this project. Another approach is to use a language like C or C++ for development, and either make manual adjustments for each platform or use libraries that present some generic functionality to the developer, and handle the implementation specics dierently for each platform. One such library is GTK+ (www.gtk.org), a multi-platform user interface library used in many open-source applications, such as the vector drawing program Inkscape (www.inkscape.org). Mobile platforms often use dierent programming languages, but there are software kits available that let developers write one codebase in a meta-language, and then build this code into applications for several dierent platforms. Some particular components may still have to be developed specically on a per- platform basis, but there is still great potential to save on development and maintenance time and costs. There are several dierent approaches to how this can be done, which will be discussed in section 2. 1.2 Inspera AS, Inspera Content Server and Creaza This project is conducted in collaboration with Inspera AS, a Norwegian technol- ogy company that makes cross-media publishing tools geared towards education. Inspera has a variety of customers and projects, however they are all based on Inspera's key product, Inspera Content Server. Inspera CS is a web-based soft- 1 Background and objective 2 ware platform built to handle and present rich media for use in education and communication. Content is stored in an XML format, independently of its use. This allows great exibility in composition and presentation. Content can be combined hierarchically, forming structures, virtual documents containing sev- eral elements of potentially dierent types. This approach can handle a variety of dierent types of content, including portals, learning materials, tests and ex- ercises, documentation, promotional materials, presentations and publications.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages35 Page
-
File Size-