×
Namespaces

Variants
Actions
(Difference between revisions)

Porting between Symbian Web Runtime and Nokia Asha Web Apps

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Subedit and create a more extensible structure)
hamishwillee (Talk | contribs)
m (Hamishwillee - - Media file size: - fix typographic error)
Line 70: Line 70:
 
== Media file size ==
 
== Media file size ==
  
Series 40 devices typically are less powerful than Symbian devices. In order to run applications at acceptable speeds, it may be necessary to use smaller media files, including images, audio and video.
+
Series 40 devices are typically are less powerful than Symbian devices. In order to run applications at acceptable speeds, it may be necessary to use smaller media files, including images, audio and video.
  
  
  
 
[[Category:Series 40 Web Apps]]
 
[[Category:Series 40 Web Apps]]

Revision as of 10:54, 5 July 2011

This article explains the differences between Symbian Web Runtime and Series 40 Web Apps, and the changes you need to make to port between the two formats.

Contents

Overview

The Symbian Web Runtime (WRT) is the official Web Runtime offering by Nokia for Symbian devices. Series 40 Web Apps are W3C compliant widgets than run on Nokia Series 40 devices.

The two types of web apps are actually quite similar; they are both constructed from traditional web resources written in html, javascript and CSS, have a registration file, and are packaged in zip files. While the execution model is quite different, from a developer point of view the packaging and programming is much the same. As a result developers can port between the two types with little effort.

File name

Both types of web apps are packaged in a zip file containing much the same files. The main change in this area when porting is to use the correct file extension:

  • Series 40 Web App has extension .wgt
  • Symbian Web Runtime has extension .wgz

It is also necessary to change the registration file, as discussed below.

Registration file

Symbian and Series 40 Web Apps use similar but different registration files:

  • Symbian Web Runtime: info.plist
  • Series 40 Web Apps: config.xml

It is relatively easy to rename the file and convert the needed tags. An example is given below.

If the info.plist file of a Symbian Widget is

<xmlversion="1.0"encoding="UTF8">
<DOCTYPEplistPUBLIC "//Nokia//DTDPLIST1.0//EN" 
"http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
<plist version="1.0"><dict>
<key>DisplayName</key>
<string>A Widget</string>
<key>Identifier</key>
<string>xxx.xxx.widget</string>
<key>MainHTML</key>
<string>AWidget.html</string>
</dict></plist>

and the config.xml of a S40 Web App must be altered as

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns=" http://www.w3.org/ns/widgets" height="200" 
id="http://nokia.com/simplemaps" version="0.1.0" 
viewmodes="windowed fullscreen" width="200">
    <name short="AW">A Widget</name>
    ...
    <icon src="icon.png"/>
    <content src="AWidget.html"/>
    ...
</widget>

If need be, developers can add other tags such as

<description>...</description>

<author email=" mailbox@email.com" 
href=" http://www.website.com/">
Corporation
</author>

<license>...</license>

etc.

Size of UI elements

The screen size of Series 40 device is different from Symbian devices, so the application must change the width and height of some items in html or css in order to optimise the UI. This includes text, images and videos.

Media file size

Series 40 devices are typically are less powerful than Symbian devices. In order to run applications at acceptable speeds, it may be necessary to use smaller media files, including images, audio and video.

95 page views in the last 30 days.
×