Hitch Hikers Guide Runtime Booklet
Hitch Hikers Guide Runtime Booklet
Hitch Hikers Guide Runtime Booklet
Contents
The Hitch Hiker’s Guide to the Runtime Space
Page
Qt on Symbian 8-9
Python 12 - 13
Widgets 14 - 15
Web Browser 16 - 17
Java ME 18- 19
3
The BIG Question:
Website or client application?
You may have discovered that the Runtime A growing number of entrants to the
Space is not only mind-bogglingly big mobile space see the option of building
and bewildering, but also that most of a mobile-specific website as a cheaper
the things that happen in it are deeply and more flexible alternative to developing
intertwined with the user experience. a client application. However, there are
advantages and disadvantages to both
While all questions of the runtime features, depending on the details of your service
the pros and cons, the cost, the required and, as always, there is a trade-off
developer skills and the market share are between quality, functionality, speed of
to be resolved, one big question stands development and cost.
out: ‘website or client application?’ That
is, should you use a website or a client Here are some fundamental arguments
application to deliver your services to the that are worth bearing in mind before you
end user? stick your thumb out into the Runtime
Space and hitch a lift.
How technically sophisticated are A web application can use a login page,
your users? but asking users to type in details using a
Your target audience might not be as numeric keypad is undesirable and adds
tech-savvy and fearless as you are. For to the time taken to access your service.
some users, the process of downloading, A client application, however, can store
installing and configuring an application local configuration and details and offer
can be a daunting prospect. Resolving this one-click login.
issue is a trade-off between easier first
time access (i.e., through a website) and How important is speed to your use
superior user experience in repeat use (i.e., case?
using a client application). To use a web application, a user must
typically launch a browser, access the
Does your application or service need to menu and select a bookmark (or enter
know who your user is? Does it need to URL). Each of these stages takes time and
maintain user history or store personal then the speed and latency of the network
preferences? determines how long the user has to wait.
Mobile network operators are increasingly A client application, on the other hand,
preventing third parties from receiving launches quickly and is usually accessible
any identifying information about the user from a menu or idle-screen shortcut. Once
in HTTP requests. Handset numbers are running, applications also perform much
blocked and IP addresses are removed more quickly than websites on comparable
from the network operator’s proxy server. tasks.
4
The Hitch Hiker’s Guide to the Runtime Space
In contrast, updates to an application So, hold on tight and have a stunning ride!
must first be delivered to the handset, and
then the user must accept the installation.
Ultimately, you cannot guarantee that all
your application users will be using the
most recent version.
5
Symbian C++
Pros Cons
• Provides fine-grain control over all • Requires climbing a steeper learning
aspects of the operating system, curve than other options due to the
including memory, performance and fundamental differences from
battery life Standard C++
6
The Hitch Hiker’s Guide to the Runtime Space
Pros
• Symbian Signed provides a one-stop
shop for validating applications with
access to the most powerful operating
The Hitch Hiker’s Guide to the Runtime Space
system functions
7
Qt on Symbian
Overview Key features
Qt (pronounced “Cute”) is a powerful cross- • Enables the rapid development of
platform application and UI framework. rich user interfaces
It allows you to write graphically rich
applications for Symbian mobile devices • Intuitive APIs, with idioms that make
that can be deployed across other desktop, C++ programming easier for developers
mobile and embedded operating systems
with little or no platform-specific source • Designed for cross platform
code. development; write once, compile for
any target
Qt development is based on standard C++.
Qt adds its own frameworks, programming • Compatible with Standard C++ making it
idioms and additional tools in order to easier to port code from Linux
improve application portability, and to make
life easier for C++ developers (e.g. in areas • New APIs provide cross-platform access
like memory management and inter-object to key mobile use cases
communication). The Qt APIs are well
designed, and provide a fairly high level of
abstraction; this makes GUI development
easier and faster than with other C++
options on the Symbian platform.
8
The Hitch Hiker’s Guide to the Runtime Space
Pros Cons
• Portability across desktop and • Applications need to bundle Qt binaries
embedded operating systems for all current phones
• Rich GUI widget set and intuitive C++ • Not all Qt libraries have been ported yet
class library
• Qt may not run as effectively on devices
The Hitch Hiker’s Guide to the Runtime Space
• Powerful frameworks for graphics and
hybrid web applications
with older hardware
developer.symbian.org/wiki/index.php/
Qt_Quick_Start
qt.nokia.com/doc/4.6/index.html
developer.symbian.org/wiki/index.php/
Category:Qt 9
Open C and Open
C++
Overview Key features
The Symbian platform supplies a set of • Usually used to write or port existing
standard libraries that enable developers standards-compliant middleware (e.g.,
to build POSIX-compliant C code and servers, daemons, etc.)
near-ISO standard C++, including use of the
Standard Template Library. These libraries • As standards-compliant as the
can substantially reduce the time and effort underlying operating system allows it to
required to port POSIX-based software to be, however it is not compliant in all
the Symbian platform. They are especially areas (e.g., it is missing fork())
useful for porting existing C++ or C-based
software from the desktop environment, for • Does not provide a mechanism to
example, from Linux. interact with the various phone
peripherals (e.g., camera, microphone,
The C language support comprises four etc.). Applications must call Qt APIs from
base libraries (libc, libm, libpthread and the Mobility Project or use native APIs
libdl) and related tools, overlayed by a for this purpose
number of additional libraries: libssl, libz,
libcrypto, libcrypt and libglib. • Not suitable for writing a user interface
(UI). Alternatives for creating the UI
For standard C++ support the platform include:
provides the popular STLport version of the
Standard Template Library and also a small > Qt, the cross-platform application
but useful subset of the Boost libraries. and UI framework. Qt is compatible with
standard C++, and provides high level
The libraries do not include APIs for user APIs for rapidly creating elegant user
interface development, for access to device interfaces.
peripherals (camera, microphone, etc.) or > The Symbian platform GUI framework
for access to Symbian application engines > Python for S60, a scripting language
like the calendar and contacts; Qt is mainly targeted at prototyping. This is
expected to provide this functionality when suitable for applications with minimal UI
needed. requirements
Applications, Games or Middleware (C/C++)
RGA
Boost Open C/C++
IOStreams
Standard C++
STL
Symbian OS and S60 Platform
10
The Hitch Hiker’s Guide to the Runtime Space
Pros Cons
• Provides a familiar programming • C++ has a steep learning curve for those
interface unfamiliar with it
11
Python
Pros Cons
• Very easy to learn and use, and ideal for • Python not supported on other mobile
testing application models before device platforms
implementing them using the native
language • Less functionality than native Symbian
C++
• Access to the filesystem, messaging,
contacts database, local connectivity, • Python runtime must be manually
camera, gallery, sensor framework, GPS, installed on devices using Python
etc. enables development of applications applications
that leverage the platform’s strengths
• Python’s performance is reasonable
• Scripts can be tested interactively on the but still slower than Symbian C++.
emulator without building It is not suitable for high performance
applications e.g. video streaming
• The same Python script can run on both
emulator and device (as compared to
Symbian C++ where a different binary
format is required)
12
The Hitch Hiker’s Guide to the Runtime Space
Pros
• Can be extended through native
extension modules for additional
functionality
The• Available
HitchonHiker’s Guide to the Runtime Space
Symbian^1 devices and
earlier devices
• Toolchain is free
Location Scheduler
Effort estimate Trigger alarms or reminders according to
(1 – 5, where 1 is the easiest) location
wiki.forum.nokia.com/index.php/How_to_
1 2 3 4 5 develop_a_Geo-scheduler_application_-_
Part_1
13
WRT (Web Runtime) T
Widgets
Overview Key features
Web Runtime (WRT) is a web application • Enables relatively simple programs, often
development environment from Nokia which interacting with server-side web services
enables widgets to run, operate and behave (e.g., information retrieval and search
like native applications. jump-off) or self-contained games
Pros Cons
• Widgets appear to the user as normal • Not all common JavaScript functions and
applications HTML properties are supported in the
current Nokia WRT platform
• There’s an almost flat learning curve for
the web design/development community, • The current version of WRT has
which reduces the cost and time-to- extremely limited access to phone
market associated with developing hardware and features: basic power,
mobile applications memory, language, network information,
control of keypad lights and phone
• Migration between standards- vibration
based widget platforms is relatively
straightforward • Performance can be an issue for more
complex applications
• No signing is required (unlike a native
application)
14
The Hitch Hiker’s Guide to the Runtime Space
The Hitch Hiker’s Guide to the Runtime Space
15
Web Browser
16
The Hitch Hiker’s Guide to the Runtime Space
Pros Cons
• Some browsers deliver a full, highly • The content or application is unavailable
standards-compliant, desktop-like web when there is no Internet connection
experience
The Hitch Hiker’s Guide to the
• Web content runs in a limited sandbox.
Runtime Space
• Latency, data transfer speeds and
network data charges are significant
It does not need to go through the same considerations in mobile Internet
security checking as installed browsing. Content should be optimized
applications, so the deployment cycle is accordingly
quicker
• Some devices have limited memory
• Support for web standards means that available and exceeding the limit may
development skills are readily available result in incomplete page display or
in the community other problems
• A single, well-designed web page can • Some browsers (e.g., Opera Mini and
be usable on desktop and mobile Skyfire) use a transcoding server at the
devices, with no need to maintain network head-end to pre-format content.
separate versions This means that your content is not
directly communicating with the handset
• The user does not need to perform any itself, which can cause problems
(complicated or intimidating) installation with session identification and AJAX
functionality
Examples
Forum Nokia: Example site
forumnokia.mobi/example_site
17
Java ME
(Java Platform, Micro Edition)
Pros Cons
• The Java programming language is • Fragmented Java ME implementation
familiar to thousands of programmers can prevent Java ME applications
that have been written for a particular
• There is an abundance of good device or platform from functioning
quality, free and open source tools for correctly on other devices and platforms
development, debugging and profiling
• Java provides only limited access to
• Java runs in a secure sandbox so phone functionality and there is no easy
that networks and handsets cannot be mechanism for dynamically extending
compromised access in after-market software. Java
Specification Requests (JSRs) cover
• The portability of Java ME applications many APIs, however there is still a gap
across operating environments provides between J2ME and native functionality
easier and wider access into the mobile
devices application market
18
The Hitch Hiker’s Guide to the Runtime Space
Pros Cons
• Java APIs are designed collaboratively • The requirement to launch the Java VM
between various expert stakeholders in can result in slower application start-
the industry (www.jcp.org) to ensure up times than for applications in other
The Hitch Hiker’s Guide to the Runtime Space
they are fit for purpose environments
Pros Cons
• Flash Lite supports many different • Flash Lite is only a subset of full Flash
content types, including wallpapers,
screensavers, games and applications • Although applications are portable within
a particular group of devices, they must
• Proven technology that has been be tailored for different groups of device
available for a decade on the Internet
• Deep integration with the handset UI is
• Available across multiple high-end and only available on some devices
mid-range devices
• The level of access to device and
• Available on multiple operating systems network functionality is limited
20
The Hitch Hiker’s Guide to the Runtime Space
Pros Cons
• Reasonable portability: write once, • Tools cost money
run everywhere within the same target (See the Reference section)
devices group and supported content
type
The Hitch Hiker’s Guide to the Runtime Space
• Runs in a secure sandbox so that
network and handset cannot be
compromised
21
Demand Paging on
Symbian Demand Paging
on Symbian Demand Pagin
g
What you will
this book
learn from
How Symbian uses
As Symbian-base
feature rich, the d
d devices becom
emand on system
e increasingly
on Symbian
Our first eBook, available for
demand paging. increases. Deman resources
Jane Sales
How to use and c free RAM, faster std paging will give you more
onfigure dem
paging on new Sy and stability when out art-up times, and better
mbian devices. of memory.
How to implemen This book provide
t demand paging
for the first time, c into the workings s a comprehensive insight
factors that may a onsidering those of demand paging
developer website.
How to combine k The book demon
strates theoretica
demand paging is eywords so that while providing pr l concepts
sensible way switched on in paced tutorial that
actical examples. I
s for XIP-ROM ima t is a fast-
and executables. ges decisions that you focuses on the critical
of tips and advice. need to make, and is full
How to test and d
demand-paged e ebug in a
nvironment to Who this book
resolve issues tha is for
demand paging. t may arise with This book is prima
who need to creat rily for Symbian engineers
ROMs, fine tune the demand-paged system
for them. It w em, and write de
ill also vice drivers
or middleware dev be of interest to applica
tion
the impact of dem elopers wanting to understand
and paging on the
ir code.
ISBN 978-1-9072
53-00 -3
22
Porting to the Symbian
Platform
Porting to th
e
Symbian Platf
Open Mobile De
o rm
The first book for a new in C/C++ velopment
developers, published by
the Symbian Foundation in
September 2009.
If you want to write mobile applications In this book, you will learn:
without the idioms of Symbian C++,
have existing software assets that you’d • How to port and make use of existing
like to re-use on Symbian devices, or are open source code to speed up your
an open source developer still waiting development projects
for an open Linux-based device to gain
significant market penetration, this is • How to port applications from other
the book for you! mobile platforms to the Symbian
platform
Beginning with an introduction to the
native programming environments • How to write code that is portable
available, you learn how to go about across multiple platforms
porting your code to the Symbian platform.
• The APIs in the Symbian platform for
Next, we discuss how to port to Symbian cross-platform development, such as
from some other common platforms, support for standard C/C++ and Qt
including Linux and Windows.
Creating native mobile applications and
Finally, we examine sample porting middleware has never been easier. So
projects as well as advanced information what are you waiting for?
on topics such as platform security.
Find out more about this upcoming book
The author team consists of no less at eu.wiley.com/WileyCDA/WileyTitle/
than six Forum Nokia Champions, productCd-0470744197.html
together with technical experts from
the Symbian community, either working
on Symbian platform packages or third
party application development. With this
book, you will benefit from their combined
knowledge and experience.
23
For further information about the Symbian platform, please visit developer.symbian.org.
Comments and suggestions about this booklet can be sent to docs@symbian.org, or
left on the discussion forums at developer.symbian.org/forum. Please enjoy this booklet
responsibly, and recycle it after reading, where facilities exist.