A Web-Based, Offline-Able, and Personalized Runtime Environment
Total Page:16
File Type:pdf, Size:1020Kb
Computer Standards & Interfaces 34 (2012) 212–224 Contents lists available at SciVerse ScienceDirect Computer Standards & Interfaces journal homepage: www.elsevier.com/locate/csi A Web-based, Offline-able, and Personalized Runtime Environment for executing applications on mobile devices Yung-Wei Kao a,⁎, ChiaFeng Lin a, Kuei-An Yang a, Shyan-Ming Yuan a,b a Department of Computer Science, National Chiao Tung University, 1001 Ta Hsueh Rd., Hsinchu 300, Taiwan b College of Computing & Informatics, Providence University, 200 Chung Chi Rd., Taichung 43301, Taiwan article info abstract Article history: An increasing number of people use cell phones daily. Users are not only capable of making phone calls, but Received 18 April 2011 can also install applications on their mobile phones. When creating mobile applications, developers usually Received in revised form 20 June 2011 encounter the cross-platform incompatibility problem (for example, iPhone applications cannot be executed Accepted 23 August 2011 on the Android platform). Moreover, because mobile Web browsers have increasingly supported more and Available online 8 September 2011 more Web-related standards, Web applications are more possible to be executed on different platforms than mobile applications. However, the problem of Web application is that it cannot be executed in offline Keywords: Mobile device mode. This study proposes a Web-based platform for executing applications on mobile devices. This platform Offline mobile Web application provides several services for developers such as offline service, content adaptation service, and synchroniza- Mobile content adaptation tion service. With the help of the proposed platform, application developers can develop and publish offline Web applications easily with simplified external Web content and synchronization capability. © 2011 Elsevier B.V. All rights reserved. 1. Introduction ME ([10,11]) cross mobile platforms, but not PC platforms. To provide an application that allows users to access their data (such as email) Benefits from the advancements of mobile devices, mobile plat- both on their PC and mobile device, a Web server and Web applica- form, and wireless network technologies [1,2,3,4,5] in recent years, tion are usually necessary. Users can consequently use the Web the market of mobile devices are growing dramatically: an increasing browser on their PC and a mobile application on their mobile device number of people are using at least one mobile phone, or even tablet to access the same data. This would be more straightforward if the PC, daily. Unlike traditional cell phones, users are not only capable of Web application could be executed on the mobile Web browser; in making phone calls or sending and receiving short messages, but can this manner, users do not have to install one more non-cross- also install applications from the online markets. Apple iPhone, iPad, platform mobile application on their mobile devices. and Google Android [6,7,8] are three major examples of this type of iGoogle [12] provides a Web application execution platform mobile device platform. Consumers are not only willing to use appli- where users can select which applications they are interested in and cations on mobile devices, but also willing to pay for them. Creating execute them on their personalized homepages. Moreover, there is an interesting application that can be executed on different mobile a mobile version of iGoogle for mobile users, so users can execute devices within a very short time is a significant issue of application these selected Web applications on their mobile phones. However, development. However, developers must usually write mobile appli- the major problem of executing Web applications on mobile devices cations in a specific programming language for a specific mobile is that they cannot be executed without an Internet connection. In platform; that is, iPhone applications in Object C, and Android appli- certain situations, such as on an airplane, or in a basement where cations in Java. Since applications written in Object C cannot be ex- the Internet signal is weak or unavailable, mobile applications can ecuted on the Android platform, developers have to spend twice usually be executed, though Web applications cannot. Moreover, if the time writing the same application in two different languages. the user's data plan does not include unlimited data transmission, Moreover, users may have to buy their next mobile devices with the user may be unwilling to execute Web applications on their mo- the same platforms as their current ones because other platforms bile phones. do not support their favorite applications. To solve the offline Web-browsing problem, the HTML5 [13,14] Due to the variety of mobile platforms, developing cross-platform standard includes the Web storage and Web SQL database APIs. How- mobile applications is a challenge [9]. Certain languages (such as Java ever, most current Web browsers (especially mobile Web browsers) have not yet adopted HTML5. To achieve the same goal of offline Web-browsing, a browser plug-in, the Google Gears solution is devel- ⁎ Corresponding author. oped. The problem of Google Gears is that not all Web pages can be E-mail address: [email protected] (Y.-W. Kao). browsed offline; only the pages that support the server-side Google 0920-5489/$ – see front matter © 2011 Elsevier B.V. All rights reserved. doi:10.1016/j.csi.2011.08.006 Y.-W. Kao et al. / Computer Standards & Interfaces 34 (2012) 212–224 213 Gears library can. In order to solve this problem, the Gears-Monkey iGoogle. Developers can create applications by following the standard system was developed. However, there are still several drawbacks of Google Gadget [25], and upload them onto the iGoogle platform. Fur- of Gears-Monkey requires a high level of script-writing skill, and is thermore, since Google Gadget integrates several Google APIs such as not supported on mobile phones, and does not provide batch proces- Google Maps API [26], Google AJAX Search API [27], Google Calendar sing for multiple pages. API [28], and Google Translate API [29], it is extremely easy to invoke In our previous works [15,16], we proposed an authoring tool [15] other Google services in Google Gadgets. For mobile users, iGoogle for mobile content adaptation, and an offline mobile Web-browsing also provides a mobile-version Web site, so users can execute their gad- framework [16] for browsing offline Web pages on mobile devices. gets on their mobile phones via mobile Web browsers. This paper proposes Web-based, Offline-able, and Personalized Run- time Environment (WOPRE), which includes these previous works 2.2. Offline mobile Web browsing with some modifications and extensions, as two subsystems for solv- ing the problems previously mentioned. There are four objectives of To make offline Web content and applications available on mobile WOPRE: devices, local databases and storage should be provided [30]. HTML5 is a new Web standard designed to supplant the existing HTML 4.01, 1. With the help of WOPRE, applications should be executable on XHTML 1.0 and DOM Level 2 HTML standards. HTML5 aims to reduce different platforms including PCs and mobile devices. the need for browser plug-in-based Rich Internet Applications (RIAs), 2. An online market, similar to the Apple App Store and Google Android such as applications based on Adobe Flash [31], Microsoft Silverlight Market, should allow developers to publish their applications and [32], and Sun JavaFX [33]. Web Storage and Web SQL Database are users to install desired applications. two new APIs provided in HTML5; they are described as follows: 3. Full, or at least partial, operations of applications should be executable in offline mode. 2.2.1. Web SQL database 4. A content adaptation mechanism for external Web content should The browsers that support HTML5 should include a local SQLite be provided. database. With this database, client-side applications can store infor- The research contains seven sections. In Section 2,weintroduce mation such as user data via standard SQL communications. some backgrounds and related works of WOPRE. The high level and detailed system design issues are described in Sections 3 and 4 2.2.2. Web storage respectively. In Section 5, we discuss the system implementation Name–Value-based data storage should be supported for storing and demonstration. The system evaluation is presented in Section 6. Web content such as HTML, JavaScript, and image files. The stored Finally, we end up with a conclusion and discuss the future works of data is non-volatile; even though the browser or the phone is turned WOPRE in Section 7. off, the data still remains in the storage. However, HTML5 has most Web browsers and especially mobile 2. Backgrounds and related works browsers, do not yet support HTML5. Google Gears [34], an open- source browser extension that supports the offline execution of web 2.1. Cross-platform technologies applications, is an alternative solution for implementing the offline mechanism. It can be replaced by HTML5 in the future when most It is difficult for programmers to write a program only once before mobile browsers support HTML5. Currently, Google Gears is able to executing it on different mobile devices [9]. The Java language is be executed on personal desktops, laptops, and handheld devices. It designed for cross-platform application execution, and Java ME is a can store and provide application resources locally, and run asynchro- cross-platform language for developing mobile applications [11]. nous JavaScript to improve application responsiveness. There are There are already many tools available for developing Java ME appli- three major components of Google Gears: cations [17]; certain toolkits which include emulators are available for A. LocalServer caches and serves application resources (HTML, rapid MIDlet development. However, Java ME only crosses mobile JavaScript, images, etc.) locally. platforms, not PC platforms; to provide an application that allows a B. Database stores record-based data locally in a fully searchable user to access data on both PC and mobile devices, developers must relational database.