Web Technologies Uses and Recommendations for Mobile Development

Similar documents
Issues of Hybrid Mobile Application Development with PhoneGap: a Case Study of Insurance Mobile Application

Cross-Platform Tools

How to Choose Right Mobile Development Platform BROWSER, HYBRID, OR NATIVE

HYBRID APPLICATION DEVELOPMENT IN PHONEGAP USING UI TOOLKITS

Mobile Development Frameworks Overview. Understand the pros and cons of using different mobile development frameworks for mobile projects.

Building Mobile Applications Creating ios applications with jquery Mobile, PhoneGap, and Drupal 7

Making the Most of Existing Public Web Development Frameworks WEB04

Enterprise Mobile Application Development: Native or Hybrid?

Cross-Platform Phone Apps & Sites with jquery Mobile

SYST35300 Hybrid Mobile Application Development

Mobile App Infrastructure for Cross-Platform Deployment (N11-38)

WEB, HYBRID, NATIVE EXPLAINED CRAIG ISAKSON. June 2013 MOBILE ENGINEERING LEAD / SOFTWARE ENGINEER

Mobile Game and App Development the Easy Way

Native, Hybrid or Mobile Web Application Development

place/business fetch details, removefromfavorite () function, 189 search button handler bind, B BlackBerry build environment

Developing Cross-platform Mobile and Web Apps

Mobile Learning Application Based On Hybrid Mobile Application Technology Running On Android Smartphone and Blackberry

MENDIX FOR MOBILE APP DEVELOPMENT WHITE PAPER

Mobile Application Development

Cross Platform Applications with IBM Worklight

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

Navigating the Mobile App Development Landscape

CHOOSING THE RIGHT HTML5 FRAMEWORK To Build Your Mobile Web Application

White Paper INTRODUCTION. In mobile development, there are three different types of applications: PRE-SMARTPHONE MOBILITY NATIVE MOBILE APPLICATIONS

CROSS PLATFORM APP A COMPARATIVE STUDY

Mobile web apps: The best option for business? A whitepaper from mrc

Article. One for All Apps in HTML5

Native, web or hybrid mobile-app development

Electronic Ticket and Check-in System for Indico Conferences

Developing and deploying mobile apps

THE BUSINESS CASE FOR HYBRID HTML5 MOBILE APPS

Our software strategy

Chapter 1. Introduction to ios Development. Objectives: Touch on the history of ios and the devices that support this operating system.

Development of mobile applications for multiple platforms

Middleware- Driven Mobile Applications

Mobile App Proposal Magazine company- @address.com. January 12, y. Direct Contact.

Choosing a Mobile Application Development Approach

Cross-Platform Development

HTML5 the new. standard for Interactive Web

Bridging the Gap: from a Web App to a Mobile Device App

Firefox for Android. Reviewer s Guide. Contact us: press@mozilla.com

Here s how to choose the right mobile app for you.

Take full advantage of IBM s IDEs for end- to- end mobile development

Lecture 4 Cross-Platform Development. <lecturer, date>

Choosing a Mobile Strategy for Your Business

max firt.mobi martes 26 de julio de 11

QML and JavaScript for Native App Development

Designing for the Mobile Web Lesson 3: HTML5 Web Apps

Cross Platform Applications with IBM Worklight

Retool your HTML/JavaScript to go Mobile

A Beginners Guide To Responsive, Mobile & Native Websites 2013 Enhance.ie.All Rights Reserved.

Workshop on Android and Applications Development

Making Web Application using Tizen Web UI Framework. Koeun Choi

Etanova Enterprise Solutions

HTML5 Applications Made Easy on Tizen IVI. Brian Jones / Jimmy Huang

Building native mobile apps for Digital Factory

Mobile Technique and Features

Development for Mobile Devices Tools from Intel, Platform of Your Choice!

MOBILIZING ORACLE APPLICATIONS ERP. An Approach for Building Scalable Mobility Solutions. A RapidValue Solutions Whitepaper

Quick Start Guide Mobile Entrée 4

HTML5 : carrier grade

INFORMATION TECHNOLOGY STANDARD

research: technical implemenation

Evaluating Cross-Platform Development Approaches (WORA Tools ) for Mobile Applications

How To Use Titanium Studio

How to start with 3DHOP

Native mobile apps: The wrong choice for business?

Statement of Direction

Site Configuration Mobile Entrée 4

The Suitability of Native Application for University E-Learning Compared to Web-Based Application

Cross-Platform Mobile Apps Solution

HTML5 & Digital Signage

the intro for RPG programmers Making mobile app development easier... of KrengelTech by Aaron Bartell

HTML5 as the Core Technology of the Mobile Enterprise

ios Hybrid Mobile Application Development

Republic Polytechnic School of Infocomm C308 Web Framework. Module Curriculum

HTML5 / NATIVE / HYBRID

Rhomobile cross-platfrom

HTML5: Separating Fact and Fiction. #wipjam

ACE: Dreamweaver CC Exam Guide

Lee Barnes, CTO Utopia Solutions. Utopia Solutions

ORACLE ADF MOBILE DATA SHEET

Dealing with the Dilemma: Mobile App Development Approach & Decisions

Mobile Application Platform

About Blue Sky Sessions

Adobe Summit 2015 Lab 712: Building Mobile Apps: A PhoneGap Enterprise Introduction for Developers

Platform Independent Mobile Application Development

Development Techniques for Native/Hybrid Tizen Apps. Presented by Kirill Kruchinkin

Developing Exceptional Mobile and Multi-Channel Applications using IBM Web Experience Factory IBM Corporation 1

Armedia. Drupal and PhoneGap Building Mobile Apps

Mobile Web Applications using HTML5. L. Cotfas 14 Dec. 2011

Native vs. HTML5 Mobile App Development

... Introduction Acknowledgments... 19

Conference Paper. Distributed Performance Systems using HTML5 and Rails. Dr. Jesse Allison 1.

ipad, a revolutionary device - Apple

To Study and Design a Cross-Platform Mobile Application for Student Information System using PhoneGap Framework

Adobe Flash Catalyst CS5.5

ios SDK possibilities & limitations

Getting Started with iphone SDK, Android and others: Mobile Application Development Create your Mobile Applications Best Practices Guide

Developing Exceptional Mobile and Multi-Channel Applications using IBM Web Experience Factory

Transcription:

Web Technologies Uses and Recommendations for Mobile Development HELDER TROCA ZAGALO Department of Electronics, Telecommunications and Informatics University of Aveiro 3810-193 Aveiro PORTUGAL htz@ua.pt http://www.ua.pt Abstract: In the last years, mobile devices market has grown sharply and with it the possibilities for applications makers. This expanding market is currently dominated by two operating systems: Android and ios. Although this two have a big share of the market it s in the creator s interest to develop applications that are compatible with the largest possible number of devices and operating systems. This paper reflects a study work, assessing technologies and development practices, to propose a set of recommendations for mobile applications development, in order to be easier to create mobile applications, compatible with the most devices and systems. This set of recommendations is based on the use of web technologies. Key-Words: Mobile Development, Hybrid Applications, Web Technologies, jquery, Sencha Touch 1 Introduction The web has become very important in the life of most people, either to navigate information, play a game or just staying in touch with the world. Therefore the technologies inherent to the web have greatly evolved in the last 15 years (since the arrival of the version 4 of HTML) and with that many possibilities for developers. Smartphones, on their side, became the tool by excellence, which allows everybody to always be connected and online. These devices have seen a huge increase in sales in the last 3 years (60% CAGR Compound Annual Growth Rate [1]), which shows clearly new people s trends. Today people want to do much more than just call and send messages to someone with their mobile phones. Similar to the web, also smartphones have changed a lot in the last 3 years, evolving from smartphones with single cores, low processing power and poor connectivity, to real pocket computers. This evolution opened the door for programmers to develop more complex applications, which make a better use of the devices that they are targeting and therefore offer the users more appealing options in terms of what they can put in theirs phones. Despite this, developers still encounter a lot of problems when developing applications, each one trying to realize how to reach a bigger audience with the product they develop. Nowadays, the smartphone market is mainly controlled by Android and ios (with 68,8% and 18,8% of the market share in 2012 respectively [2]) therefore it s only logical that developers focus their attention in making applications for both platforms. However that can be somehow problematic to achieve, since developing for Android (Java) is considerably different from developing for ios (Objective-C) and therefore the same application has to be developed two times, which can be very time consuming. Furthermore some developers might want to dwell in Windows Phone or Blackberry world, among others, and that will take more time and different sets of skills. To solve this problem one solution could consist of hiring a development team for each targeted platform developing the same application, but this would require more resources which sometimes are not available. An alternative solution would be to resort to Web technologies like HTML5, CSS3 and JavaScript and develop applications that would be able to follow the Develop once deploy anywhere philosophy. This means that an application developed using web technologies is able to run in Android, ios, Windows Phone, etc., with minimal code changes. This kind of applications is known as hybrid, because it uses web technologies but is packaged in a native container. This paper is mainly focused in studying some web frameworks used nowadays for the development of hybrid mobile applications, ISBN: 978-1-61804-281-1 191

particularly jquery Mobile (JQM) and Sencha Touch (ST). From this study, it's drawn some conclusions about the applications developed with these technologies, like: performance, user interface, easy development, and which framework can be more suitable for mobile development as opposed to native technologies. 2 Mobile Market During the last 6 years (since the appearance of the first IPhone), the smartphone market has been growing rapidly. From 139.288 thousands devices sold in 2008 [3] to 1.746.176 thousands in 2012 [4], the growth has been astonishing. This growth can be assigned to the necessity that people have to access information on the internet, check their email or use social networks [5] in any place they are. Basically the smartphone is a small computer, a camera, a cellphone, a notebook, a GPS and much more, and it fits in the pocket (most of the time). Despite how big this market has become, it is also one of the most competitive and prone to change market in the world. Since 2008 the major market holders in this field have changed drastically. At that time Android was just starting to make his first steps with his first smartphone, the T- Mobile G1 [6], while Mac OS X accounted for 8,1% and Symbian for 52,4% of the smartphones sold that year [3]. As seen in Fig.1, currently the scenario is very different and in 2012 68,8% of the smartphones market share belonged to Android, 18,8% to ios and only 3,3% to Symbian [2]. Java and ios applications are written in Objective- C. This reason alone is enough to make things very complicated, since the application made in one platform will have very little to no code that could be used in the other platform, meaning that the developers would have to develop the same application twice. This scenario puts a big deal challenge which can be overcome in different ways, and one of them can be the cross-platform development, using less intrusive technologies like web technologies. This solution has a major benefit, it complies with the develop once, deploy everywhere approach which allows a great saving of resources. And it s completely practicable, once all smartphones have direct support for web browsing. 3 Web Technologies and Frameworks Since its emergence to the present day, web technologies have undergone a major evolution. Not only HTML, but also other technologies like CSS and JavaScript, for example. What made possible the current development of standalone applications using technologies that initially had been planned just for the web. 3.1 HTML 5 W3C released HTML 5 as a W3C Candidate Recommendation [7] in December 2012. Fig. 1 Smartphone operating system s market share For smartphone application developers this means that theirs applications will reach more costumers if they have their applications published on the Play Store (Android) and on the App Store (ios). But this can be somewhat difficult to achieve, since developing an application for Android is very different from developing an application for ios. These differences start right from the programming language, since Android applications are written in Fig. 2 HTML 5 features This evolution of the HTML standard offers a lot of features that makes developing mobile applications with HTML5, JavaScript and CSS viable to the point that, according to a study made by Developer Economics, 50% of the developers inquired by their study, already use HTML as a development or deploy technology [1]. This is attributable to web developers already having the necessary knowledge to work with these ISBN: 978-1-61804-281-1 192

technologies, making their interest in the rising smartphone application market grow. HTML5 is trying to bring innovation to the web. This innovation comes on the back of the flagship features of this technology. These features are meant to make web safer, faster, easier to use in all kind of devices and much more. To accomplish this, HTML5 count on the following (Fig. 2): offline storage; improved storage; better connectivity; improved file access; richer semantic support; audio and video support; 3D graphics; CSS3 support; better performances; and smaller improvements that can make the difference. Most of these features greatly help in developing smartphone applications that can match what native applications have to offer. These features are very easy to use, since HTML5 offers a lot of API s that give the developers a lot of tools to start developing with this technology. In the present context, some of the most important API s are the ones which use GeoLocation and motions sensors because they take advantage of the smartphone sensors and connectivity, and the media, client side storage and the canvas drawing API, because these ones allow the applications to be more flexible and to include many features the users are already familiar with. 3.2 CSS3 Similarly to HTML, CSS also has seen an evolution over the years, which helped the developers create better applications for their users. CSS3, which is supported by HTML5, gives the developers a lot of possibilities in terms of theming their applications to look more polished, beautiful and faster, with the access to new features. CSS3 is split in to modules that add extra features to the CSS 2.1 standard. Some of these modules are: selectors; box models; background and borders; 2D and 3D transformations; animations. From the mentioned modules above the animations and 3D transformation modules are very important in mobile development, because they give the developers the power to create more beautiful user interfaces, with smoother transitions, which give the user a more pleasant experience. Since CSS 3 is backwards compatible, if a browser doesn t support a module from the most recent version, it will fall back on the previous version of CSS, but because the most used browsers already give support to many of the features, the developers can take advantage of this to make applications that have more enjoyable interface. Other important detail about the backward compatibility is the fact that some features can be deactivated to create faster transitions and a smoother navigation on slower devices. This sometimes will be necessary because some of these features can be quite heavy and make the device performance drop significantly. 3.3 JavaScript Frameworks for Mobile Development JavaScript frameworks are very important tools to help in the development of mobile web applications. These frameworks facilitate the development by giving the developers features that help them create mobile applications that feel as native as possible, something very important to attract the users to their product. These features include the capability to add touch listeners, theme tweaking, access some device hardware resources, etc. There are several JavaScript frameworks focused in mobile development such as: jquery Mobile [8], Sencha Touch [9], Dojo Mobile [10], Zepto [11], XUI [12], Wink Toolkit [13], etc. In this paper, the focus is placed over the first two frameworks. 3.3.1 jquery Mobile One of the reasons behind choosing jquery Mobile is that it is based on the jquery JavaScript framework that is used by a lot of web developers, making it easy for them to make the transition to the development of mobile web applications. Another reason to why jquery Mobile was chosen is the fact that in the development community it is widely used and though as a good framework, with a lot of nice features, support for almost every platform and can be easily themed to fit the design needs that a developer may have. jquery Mobile (jqm) is a JavaScript framework owning in its core the jquery and jquery UI technologies, but has implemented many more functionalities which make it suitable to build mobile applications that use touch as the main way of interaction between the user and the device [8]. One of the goals of jqm is to give support to as many platforms as possible. To understand how the platforms behave with the jqm framework, it uses a grade system, that grades the platform with A (full support), B (full support except for Ajax) or C (basic HTML) according to which features can be used. Some of the main platforms that jqm assign grade A, are: Apple ios (from version 3.2), Android (from version 2.1), Windows Phone (from version 7.5), Blackberry (from version 6) and Palm WebOS (from version 1.4). ISBN: 978-1-61804-281-1 193

3.3.2 Sencha Touch As for Sencha Touch (ST) one of the main reasons that led to choosing this framework was the hype generated around Fastbook [14]. Fastbook is an implementation of the web application Facebook (that currently is developed using native tools, after abandoning the development with HTML5) with the Sencha Touch framework and their developers claim that Fastbook is much faster than the original implementation. That claim generated a lot of curiosity around Sencha Touch and so it was considered for assessment in this work. This reason alone is not enough to choose this framework, but ST is also very production ready. It uses technologies which makes smoother the development process and transition from pure web development to mobile application development. Sencha Touch is a HTML 5 mobile application framework, developed by Sencha, which has in its core the class system from Ext JS [15] and uses the MVC architecture [16]. Although not giving support to as many platforms as jquery Mobile does, ST still gives support to the most import platforms on the market, which include: Apple ios, Android, Windows, BlackBerry, and Tizen. The Ext JS class system offers the developers a kind of class-based programming, that let them use techniques like inheritance, dependency loading, and use many configuration options (a good tool to tweak the applications),etc. [17]. The dependency loading is an excellent way to make the applications smaller, only using the framework resources that are needed, resulting in a smaller and lighter application. The idea behind MVC architecture is to separate the business logic (Controllers and Models) from the user interface (the Views) of an application. To be more specific the View contains the information about the UI, the Controllers contains the information about how to handle the user actions and events and the Model defines the data/business model used by the application [16]. In ST this is very useful for three main reasons: history support (the possibility to navigate within the application, according to the navigation history); deep linking (possibility to access any screen in the application); and device profiling (since developing crossplatform applications is one of the reasons to use a tool like Sencha Touch, the ability to make profile for the different platform, devices and even screen sizes is invaluable). 3.4 Other Mobile Development Tools When talking about web based mobile applications development, an inevitable topic, which comes across, is the use of Phonegap. This is an open source framework used as a container technology for web applications, so they can be installed as native applications in mobile platforms [18]. Phonegap is widely used because it offers an interesting set of APIs which gives access to some smartphone features and because it makes easier the process of deploying application in several platforms. However, the use of Phonegap has a main issue: its weight. It turns all applications developed with it very heavy. It puts another layer of code between the running environment and the application, and since most of the times it s used in conjunction with mobile development frameworks (like jquery Mobile or Sencha Touch), this can make applications very slow. 4 Mobile Development Case Study In order to study the impact of using web technologies for generalized development of mobile applications, it was used a mobile application, already existing and previously developed with native technology, and it was then replicated resorting to web technologies. This approach was considered the best one to take, since replicating something already implemented and working properly would avoid a lot of phases in the development process (concept choose, UI mockups, etc.) and, most important, should allow to compare the new mobile development approach with the traditional one, using native technologies. The chosen application to be used as the case study was an application provided by Portugal Telecom, the main Portuguese Telecommunications Company. This application allowed studying mainly user interfaces development and some storage/load impact on machine resources and runtime execution. 4.1 User Interfaces The case study application allows its users to see and change information about their account, as well as track events, promotions and service usage of their mobile phones. This is an application, mainly based on access to web services that allows the access to remote information. It has strong requirements on user interface, which must be very easy and intuitive to use, and capable to provide all needed information to the user, taking into account ISBN: 978-1-61804-281-1 194

the reduced display size from smartphones. In Fig. 3, it can be seen the first and main s view. In mobile platforms, as smartphones for example, the interface of an application and its functionalities have to blend very well together, to give the user the best possible experience, providing him all useful information in a clear, easy, and pleasant way. Generally, not native technologies have great difficulty to achieve an application with the same level of visual integration than native ones. Fig. 3 Case study application s main view. In order to conduct this study, the mobile application was again developed, using the referenced web technologies jquery Mobile and Sencha Touch, and comparisons were made to assess which one could be a major recommendation for mobile development. 4.2 Developing with jquery Mobile To start the development process, with jqm, it s necessary to make reference, in the index.html file, to the JavaScript s files from jquery and jqm and to the CSS file from jqm. This can be done either by: refereeing to a CDN in the index.html, that host the files, which avoids the need to store the files locally, saving some amount of storage space; or by adding the files to the project and then the index.html referring to their local path, preventing the application from stopping completely its access to the jqm functionalities if it can t reach the CDN. Since the three files have a combined size around 330 KB, the recommendation is clearly to use a local copy, which can be shared by all applications developed upon the same framework, and without internet access needs. With a markup driven architecture, putting all the UI elements in the screen, using only HTML5, is the easiest way to create the interface. Again, a development decision must be made on how to organize the files in the project. In jqm, the developer can have all the pages in a single HTML5 file; one HTML5 file for each page; or a mixture of the two. Having all the pages in the same file will make the initial load slower but after that the transitions between pages will be faster, since the application doesn t have to fetch the new page on a different file. So, the recommendation is to use a mixture approach: putting all most used pages inside a single HTML5 file, like ones implementing main options in the application. And putting all other pages, like ones implementing settings configuration, for example, in different files. This will achieve a more balanced loading process, with minor repercussion on application execution. In jqm to declare a view or page, the developer needs to put the attribute data-role set to page within an element (in current application, it was always used in a <div> element) inside the <body> of the HTML5 file, as follows. <div data-role="fieldcontain"> <label style="color: white; font-size: 15pt" for="username">identifiant</label> <input type="text" name="identifiant" id="username" value="" placeholder="username"/> </div> Due to this, each view in the index.html file was defined by the use of this attribute, and to identify each page when navigating between the divs, each one had a unique identifier. Other detail taken into account when using multi-view template is that the first screen displayed when the application is loaded, is the first element with the data-role attribute set to page in the index.html file, which in this case will be the Login screen. 4.3 Developing with Sencha Touch The setup of a Sencha Touch project can be a lot more complicated than the setup of a jqm project, but Sencha offers the developers the right tools to make this process as simple, fast and efficient as possible. The most important tool is the Sencha Cmd, which for a proper development is absolutely necessary. It creates all the MVC structure, includes the ST SDK, compile, package and deploy the ISBN: 978-1-61804-281-1 195

application, with all desired configurations, in a very efficient way. Next frame shows an example of a command line used to create an application project with Sencha Cmd. Sencha generate app AppName /path/to/appname Unlike jqm, in Sencha Touch the developers must put all the information about external resources they want to use in a file named app.json. This file will include the path to external JavaScript and CSS files and other resources like images, icons, data, etc. To create a page, its view must be created in the first place. There are three very important settings that need to be defined when starting a view: the extend field, which defines the parent class that the view extends; the xtype field, which defines the shortcut to the view name; and the requires field, which defines the UI component required by the view, so they are included when packaging the application. All the pages in the application will extend the component Container that, as the name suggests, is a component that can contain other components in it. To make it easy to refer each page, their xtype will be the same as their name, but beginning in lower case. To add components, like buttons, labels, text fields, etc., to the view, two methods are available: either add them to the container in the initialize field (this field let the developer define a function that will be triggered when the view is initialized); or inside the configuration field of the container where in the items field all the components of the UI can be declared. In this case study, both methods were used for testing purposes, but for demonstration purpose only, the code snippet bellow shows the components adding in the initialize function. Ext.define("Application.view.Page", { extend : "Ext.Container",... initialize : function() { this.callparent(arguments); var title = { xtype : "label",... }... this.add([title, box]); }... } To modify the default behavior of Sencha components and get them with a very similar look to the ones in the original application, Sencha Touch uses SASS files generated by the Sencha Cmd. When Sencha Cmd creates an application, in the SASS folder, inside the resources folder, there is an empty SASS file which is intended to be used if developers want to change the overall look of the Sencha Touch visual elements. To make a button look similar to the one in the original application, for example, it was necessary to change the base colour, the active colour and the base gradient of the scheme. Since the modified SASS file changes the whole theme and then is added to the project in a way that overrides the default theme, there was no need to change anything more when declaring the button, since the new theme is now the default one for buttons and all other visual components. 4.4 Assessment The assessment of the two used web technologies was made in three dimensions: features implementation; performance indicators; and community support. 4.4.1 Features Implementation The focus of this dimension is the experience gained while implementing some features in the application. To best show what was learned during this practical task, the implementation of some key features was analyzed in terms of implementation difficulty and performance and design/look achieved. It was assigned a grade to each term, for each technology in use, ranging from 1 (low) to 3 (high). The results are gathered in table 1. Features Evaluation Criteria jquery Mobile Implementation Difficulty Performance Design / Look Sencha Touch Implementation Difficulty Performance Design / Look List Scrolling N/A 3 2 N/A 2 2 List Filling 3 3 N/A 1 2 N/A Page Transition 3 2 3 3 2 3 Data Storage 3 2 2 2 3 3 REST Requests 3 3 N/A 3 3 N/A Swipe / Drag Events 3 2 1 3 2 2 Side Menu Panel 3 1 1 1 2 3 Tap Events 3 2 3 3 2 3 Themes Use 2 2 2 1 3 3 Total 23 20 14 17 21 19 Table 1 Comparison of features implemented ISBN: 978-1-61804-281-1 196

Considering that all features have the same weight, the table shows in its last row the sum of each column. In a linear way, it s possible to conclude that Sencha Touch had better grades overall than jquery Mobile. For this assessment, it was previously foreseen to use an overall evaluation, using a set of criteria proposed by the Software Sustainability Institute [19], but several instantiations of this set, in this study, showed that it is too general to compare, in a very real way, the use of both technologies. 4.4.2 Performance Indicators To get a more concrete evaluation about the technologies in study, it was measured the memory and storage space needed for each implementation of the case study application. These can be seen has indirect performance indicators, assuming that high memory requirements generally impose lower applications performances. The main objective of these measurements is to present some results that are not subject to developers or users subjective interpretation. In table 2 are presented these measurements. Memory Disk Space ios Native 36,52 MB 2,2 MB ios jquery Mobile 62,15 MB 11,2 MB ios Sencha 91,05 MB 11,9 MB Android Native 46 MB 1,52 MB Android jquery Mobile 72 MB 1,77 MB Android Sencha 76 MB 2,11 MB Table 2 Memory and disk space measurements. What can be concluded from the values in table 2? For sure, development with native technologies presents always better performances in all platforms something already expected. As for the web technologies, jquery Mobile has an edge in these performance indicators and although the difference is small, it can be decisive when choosing a framework to use. 4.4.3 Community Support From the data gathered in table 3 it s easy to see that jquery Mobile has a much greater support and visibility by the development community, this being most noticeable when taking into account that in Stack Overflow, JQM has more than 3 times the questions of Sencha Touch and is referenced in a much greater number than ST in Google Scholar. However, Sencha Touch own developer forum is used more frequently, which indicates that the developer can get valuable help from moderators, which are experienced ST users, and has much more followers in social networks. StackOverflow jqm Sencha Touch Active Questions 14 030 3 300 Unanswered 4 880 1 026 Followers 1 885 562 Google Scholar jqm Sencha Touch Search Results 899 365 Quotes 124 22 Patents 6 3 Developer Forum jqm Sencha Touch Threads 11 933 17 179 Posts 26 389 73 548 Social Networks jqm Sencha Touch Twitter 13 700 19 640 Facebook 4 068 15 958 LinkedIn 1 583 4 589 Google+ 588 1 550 Table 3 Community support assessment In the community support s dimension it s clear that the two technologies are well represented and neither one has a serious advantage over the other. 5 Performance Enhancements When developing any software, performance is always a concern in the mind of the development team, therefore knowing some practices/tricks that may help make a program faster, smaller or more appealing are very useful. In the course of this work, some of these practices have been studied and are presented below. One of the most important issues when developing applications with web technologies is their size. One way to reduce the space of an application is to minimize the CSS and JavaScript files. This simply consists in removing unnecessary characters, like white-spaces, tabs and returns, making the files smaller and faster to load. When using JavaScript to access or change anything displayed on the screen it s necessary to find the DOM elements and then manipulate them accordingly. These type of searches, most of times, are not a burden for the application, but if they are made many times, they start to be noticeable in its flow. One way to prevent this problem, when knowing that some elements are necessary more than a few times, is saving them in a variable and therefore avoiding search the DOM. Mobile application developers that chose to develop with web technologies should have in mind the variety of mobile devices that can use their applications and the different hardware capabilities from each one. This is important because some ISBN: 978-1-61804-281-1 197

features offered by HTML5 and CSS3 are more demanding on the hardware platform and sometimes don t give many advantages in user experience. Some of the features that developers might consider avoiding while developing such applications are: 3D animations transitions with this kind of animation can be slower on older, less powerful devices; box shadows and gradients they are drawn dynamically, therefore actions like scrolling a list with lots of these features can feel sluggish. When the applications being developed have to make CPU-heavy operations, their usability might decrease, since the interface will become nonresponsive. To avoid this problem, HTML5 offers the developers the possibility to use web-workers. Web-workers are JavaScript code that can run simultaneously with other JavaScript files, avoiding the interface becoming unresponsive while being executed. However, developers which use this tool have to keep in mind that web-workers cannot modify any interface related feature directly (they cannot access the DOM), they can only return the data processed to the main JavaScript and then that data can be handled accordingly and displayed to the user. The visual aspect of mobile applications is very important, because this characteristic can be instrumental in attracting users to the product. The way the visual elements of an application interact with each other (especially when they are complex) is very important to give the user a good experience. To enhance the way these interactions, transitions and other visual operations look, developers can enable the hardware-acceleration from the mobile browser. This trick will force the browser to use the GPU in any process that draw on the screen. Enabling this features can be done in some configurations, specific to each platforms targeted, but an easier way to accomplish this, is by tricking the browser into enabling itself, using the CSS code presented in the snippet bellow, which triggers this feature. -webkit-transform: translatez(0); The code above target only browser with webkit as their rendering engine. Another small trick that can make increase the usability of the application is putting the CSS in the header of the HTML file. This will give the user the illusion that the page is loading faster, since the page will load progressively without the necessity to redraw elements if the style changes [20]. 6 Conclusions This work focused on the development comparison of mobile applications resorting to web technologies like HTML5, JavaScript and CSS3, which were presented as a possible alternative to native development. To make a better use of the features offered by these technologies, were used two JavaScript frameworks, focused in the development of a mobile application: jquery Mobile and Sencha Touch. During the development process both frameworks were being studied and when the applications were finished, the final conducted evaluation resulted in Sencha Touch being selected as the preferable framework for development. The reasons behind this preference were mainly structural. The fact that it promotes the use of a MVC pattern and provides tools that make the deployment process much easier and structured, without making it much more complex, is very relevant. Although Sencha Touch gained the election for preferable framework for development, jquery Mobile also presented advantages like its learning easiness, the great amount of support from the development community and better results, when talking about performance indicators. After all the development, performance measurements, frameworks analysis and cross platform testing, what can be concluded from this study is that web technologies are already a viable alternative to native development when talking about mobile applications. However, this conclusion must be looked with caution, because hybrid applications aren t now and probably will never be, as powerful as native ones if looking purely at performance numbers. But this doesn t mean that hybrid applications can t have a large market, especially in applications that don t require a lot of processing power and interface manipulation and need to be available in many different platforms in a very short amount of time. Also, with the constant evolution in web technologies and mobile browsers, the features made available by hybrid applications will tend to grow. References: [1] Vision Mobile, Develor Economics 2013 - Developer Tools: The Foundations of the App Economy, pp. 1 61, 2013. ISBN: 978-1-61804-281-1 198

[2] CNET, Android, ios combine for 91 percent of market [Online]. http://www.cnet.com/news/android-ioscombine-for-91-percent-of-market/ [Accessed: 03-Jan-2015]. [3] Gartner, Gartner Says Worldwide Smartphone Sales Reached Its Lowest Growth Rate With 3.7 Per Cent Increase in Fourth Quarter of 2008. [Online]. http://www.gartner.com/newsroom/id/910112. [4] Gartner, Gartner Says Worldwide Mobile Phone Sales Declined 1.7 Percent in 2012. [Online]. http://www.gartner.com/newsroom/id/2335616. [5] Online Publishers Association and I. Frank N. Magid Associates, A Portrait of Today s Smartphone User, no. August, 2012. [6] HTC Corporation, HTC - Press - 2008 - T- Mobile Unveils the T-Mobile G1 the First Phone Powered by Android. [Online]. http://web.archive.org/web/20110712230204/ht tp:/www.htc.com/www/press.aspx?id=66338&l ang=1033. [7] R. Berjon, HTML5 Smile, it s a Snapshot! - W3C Blog. [Online]. http://www.w3.org/qa/2012/12/html5_smile_i ts_a_snapshot.html. [8] The jquery Foundation, jquery Mobile jquery Mobile. [Online]. http://jquerymobile.com/. [Accessed: 03-Jan- 2015]. [9] Sencha Inc., HTML5 Mobile App Development Framework. Download Sencha Touch Free. Sencha Touch Products Sencha. [Online]. http://www.sencha.com/products/touch/. [10] The Dojo Foundation, Dojo Mobile - The Dojo Toolkit. [Online]. http://dojotoolkit.org/features/mobile. [11] T. Fuchs, Zepto.js: the aerogel-weight jquerycompatible JavaScript library. [Online]. http://zeptojs.com/. [Accessed: 03- Jan-2015]. [12] GitHub, A tiny javascript framework for mobile web apps [Online]. https://github.com/xui/xui. [Accessed: 03-Jan- 2015]. [13] The Dojo Foundation, Wink toolkit - A mobile JavaScript framework to build great webapps. [Online]. http://www.winktoolkit.org/. [Accessed: 03- Jan-2015]. [14] Sencha Inc., The Making of Fastbook: An HTML5 Love Story. [Online]. http://www.sencha.com/blog/the-making-offastbook-an-html5-love-story. [Accessed: 03- Jan-2015]. [15] Sencha Inc., ext js Version 5. [Online]. http://www.sencha.com/products/extjs/. [16] Google, MVC Architecture. [Online]. https://developer.chrome.com/apps/app_frame work. [17] Sencha Inc., The Sencha Class System. [Online]. http://www.sencha.com/learn/sencha-classsystem. [18] Adobe Systems Inc., PhoneGap PhoneGap Explained Visually. [Online]. http://phonegap.com/2012/05/02/phonegapexplained-visually/. [19] M. Jackson, S. Crouch, and R. Baxter, Software Evaluation : Criteria-based Assessment, pp. 1 13, 2011. [20] Yahoo! Inc., Best Practices for Speeding Up Your Web Site. [Online]. http://developer.yahoo.com/performance/rules. html. [Accessed: 15-Jul-2014]. ISBN: 978-1-61804-281-1 199