Executive summary
With the advent of smart phones in the market, there have been many development frameworks that are used to develop and program these smart phones. Canyon Technologies has been instrumental in the coming of mobile phone solutions. There is a need to develop common cross-multiple platform for all smart phones. Each vendor tries to bring out the most outstanding features in their smart devices. There have been many smart phones in the market each coming with their own specific platforms that they operate in.
The main objective of this paper is to introduce and compare cross-platform mobile frameworks that are used for development of smart phones; it will look at Phone Gap development framework more closely and evaluate how it works with the other frameworks. The paper will also look at the historical perspective of the smart phones and how it has fared in the market today. The main platform of comparison is that of development platform.
With the introduction of smart phones come various vendors with their own development frameworks. This paper will look at the possibility of coming up with a development framework.
1.1 Background
Canyon Technologies is a company that offers solutions to mobile phones. They have been in the forefront in advocating for cross-platform development frameworks. The use of smart phones is growing at a steady rate as the smart phones are the new personal computers for many. Today’s mobile phones are used for various functions and functionalities. The use of smart phones for Internet is growing tremendously as users find it easier and convenient to use smart phones than using desktops.
While this is the case, the market for the mobile phones is also seen to be fragmented as there are various programming languages for mobile phones and various mobile operating systems. This is has led to situations where mobile developers have to use specific tools that are applicable for specific markets and environments; this is in order for the developers to have specific APIs so that they are in a position to code mobile applications in varying programming languages on different platforms. A cheaper option would be to rework on the code so that it would be used in various platforms but this would be expensive in terms of development costs.
1.3 Scope
This report is intended for developers of smart phones. The idea of coming up with various frameworks without any standard being followed is raising a lot of concerns. There are a lot of smart phones that are being developed. This is because of the fact that the demand for these phones is increasing and there is therefore ready market for these phones.
1.4 Methodology
Most of the information is primary data. This is because there will be the use of vendor websites. There are ready information and data that are available for users. The secondary sources of information will include information from magazines, periodicals and newspapers.
1.5 Project resources
This section entails the budget and the expenses that will be incurred when carrying out the research. The expenses that will be incurred in browsing the content from the websites of the various mobile frameworks are well taken care of. The breakdown and the details of the expenses are shown in the table that follows:
2.0 Smartphone market share
There are many manufacturers of smart phones which are found in the market with each manufacturer coming with their own operating system that will work with their smart phones. According to research, it has been found out that Symbian, Android, and Research In Motion are the major three widely sold operating systems for mobile devices in the year 2010. From the research, it has been found out that the Symbian market is dropping steadily while the Android market is increasing at a fast rate. It has been predicted that Android will be the most popular operating system that will have a 49% market share by the end of 2011. The rest of the sections will discuss the various mobile frameworks that are found in the market.
2.1 Phone development frameworks
2.1.1 PhoneGap Framework
This is an open source framework that is used for creating mobile applications with the use of HTML, CSS and JavaScript. This software was introduced in the year 2008 by Nitobi Software and is free to be used by anybody using the MIT license. With this framework, it is possible to develop applications that are used for iPhone, Android, Blackberry, webOS and Symbian WRT (Allen et al., 2010, pg 131). There is a plan to have this framework to support Windows Phone 7 (Get Started 2011). The framework is known to be at its best when it is used for transforming a mobile web application into an application which is native. The main advantage is for web developers since all applications are coded using HTML, CSS and JavaScript (Allen et al., 2010, 131).
The principle that is commonly seen in this framework is that it provides an API which is client-side JavaScript and has a method for hosting web application from within a mobile application which is native that an end user may be required to install. The framework is native in nature and a full screen browser (Firtman 2010, pg 417). Native applications have some capabilities which are not possible such as access to contacts data, geo location, accelerometer and camera, by making use of PhoneGap’s JavaScript API.
The first step in developing PhoneGap will start with writing mobile web application by the use of HTML, CSS and JavaScript. The application content need to have any given structure as the developer has freedom of how to form the mobile web application layout and the structure. It works best on platforms that have with them the Webkit browser with the advanced JavaScript and CSS that is used in HTML5 like iPhone and Android.
The aim of PhoneGap is to make use of advanced features of HTML5 and to make use of standards like W3C Device API Group that give a definition of standards that are to be used by JavaScript APIs for features like contacts and camera. The APIs that are used by PhoneGap diverge from the standards that are set in W3C because most of the Device APIs for W3C have not been fully developed; PhoneGap therefore has to diverge from this standard so that they are in a position to build real and native applications.
Just like other mobile frameworks which make use of the browser for user interface, this framework is not well suited for applications which need intensive calculations, 3D animations and applications which are data-driven. PhoneGap does not have support for database applications; it instead relies mostly on HTML5 for database APIs which is not available for some devices (OP. cit. p. 132).
2.1.1.1 Getting started
The framework supports iOS, Android, Blackberry, webOS and Symbian WRT. The development to support Windows Phone 7 is underway. The main mobile application strategy will get focused on iOS and Android devices.
To start developing the system, the first step would be to download the latest version of PhoneGap; this is found in PhoneGap website and gets the contents of the zipped files. The files in the zip support all the necessary applications for all supported platforms.
2.1.1.2 iOS
The development tools that are used for the iOS are available for only Mac OS X computers. The requirements that should be met when developing iOS is to install the iOS SDK and Xcode; the Xcode include the Xcode IDE, iOS Simulator and a collection of additional tools that are used for developing applications for iPhone, iPad and iPod touch. For one to download these tools one will be required to register as an Apple Developer and that is done freely. This account will enable one to test applications in the iOS simulator but for one to submit applications to the App Store or for one to test the apps on the devices that use iOS, there should be an enrollment in iPhone developer program (Stark, 2010).
When one has explored the file system, there is an iOS directory of the PhoneGap which in it has an installer file that is used to install the PhoneGap template for Xcode. After the installation has been made, a new option under Xcode’s New project window will appear that is used to create a new PhoneGap-based application. When one uses this option, one is able to create an empty PhoneGap project. When one has chosen the base SDK version of the iOS and after setting the application so that it runs in debug mode in the Simulator, the PhoneGap is then ready to run.
Figure 1: Creating a new project in webOS
Figure 2: New project template
2.1.1.3 Android
The requirements that should have been met before one installs Android is that the Android SDK should have been downloaded and also that one has Eclipse, and ADT Plug-in that is used for Eclipse. All these tools are available for all operating systems platform that is Windows, Mac and Linux. After the tools have been installed, a new PhoneGap project can then be created in Eclipse by way of creating a new Android project.
Figure 3: Android new project creation
The created project is a default project for Android and therefore will need some customization so that it fits PhoneGap. The criteria that is used for customization is located at the Getting Started guide of PhoneGap for Android (Get Started 2011).
2.1.1.4 Blackberry
The tools for development for Blackberry are available in Windows XP and Windows 7. For one to develop PhoneGap applications in Blackberry, one will be required to have Sun’s Java JDK, Blackberry Widget SDK, Apache ANT and the most updated copy of PhoneGap.
2.1.1.5 webOS
The development can be done from Windows, Linux or Mac OS X. this is because webOS runs on top of open source virtual machine Virtual Box. When one is developing on Linux or Mac OS X, there are no other requirements apart from having Virtual Box, webOS SDK and PhoneGap installed in their machines. If one is developing using Windows platform, there will need to be an additional component called cygwin. After all the requirements have been installed, a Palm Emulator can be run and in this case, a project example can be installed to the emulator by typing the word “make” in the webOS directory of the PhoneGap in Terminal/Cygwin (Getting Started, 2011).
2.1.1.6 Symbian WRT
The development for this device can be done in Windows, Mac OS X or Linux platforms. The installation files for PhoneGap include an example project that is used for Symbian WRT which can be generated to a Nokia Web Runtime Widget; this can be done by typing “make” in the Symbian subdirectory which is located under the PhoneGap installation directory (Get Started, 2011).
The WRT Widgets can be developed using any text editor but there are free tools that have been developed by Nokia that are meant to be used by Nokia Web Runtime Widget developing and deploying into simulator. Creating a Nokia WRT Widget is possible by use of Nokia WRT Plug-in for the Aptana Studi; these widgets can be run on a browser-based simulator. If the device is running Windows, then there is a Nokia S60 SDK which has a S60 Emulator.
The navigator.service.contacts.find is a Contacts API function that was developed by the W3C and is used to gain access to the contacts of the device. A search function which is successful will trigger a callback function where the returned contact data can be able to be formatted to the application of the PhoneGap using HTML DOM. When all the data that are eligible have been printed, the application is therefore ready to run.
Figure 4: New contact in iPhone
Figure 5: New contact in Android
2.1.1.7 PhoneGap Build
This is a serviced that enables developers to compile and build their PhoneGap applications in the cloud. The use of this is so that it eliminates the need to download and configure the mobile platforms SDKs that are required to build applications which are native (Charland 2010). The principle that is used here is that of writing the application in HTML, CSS or JavaScript and then uploading it to the PhoneGap build service and the app-store ready application binaries that are used for Apple iOS, Google Android, Palm, Symbian modern Windows Mobile 7, Blackberry, Bada and Meego (Introducing PhoneGap Build, 2011).in the month of March, 2011, this service was still in closed beta and will remain in this status of being free for all open source projects. When the launching nears, the pricing will be fixed and announced to be used for commercial purposes (PhoneGap Build FAQ).
3.0 Titanium mobile
This is a framework that is supported commercially. Being an open source, it is used to create native-platform applications through employment of web technologies. It comprise of two key products. Namely; Titanium Desktop and Titanium Mobile, important tools such as compliers and APIs that are used in building target platform, and tools for visual environment termed Titanium Developer that aid to create, run and packaging of Titanium applications are both provided by Titanium Mobile SDK.
On the contrary, IDE it not accommodated within this Titanium Platform including the text editor, the reason behind this is the fact that it is subjected to change, on January 2011, Appcelerator received IDE provider Aptana. The newly acquired Appcelerator will come in with new features such as debugging, code completion, integrated documents and tools for editing.
Appcelerator released a preview version of Titanium studio being its first preview; it has added features such as debugging with code completion together with those that existed in the older Titanium developer features, for instance, its application are possible to be run and deployed.
3.0 Titanium Mobile SDK
As earlier stated, SDK gives room for the creation, running and native application packages as for devices such as iOS, Blackberry, Android by use of cross-platform JavaScript API. The applications of standalone JavaScript engine run against the native APIs. The combination of both JavaScript source code though JavaScript interpreter and static asset is employed by the Titanium Mobile SDK to attain binary application.
On the other hand, Titanium API access native UI components such as bars for navigation, dialog boxes, alerts and menus native devices such as network sound file system, and local database through both UI and APIs platform.
3.1.1.2 Titanium Developer
It is a desktop application that aid Titanium Mobile to create, run, manage and packaging such projects. This application is used to update both Desktop SDKs and Mobile.
3.1.1.3 Getting started
The availability of Titanium platform is meant for Windows 7 and XP which comprise of Android only, Android and iPhone also referred as Mac OS X Snow Leopard and Ubuntu 9.10 which comprise of only Android. Before Titanium is installed it is important that iOS SDKs and Android should first be installed, it is best for one that is running Android SDKs. For further details pertaining Android and iPhone SDKs, their guidelines can be followed through the Appcelerator website stated under Getting Started Guide.
It is always easy for one to download and install Titanium Developer only after iPhone SDKs has been first installed extracted from www.appceletrator.com which is found in the Appcelerator. It is therefore after Titanium Developer has been installed and launched that the program will can move ahead to download the current version of Mobile and Desktop SDKs meant for Titanium. In addition, a free account is expected to be signed up with the Appcelerator Developer center.
Figure 7: Project preferences of the new project
Version 1.6.0 of the text editor is not provided by the Titanium Platform, it is best that the project files are opened by using any available text editor that is familiar to the developer. A preferred option in this case is the Aptana, the is reason is that it is the latest meaning that Appcelerator Titanium that might be released in the future will automatically use it. Developers find this more familiar that any other because it is eclipse-based.
General project similarities
Directory build. Both the resources and native project file are specific to the phone. The build script of Titanium SDK is quite dynamic in such a way that it generates the directory.
Directory of a resource. It comprise of any JavaScript including other files like HTML and image files. In this directory, app.js acts as application entry point as well as root execution context while starting its coding from app.js.
A tiapp.xml file which statically configure applications
Others. Among the stated files are others like change log file in charge of guarding version changes, License files which gives the license for the application and i18n directory which is optional helps in creating resources for localization.
Application project structure 2011
Figure 8: Contacts directory
During programming of contact application, app.js will come first before any application that will be made in the Titanium. As the application is purposely meant for an application of picking contacts which can access into the contacts of Smartphone, app.js only has UI settings and a feature of creating a window which will highlight into the outside part JavaScript file and contacts.js out of which application functionality is located.
In order to control the project with much ease, windows, views, and application logic must be separately placed. As a fact, contact.js files it created so as to perform the duty of holding contacts picker functionality. In case the will be a need to expand the application at some later time, navigation application will be easily created into app.js making contacts picker functionality among the views of application.
Explanation of application code
1. A button which opens a native contact picker application (PIM) be created.
2. Click event listener functionality is attached for listening occasions when the user taps the button and also the user get to see native contacts picker.
3. In case a contact is selected by the user, one should go back and display the key issues pertaining the selected contact of the application like name, phone number, picture and address details.
Explanation of the contact picker by Titanium function
Titanium. Contacts. ShowContacts, which assumes the selected person to be an argument thus running a function which will be, defined when the user has selected a person. Being an object, the returned user data arising from Titanium.Contacts.Person an event can be accessed together with the case.
The full name of a selected person act as an example that emerges from the contact label information text will be shown. From the contacts, other information can serve more than one values. For instance, a person may have two or three phone numbers. In case the phone numbers need retrieval, the data below may best loop through it.
for (var label in e.person.phone) {
var phones = e.person.phone[label];
for (var i = 0; i < phones.length; i++) {
contactinfoLabel.text += label+': '+ phones[i] + '\n';
}
}
Through this example, it is evidenced that phone label text is added such as work or home, in addition, the actual phone number to the information contact to the application is added.
To the left is application running on iOS and to the left running on Android
Building for device
The process of testing the Titanium application is quite direct, this only happens when the Android SDK has been installed. This can be done by turning on the USB debugging that is on the Android device, with the use of a USB cable, connect the device to the computer, run is chosen from the Test and package part of the Titanium Developer. From here, the application can now be installed to the device. USB connection drivers should be installed for Android phone when using either windows or Linux.
There are series of steps that are supposed to be completed before testing an application with the iOS. Among the steps is signing up to the iOS program, registration of iPhone with apple, a certificate is obtained.
4.0 Rhodes
This is a cross-platform framework with Smartphone application under Rhomobile. Its release was in December 2008. Its availability is for windows mobile (to 601), Blackberry, iOS and Android. Applications for Rhodes are created with the use of HTML, JavaScript CSS and Ruby programming languages. Tools for Rhomobile and its frameworks are applicable throughout Linux and windows, Mac therefore calling that the aimed platforms SDKs be installed.
This platform framework is meant for enterprise application, it is well known to present applications with a sequence of screens such as standard UI widgets that comprises common phone UIs.
Rhodes also entails an ORM which is also termed Rhom. It gives a functionality of database-abstraction to pave way for easy programming. Rhysnc is also under the umbrella of Rhodes which is an optimal server; they are standalone mobile sync server that enables enterprise application up to date and also keep users of smart phones available. The device of the user sores information locally which is available after the devices has been disconnected. Rhomobile are the ones responsible for issuing commercial licenses to commercial projects.
4.1 Development architecture
Rhodes is in the pattern of Model-View-Controller. Here, those ways that tend to define actions which lead to HTTP requests will be implemented. As a result, the controller action will pick data at the model which is implemented within the Rhodes ORM Layer; Rhom thus a view is rendered which is then implemented at the HTML ERB.
HTML and CSS aid to define user interface application which re later at runtime rendered in a native UI control included in the application of the Rhodes framework. Occasionally, JavaScript can be serving in the part of interaction control with embedded Ruby application while views can get logic too. Embedded Ruby has many familiarities with PHP; in order to come up with a dynamic HTML the two codes should be mixed for markup.
Compilation of Rhodes files to form native executable that will enable it to be run on either the device or desktop simulator by the use of tools with commands or web interface that is on the rhohub.com. it is only on Blackberry that Rhodes application are not complied to come up with Ruby byte code, with Blackberry, its application is cross-compiled to come up with Java byte code. Ruby executor which is running byte code of the device is an example of Rhodes. Submission and distribution of native mobile applications can be done by stores like iTunes App Store.
4.1.1 Getting started
Ruby and its library packaging system, GNU make and RubyGems should be installed as required by Rhodes. In addition a preferred target platform for SDKs device also needs installation. In case windows are being run, it is required that all tools and Rhodes be installed also with the use of Rhodes installer executable. In other instances, Rhodes is installed by simply typing “gem install Rhodes”.
After finishing the installation of the Script, configuration of Rhodes can be done by also typing “Rhodes-setup” available in the command line. Mobile platform SDKs is configured through Rhodes setup script.
4.1.1.2 RhoHub
This being a cloud services it is under Rhomobile which play a role of offering services for supported Smartphones. It is mainly to make both developed and deployed experience simpler.
5.0 Comparison of PhoneGap with other frameworks
When this framework is compared with other framework, it is clear that PhoneGap has the best code that is written once and run anywhere. Unlike other frameworks which implement native user interface elements, PhoneGap makes use of HTML/CSS user interfaces that are similar on each platform. Comparing it with Titanium, it is clear that the latter has classes which are specific to the platform that is being used. This is the case with Titanium even in situations where the user interface has been created. When it comes to use with other platforms Titanium relies on native user interface on every platform that has been given while PhoneGap gives a user interface experience that cuts across platforms.
The current situation of clients where there is the use of many platforms requires that a framework be usable in many platforms. This is where PhoneGap beats other frameworks. PhoneGap is known to have the widest platform support; the developments that will enable it to support Windows are underway. Clients would like to be given the capability to develop applications that will be used for iOS, Windows Phone 7, and Android. There is therefore the need by clients to develop such capabilities. Although this is the case, PhoneGap will also fit the development of applications which require a branded look and feel.
There are some disadvantages that are associated with this framework. The development phase of the framework seems to be slow but it can be regarded as growing in a stable phase. Compared to Titanium and other frameworks, PhoneGap can be said to support more applications which are lightweight and web-based; this is because it does not have a comprehensive API coverage. PhoneGap has risks which are easy to manage because it can be used to create lightweight applications and making sure that if large applications are to be created, and then there is a need to buy PhoneGap official support services. This will be in quest to mitigate the risks.
6.0 Conclusion
There is a need to work on frameworks which are cross-form. This is because PhoneGap, given that it is cross-platform and therefore has an extra layer in programming stack, will mean that the application that uses it will be affected in the performance. Safe for this, the platform is seen to be efficient and the way to go. PhoneGap is seen to be a framework of choice for many users. Since most processes are becoming web-based, PhoneGap platform will win over the other platforms and it will therefore mean that it will receive a wide support. There is convincing developments that are seen on mobile devices. For this reason, the likes of PhoneGap are bound to gain popularity.
Recommendation
With the history that has been seen with the evolution of cross-platform, the 1990s saw the evolution of desktop computing. With the evolution and the advent of the Web, smart phones and tablets the traditional desktop computing is seen to be moving towards mobility. The development of software will be more on mobile development and will be less of desktop development. With smart phones, it is easier to do the tasks that are done with desktop computers today like social media, graphics and even word processing. There are many people who are using smart phones and yet they do not use desktop computers. The uses and the potential of smart phones are enormous. Mobile applications are developed and enhanced daily with new applications being developed for use by various people like patients to communicate with doctors.
This paper therefore recommends that there is a need to have a common framework that will be used to create the applications that are used for communications. There is a need to ensure that the frameworks have a common platform. With eth adoption of mobile phones, the numbers will increase and this will mean that the manufacturers will be many and therefore different platforms will be developed in future. It is therefore important to ensure that the platforms where these applications are developed are universal.
Another aspect of mobile development platforms is that of security. There is a need to have a security procedure so that the applications are as secure as possible. This will ensure that the users are not exposed or left to use applications which are not secure. With the standardization of application development, security will be taken care of.
References
Allen, S., Graupera, V. & Lundrigan, L. (2010). Pro Smartphone Cross-Platform Development: iPhone, Blackberry, Windows Mobile and Android Development and Distribution. 1st Ed. New York: Apress.
Charland, A. 2010. Blog on Nitobi Website. Accessed on 15 October 2011. Http://blogs.nitobi.com/andre/index.php/2010/11/09/build-phonegap-com-privatebeta-opening/.
Firtman, M. (2010). Programming the Mobile Web. CA: O’Reilly Media, Inc. Sebastopol.
Get Started. 2011. PhoneGap Getting Started tutorial. Accessed on 17 October 2011. Http://www.phonegap.com/start.
Getting Started (2011). PhoneGap Getting Started tutorial. Accessed on 12 October 2011 from Http://www.phonegap.com/start.
Introducing PhoneGap Build. n.d. PhoneGap Build official website. Accessed on 15 October 2011. Https://build.phonegap.com/.
OpenPlug Support Forum. n.d. (2011). Developer forum on OpenPlug Developer Zone website. Accessed on 14 October 2011. Http://developer.openplug.com/forum/.
PhoneGap FAQ. n.d. PhoneGap Frequently Asked Questions on PhoneGap website. Accessed on 31 March 2011. Http://www.phonegap.com/faq.
Sebastopol: O’Reilly Media, Inc.
Stark, J. 2010. Building iPhone Apps with HTML, CSS and JavaScript. 1st Edition.
Appendix A: Rhode application contacts
Appendix B: iPhone Contacts
Appendix C: iPhone and RhoHub contacts compared