Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Research and Implementation of Cross-platform Development of Mobile Widget

] 2 3 4
Bin ZHANG , Tian-gang XU Wei WANG ,XianA
Beijing University of Posts and Telecommunications ZTE Corporation, Nanjing R&D Center, Nanjing
Beijing 100876, China 210012, China
e-mail: bluezb@bupt.edu.cn; e-mail: wang.wei8@zte.com.cn;
xutiangang2005@163.com jia.xia@zte.com.cn

Abstract-Widget is an increasingly popular technology and not very successfuUIL can move ordinary widgets without
can be designed to perform various tasks. Easy to develop, easy APIs from one mobile platforms to another, and IlL
to deploy, personalized, interactive, and less consumption of Widgets runtime must be installed on target mobile platform;
flow of mobile widget make it ideal for mobile Internet. the same problems exists in other cross­
However, cross-platform development of mobile widget is still platform development.
challenge, and one of the most difficult problems is
MWPDL (Mobile Widget Portable Development Library)
implementation of cross-platform API. The purpose of this
is a replaceable approach to providing cross-platform support
paper is to research APIs of several specific platforms and
for development of mobile widgets. With Mobile Widget
propose an effective method to achieve cross-platform widget
Portable Development Library, we do not need to change the
development. The framework of Mobile Widget Portable
standard widget JavaScript code and file names, and then
Development Library is used while developing cross-platform
the widget can be installed on different platforms easily.
widgets, which offers approaches to meeting the
aforementioned challenge.
In the first section, we introduce the widget technologies
on different mobile platforms, and then analyze the
Keywords-nwbile widget; cross-plaiform;API;MWPDL differences to Mobile Widget platforms; in the
(Mobile Widget Portable Development Library) third chapter, the program with Mobile Widget Portable
Development Library is offered to achieve transplantation of
mobile widgets between different mobile platforms; in the
I. INTRODUCTION
next chapter, some examples of transplantation of mobile
Mobile widgets can maximize screen space use and may will be given to verify the correctrJess of the program.
be especially useful in placing live data-rich applications on
the device idle-screenlhome-screenl "phone-top" [1].While II. INCOMPATIBILITIES ON DIFFERENT MOBILE
widgets are a convenience in the online world, they can be PLATFORMS
looked at as near-essential in the mobile world. The reason is
Web technology-based widgets were brought into the
the mobile device is small and the interface is often
mobile world by the Nokia Web Runtime in 2007. IlL and
challenging. Wading through large amounts of information
Windows Mobile platforms, however, adopted mobile
in a mobile environment isn't just a nuisance; it's a near
widgets and there is a standardization effort going on in
impossibility.
W3C.
Since mobile widgets are so easy to use, they are
Widgets are developed using standard web technologies
supported by the majority of users. The current
such as HTML, CSS, JavaScript and XML. These
mainstream mobile platforms include Nokia S60 WRT,
technologies are exactly those which are incorporated in the
Windows Mobile Widget, Opera Widget and IlL Widget
AJAX development approach [2]. However Manifest
platforms etc.; however, not all of them have the same
documents are not standardized and differ between vendors,
development specifications, so developing widgets for
so there is some difference in widget development on
mobile devices using HTML, CSS, and JavaScript is
different mobile platforms, and furthermore the API for
possible through different runtimes and frameworks on
accessing those functions is not standardized. Then,
different mobile platforms, that means one widget can work
we will select three platforms on the widget technology and
on one cell phone platform very well, while it does not work
the existing differences are discussed Widget development.
on the other; in these issues, The problem that
APIs between the various platforms are not compatible is A. Mobile Widget Development Technology
one of the biggest challenges of widget development, Due to the use of standard web technologies, the
determining how to make the widgets run on multiple development of widgets is very similar to traditional web
operating systems and types of devices is the study of this development. The user interface is built by a combination of
article. If it needs transforming, we must be involved to HTML, CSS and additional resources like images and
change the Mobile Widget API implemented in JavaScript sounds. Instead of HTML some widget vendors introduced a
code and also take into account the proprietary XML format. The interactivity and event
f
plat orm SUppOlt for API, that is quite complex. handling is achieved by JavaScript. To retrieve data from a
Some companies like NOKIA, Opera and IlL have been web server, widget engines support the XMLHttpRequest­
committed to developing cross-platform widget, but they are object within JavaScript or a similar method. The returned

978-1-61284-486-2/111$26.00 ©2011 IEEE

146
data, which is mainly XML formatted, is parsed and the user The area of greatest incompatibility in developing
interface is updated. Updating means a manipulation of the widgets for different platforms is the difference between the
HTML content via JavaScript and the Document Object APIs allowing a widget application to handle events, errors,
Model (DOM). make use of metadata, and access host system resources and
But, different platforms provide different APIs. For applications [7]. The problem is mainly divided into two
example, below is API description of three different mobile parts: API call differences and implementation differences,
platforms. API implementation differences are illustrated in Fig.I.
• The Nokia Web Runtime was the first platform that
brought web-technology widgets to mobiles and the
widget format was brought in line with the W3C
Widgets 1.0 specification. The following JavaScript
APIs are available from widget code: Calendar API,
Camera API, Communication Logs API, Contacts
API, Landmarks API, Location API, Media
Management API, Messaging API, Sensors API and
System Information API.
• Like Nokia, JIL also supports W3C widget
specifications, such as the W3C packaging and
configuration API. The JIL API provides a
mechanism to access services available on the
handset. Access to these services is via a semi­
object-Oliented paradigm in which functional and
parameters are accessed via objects that correspond
Figure 1. Implementation Differences For Different Mobile Platforms
to the handset. The platform services accessible from
JavaScript are: Telephony API, PIM API,
The object structure is not the same for each mobile
Multimedia API, Device API and Messaging API [3].
platform, so the path of API access of each platform has its
Access to these categorized services is via a
own requirements; also, some API calls require the support
JavaScript object-containment name spacing
of the internal mechanisms of platform, which led to
mechanism.
the API implementation the same functions on different
• Widget suppOli appeared in Windows Mobile with
platforms can not be accessed on the appropriate platform.
the 6.5 version. The widget specification is based on
When it comes to implementations, some mobile widgets
W3C Widgets 1.0 and extended with a quite limited
may be achieved through the form of function on one
platform access API that provides access to system
platform, while may be achieved through the form of
information like battery power, menus and a very
property on another platform.
simple persistence mechanism. Windows of Mobile
widgets are full screen applications. Even though III. CROSS-PLATFORM MOBILE WIDGETS DEVELOPMENT
they are widgets from the technology point of view, WITHMWPDL
they are not widgets from the user point of view, e.g.
they caunot be placed onto the home screen. APIs need to be classified before the Mobile Widget
Portable Development Library was built. Different types
B. Differences to Mobile Widget platforms of API are different treatment when the MWPDL is built.
Although widgets are developed using standard web Determining how to use the MWPDL is also an important
technologies, they usually can't be executed on more than step. The composition of mobile widget should be specified
one widget engine. Main incompatibility issues are [4]: too.
• Manifest document: Metadata fields and the A. The Overall Program of Cross-platform Mobile
manifest's filename are not standardized and differ
Widgets Development
between vendors.
We propose the conceptual cross-platforms mobile
• Packaging: This includes the packaging format (e.g.
development architecture as shown in Figure 2 that
ZIP), file extension and internal package structure.
achieve cross-platform widget development and speed up the
• Platform specific functions: Widget engines support
cross-platforms development and deployment of mobile
deferent platform features and furthermore the API
widget.
for accessing those functions is not standardized.
This architecture is applied to most mobile platforms,
The World Wide Web Consortium (W3C) addresses the
where the key units identified are standard widget, MWPDL,
problem of widget incompatibility and tries to standardize
the contents of the package widget and corresponding mobile
widget development within the Web Application Formats
platforms. An overview of these concerns is discussed here:
Working Group (WAF-WG). Relevant specification
• The Standard widget: the standard widget based on
documents are: Widget Packaging and Configuration [5],
MWPDL in this architecture is shared by all cross­
Widget Packaging and Configuration (W3C Working Draft
platforms mobile widget development. The next
21 February 2011) [6].

147
section, the specifications of the widget development Portable Development Library was built, which APIs can be
based on MWPDL will be brief introduced. transformed between different target platforms that need to
• The MWPDL: as said above, the MWPDL is set up be considered. So, according to whether to support
for cross-platforms mobile widget development, the functions, three kinds of APIs have been identified:
which will be analyzed emphatically in Part c. a) A General API: refers to functionality common to
• The contents of the package widget: the all widgets on all platforms such as: getting and setting user
standard widget code and the corresponding properties, updating preferences, opening a URL or closing
MWPDL are included in the package widget. a widget;
Specific content will be introduced in Part D.
b) A Platform API: refers to functionality for some
particular platforms. Functionality may include accessing
common services on a mobile phone such as a camera,
phone book or SMS;
c) A Special API: refers to functionality for just a
Standard particular platform, such as Logging API and Sensors API
widget
(based on
MWP
DL
of WRT platform.
MWPDL) According to categories of APIs, APIs are treated in
different ways ill MWPDL. The following is the
corresponding treatment:
a) A General API: if the API call and implementation
are both the same on all mobile platforms which we will
research, it does not need any treatment, the other APIs call
and implementation must be set to the same form on all
mobile platforms.
b) A Platform API: the API is handled in the same
ways as above; the difference is that here only for the
Figure 2. Schematic diagram of the overall program particular platforms which provide API to achieve this
functionality. If some other mobile platform provides the
interface to achieve this functionality, we can write the API
B. Specifications Of The Widget Development Based On
for the platform; on other platforms, migration can not be
MWPDL
achieved temporarily.
In order to cross-platform development, the standard
c) A Special API: such API can not be achieved cross­
widget should be followed next principles when
platforms by the MWPDL.
being written:
To provide an effective method to achieve cross-platform
• The widget should support a common related
widget development (API cross-platforms), the method need
standard technology such as: HTML, XML, CSS,
to include the following features:
DOM, and JavaScript.
• The method needs to be easy and convenient;
• The file of Widget structure should be the same.
Here we have an example of JIT Windows Mobile
• The method can facilitate and speed up the cross­
and WRT platforms: platforms development and deployment of mobile
widget
• HTML: It is recommended that HTML 4. 01 Strict
DTD is used when developing widget. The reason is
• The development process is short and development
that HTML 4.01 Strict DTD is supported on all three costs decrease
platforms, and The following is the code of form:
• Provide more compelling user experiences
We propose the conceptual MWPDL architecture as
shown in Figure 3 that carries the above characteristics and
provides most compelling mobile development speed and
user experiences. In this architecture, MWPDL must be set
up for different mobile platforms firstly, which is used to
access the APIs of each target platform, and then standard
• CSS and DOM: Like HTML, it is recommended that mobile widget can call API by the corresponding MWPDL.
CSS2.0 and DOM 2.0 is used when developing
widget. And the code form is no limit without W3C
standard.

C. MWPDL Architecture and Process API Class Calling


The source code within a widget package interacts with
the host through a set of APIs; before the Mobile Widget

148
149
common concerns can be broadly categorized by packaging,
manifest document and API issues. Although we can achieve
cross-platform widget development and speed up the cross­
platforms development and deployment of mobile widget
with MWPDL, some API still cannot be achieved cross­
platforms temporarily, such as some Special APIs. And the
description of incompatibility of the XML etc. does not do
too much.
The future of widget technologies and their role in
delivering packaged client-side Web applications will largely
depend on the outcomes of various standardization efforts
under way. Central efforts influencing the standardization of
mobile widgets include the W3C widget family of
specifications, NOKIA and JIL.

REFERENCES

[1] Information on
http://en. wikipedia.org/wiki/Mobile_widget#Mobile_widgets
[2] 1. J. Garret. Ajax: A New Approach to Web Applications. URL,
http://www.adaptivepath.comlideas/essays/archives/000385.php,
February 2005.Accessed: September, 24th 2007
[3] JIL Widget System API Specification: Handset APIs. Revision of 1.1
Figure 5. Fig. 1 cross-platforms widget running on JIL,WRTand WM (2009)
platforms [4] Christian Kaar, BS.An introduction to Widgets with particular
emphasis on Mobile Widgets. Mobile Computing University of
Applied Sciences, Hagenberg Softwarepark 11, 4232 Hagenberg,
V. CONCLUSION Austria.Technical Report Number 061110455/009/02 October
2007.URL,http://symbianresources.comltutorials/techreports/widgetsl
In this paper, we present the concept how to create a kaar07widgets.pdf
Mobile Widget Portable Development Library for every [5] http://www.w3.org/TRIwidgets/(20ll)
mobile platform that facilitates and speeds up the
[6] http://dev.w3.orgl2006/waf/widgets/(20ll )
development and deployment of cross-platforms widget
[7] Paco Mendes, Marcos Caceres and Barry Dwolatzky: A review of the
development. widget landscape and incompatibilities between widget engines. IEEE
The method can facilitates and speeds up the cross­ AFRICON 2009. 23 - 25 September 2009
platforms development and deployment of mobile widget, [8] I. S. Jacobs and C. P. Bean, "Fine particles, thin films and exchange
and then the development costs can decrease. anisotropy," in Magnetism, vol. III, G. T. Rado and H. Suhl, Eds.
Many incompatibilities exist between the various mobile New York: Academic, 1963, pp. 271-350.

widget platforms available for different platforms and

150

You might also like