Professional Documents
Culture Documents
Application Development - Sami Viitanen - Forum Nokia
Application Development - Sami Viitanen - Forum Nokia
Platform Services
Sami J. Viitanen
Senior Technical Consultant
Forum Nokia
Internet evolution of mobile devices
2
Definition of widget
Lightweight mobile applications - easy access to
the web
The easiest way to bring web-based business to
millions of Nokia mobile devices
Develop with standard web technologies (e.g. HTML, CSS,
Javascript, AJAX)
Install and run on like any native application
Provide an optimized web experience accessible with a
single click
3
WRT widget ingredients
Widget
info.plist (mandatory) properties
+
[name].html (mandatory) HTML
icon.png backbone
[name].css
[name].js PNG icon
+
CSS Root
layout folder!
+
js logic
4
HTML <html>
<head>
..
Defines the </head>
<body id="body">
structure of <div id=‘mainView’>
<span class=‘title’>Front
the widget. view</span>
</div>
// Class selector
<div id=‘subView1’ to define
class=‘subView’>
Views can be constructed with common styleview</p>
<p class=‘title’>Back for similar
static HTML elements or can be </div> components
dynamically created by <div id=‘subView2’
.title {
class=‘subView’>
<p class=‘title’>Config
font-size: 26px; view</p>
JavaScript at runtime. </div> color: blue;
</body> }
</html> .subView {
display: none
CSS }
// Id selector to define a
• Style and layout information unique style for a unique
component
– Defines how to display #mainView {
HTML element: position, color, font-size: 16px;
color: red;
background color etc. text-align: center;
}
• CSS information can be embedded // Pseudo-class selector to
in the HTML file or imported from design a pattern style
div.subview div {
an external styleheet margin: 10px 0 0 0;
padding: 20px 20px 20px 20px;
. . .
5}
JavaScript
Event handling
XMLHttpRequest
DOM manipulation
6
Using standard Javascript libraries
jQuery
MooTools
7
Native like: menu and localization
8
Widgets and platform services
Framework for abstracting access to a set of
services
Runtime specific bindings and security management
Access Platform Services through JavaScript
Example use cases:
Combine Web-based data with local context to deliver
personalized, relevant services
Save critical Web-based contacts and events locally
to create reliable, dependable reminders
9
Home screen
Nokia N97 onwards
Dynamic, user configurable
content on home screen
Size depending on device
Nokia N97 / N97 mini: 309x85
pixels
End-user controls the home
screen layout
What content is shown
Layout of the shown content
11
Aptana Studio and Nokia WRT plugin
www.aptana.com/nokia
12