<<

Platform architecture portfolio Comparison of 3 platforms (Android, iOS, mobile )

Marlo Häring

Fachbereich Informatik Universität Hamburg Vogt-Kölln-Straße 30 22527 Hamburg [email protected]

Abstract: In this paper I will introduce threedifferentmobile operating systems andtheir related developing approaches. Eachofthese systems requires divergent technicalinfrastructures to developmobile applications.

1 Introduction

Android and iOS are currentlythe leadingoperating systemsbecause of their popularity. Figure1shows thedominance of thesetwo systems.Onthe 3rd of January , who provides leadership for the Ubuntu operatingsystem, announced a newsmartphoneinterface forits popular Ubuntu.

Although alloperating systemshavethe same tasks, they differ in numerous areas and fulfillthemwithdiverse approaches. This is particularlyevident in the area of user experience. Mobile Ubuntufor example tries to transfer their popular environment besides desktop PCs and televisionalso to . So it stands out from existing operatingsystems. In particular the developing progressofamobile applicationrequires different technical infrastructures and platforms.

Figure 1: IDC looked at globalsmartphone shipmentsinQ22012, placingAndroidwellout in front in termsofoperating systemshareSource: IDC WorldwideMobile Phone Tracker,August8, 2012

391 2 Developing for Android

Android apps can be developed on anycommonplatform (Windows,,MacOS) since Eclipse is themost popular IDE and it is mainly written in Java. Furthermore Eclipse brings averymightydebugging engine as well as aplug-in infrastructure, which allows great flexibility. The Android Development Tools (ADT) are also installed as a plug-in. They include an emulator, which behaves like a real Android device and allows youtotestyourapplication withouthavingareal device.It is even possible to create multiple Android Virtual Machineinstances (AVM) with different customizations like displaysize, sd-card capacityor API Level. The emulator can run several AVMs in parallel. The whole backend code is written in Java. Android provides a subset of the Java 7libraries adapted to theUIwidgets and touch eventsthat occur through thetouch interface. The interface is defined in XML. The UI elements are structured hierarchically. ViewGroups are container. They define the layout structure of their containing View elements and can include further ViewGroup elements. In this way the &!% >*3/2 91*8./ 2 ?what yousee is what you get= &!% builder which parses and generates XMLcode. DroidDraw1 is an alternative GUI builder also usable as an online applet version. To accessUIelementsinJava each elementhas a uniqueID, which is defined in the XMLstructure. Subsequently action listener can be registered so that events are handled. When the app is built it is first compiled into .class files (Java-Byte code) and thereafter converted to .dex (Dalvik executable) files which canbe executed by the DalvikVirtual machine (VM). This VM creates an instance foreachapp running.

3 Developing for iOS

Thedevelopingofapps forApple devices requires aMacintosh (MacOS). The developingenvironment consistsbasicallyof Xcode. It provides a very efficient /*;+><-51 051 %",582 <84 %"<4 > 429+..*8. -55>/ )+/- >*@2 $*615/50-:/ Visual Studio, Eclipse 51 #1<6>2:/ Netbeans. The sizes of apps developed are mostly very small so they can run on relative weak processors. Forthisreason thecomputer does not need to be powerful. It should have enough powerfor Xcode and especially for the simulator to run smoothly. Using the simulator thewhole developing process can be accomplished exclusivelyonthe macso that no mobile devices are needed. The iOS version,display resolution andseveral other settings can be customized. User experience is the only field where the simulator is notsuitable. Controlling thesimulated device 4*/3>

1 http://www.droiddraw.org/

392 an interface file (.h) and an implementation file (.m). Properties are used to access the GUI within the ObjectiveC code. They can be created automaticallywith Xcode by draggingthe respective element into the interface file. An outlet is created andcan be used to interact with theUIelement. Events are handled by delegate methods,which are methods that can be connectedtoaspecific event. When the eventoccurs the connected method is invoked (delegatepattern).

4 Developing for mobile Ubuntu

Nowadays smartphonesare produced, providingperformance characteristics from former desktop PCs. This enables mobile operatingsystems to usemodern multi core technology. As a result currentgraphic chips canrender pictures for desktop PCs. With this technical development mobile Ubuntuforms in combination with a docking station, keyboard and monitor, afully-fledgedmobile workstation, whichis expected to be very attractive to enterprise customers.AdditionallymobileUbuntutries to attract smartphonebeginners with asimpleaccess to basic functionalities, used by themajority. Since mobile Ubuntu is aLinuxsystemand has one of the best webservice integration there are plentyofpossibilities to develop an app. One option is the QMLtoolkit,which is built upon the newest versionofthe QT framework. Theuserinterface consists of a tree of declared objects with properties. Similar to Android's UI elementsQML objects have auniqueID, which is used to refer to. For dimensionsQML uses grid units, which are device dependent. This is a helpfulconcept to build apps platformagnostic because layouts canbe dimensioned once and used on multiple devices. Astricter JavaScript web browser variant canbe embeddedinseveral ways as a scripting language in QML. This frameworkprovides aquick waytocreate interactive apps forUbuntuonall devices.

5 Trends

Nowadays it becomes more and more important that webservices are able to use system APIs to provide deepintegration into theinterface. Thedifferent kind of SDKs and frameworks make it difficulttodevelopcross-platform mobile apps,which appear same on different systems. As an intermediate step developer build theirweb services using HTML5, CSS and JavaScript and provide thin clientscustomized for each mobile systemtoaccessthe programmed webservice. By this waymainparts of theapp can be programmed genericallyas a website thuscosts are saved because systemindependence is ensured.This development makes it obvious that webappsturninto first class citizens in mobile operating systems.

393 References

[And12] Android. Glossary. http://developer.android.com/guide/appendix/glossary.html, 2012. [Online; accessed 27-Jan-2013]. [Can12a]CanonicalLtd.Ubuntuapp developer. http://developer.ubuntu.com/get- started/gomobile/, 2012. [Online; accessed 27-Jan-2013]. [Can12b] CanonicalLtd.Ubuntufor phones. http://www.ubuntu.com/devices/phone, 2012. [Online; accessed 27-Jan-2013]. [GR11] Mark H. Goadrich andMichael P. Rogers. Smartsmartphone development-iosversus android. [Qt12] Qt ProjectHosting. JavaScriptExpressionsinQML Documents. http://qt- project.org/doc/qt-5.0/qtqml/qtqml-javascript-expressions.html, 2012. [Online; accessed 27-Jan-2013].

394