Documente Academic
Documente Profesional
Documente Cultură
2. Practices
The practices will be split into two groups: development and usability:
• Development relates to practices of technical nature mostly related to the XHTML-MP
mark-up.
• Usability relates to user-perception of the application and are mostly agnostic of the
mark-up adopted.
1.1Development
Validation of XHTML MP
HTML tags and attributes (for example, cell padding and cell spacing for XHTML
tables) can deliver graphically accurate renderings in ways that are not
achievable through CSS (through the padding and spacing properties, for
example), mainly because of poor CSS support in mini browsers. This behavior
can be observed also in mini browsers running on high-end devices.
While the usage of extra XHTML attributes will make an XHTML-MP page non-
valid, opting for non-valid, but effective, mark-up may be preferable in some
cases.
Making sure that a page is well-formed is still recommended, since well-formed
XHTML-MP mark-up is less likely to cause troubles than invalid XHTML-MP.
Testing Applications
Acquire at least 5 devices for development and testing, where each device has
one of the following browsers: Nokia WAP Browser series 40, Openwave Mobile
Browser version 6 or greater, SonyEricsson (Teleca), Netfront, Opera for
Symbian.
The list above is minimalist in nature. More robust testing could include one or
more of the following microbrowsers: Motorola Mobile Browser 2 or grater,
Microsoft Mobile Explorer, Nokia Series 60, Safari for Nokia. In addition, there are
devices such as the BlackBerrys or Palm OS-based devices which have browsers
of their own.
MIME type
One of the disadvantages of this MIME type is that it prevents developers from
previewing the applications in some regular web browsers (notably Microsoft
Internet Explorer up to version 7). On the other hand, the text/html MIME type
fools some devices into believing that it is a regular page they need to render.
This may get them to apply heuristics that conflict with the intentions of the
author.
MIMETRICK-
<%
String acceptHeader = request.getHeader("accept");
if (acceptHeader.indexOf("application/vnd.wap.xhtml+xml") != -1)
response.setContentType("application/vnd.wap.xhtml+xml");
else if (acceptHeader.indexOf("application/xhtml+xml") != -1)
response.setContentType("application/xhtml+xml");
else
response.setContentType("text/html");
%>
The above trick may not be optimal for recent BlackBerry devices. Those devices
will claim to support all the HTML-related MIME-types in the accept: header, thus
inducing a application/vnd.wap.xhtml+xml type. Unfortunately, this MIME type
(as well as application/xhtml+xml) will cause the BlackBerry to ignore tables and
CSS, which would otherwise be rendered normally with text/html. It should also
be observed that RIM devices often depend on extra proprietary proxies
deployed at operators. This means that the same devices may have different
capabilities with different operators. For example, BlackBerrys from legacy
Nextel (USA) are WML-only.
Little or No CSS
Keep styling information to a minimum and do not change the color of links.
Using WCSS for input masks is a good idea because it will degrade gracefully on
all known browsers.
Advanced CSS constructs such as media queries should be avoided: Only a few
browsers support Media Queries acceptably (notably, recent versions of the
Opera browser). In addition, pages based on Media Query hardly degrade
gracefully on non-supporting devices. Microbrowsers typically end up
downloading large graphics, which, in the author's intentions, was not meant to
be delivered to a mobile device.
The number of external images greatly affects the loading and rendering times
for a page. For this reason, a balance needs to be found between the number of
pictures used for visual purposes and the page rendering time.
Many devices will not enable softkeys nor return control to the user until the
page is fully loaded and rendered. This will make it impossible for users to
invoke browser functions (notably, backward navigation) for a frustratingly long
time.
Beware of Colors
Setting the background to blue and using CSS to color links white will result in
unreadable black labels against a blue background on a wide range of devices.
Avoiding background images and colored links is the safest choice to make sure
that content is usable across a wide array of devices.
If no color info and no background are specified, devices will resort to default
colors, which are typically very readable.
Background colors may be OK only as long as authors stick to light hints of color.
Developers should also avoid styling 'visited' and 'active' hyperlinks as follows:
a {color:#0000FF;}
a:hover {color:#0000FF;}
a:link {color:#0000FF;}
a:visited {color:#0000FF;}
a:active {color:#0000FF;}
Some devices may highlight selected links by inverting link color and
background color, effectively hiding the label of the currently selected link in
case the above CSS is applied.
<br/>
--<br/>
<br/>
While this code may have a nice visual appeal on some devices, it will cause the
problem described above. Using the XHTML-MP <hr/> is a better option.
3.2 Usability
Order of Menus (most important choices first)
Place the most specific menu items in the top positions of menus.
One open question is who defines the importance of each item in the first place.
This choice may be about letting users choose through usability tests.
Access Keys
The use of the accesskey attribute allows users to activate a link by pressing (or
press-holding) a number key on the numeric keypad, thus avoiding the need to
click several times to select the link.
In menus, access keys allow experienced users of the service to reach the
information they need faster by memorizing the numeric combination that will
take them where they wish.
The following XHTML-MP construct will deliver a numbered menu on all baseline
devices or superior. Numbers are guaranteed to be displayed only once and
items will be selectable by 'pressing' the accompanying number.
'Pressing' may mean simply pressing or 'pressing and holding' (Nokia devices).
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<head>
<title>Contacts - R</title>
</head>
<body>
<p>
Pick contact:
<ol>
</ol>
</p>
</body>
</html>
Add navigation links at the end of each page. At a minimum, a link labelled
'Home' (or the equivalent in the user's language) should be present.
There can be exceptions to this rule in case of confirmation requests ("Really
Delete? yes|no") or other situation in which the user shouldn't be distracted from
the task he or she is performing.
Most users do not access on-line help even when available on desktop
applications. Virtually all mobile users will stay away from a link that labelled
'Help' or 'About'. Success can be achieved by making the application intuitive to
use. Not cluttering the page with unnecessary links is a step in the right
direction.
Avoid so-called 'splash-screens'. Make sure that the first page the user receives
has links to activate the main functionalities of the site.
Some devices will truncate title strings longer than 8-10 characters. For this
reason, it is probably a good idea to keep the title short.
The number of words should be reduced in every possible way. Using the label
"Age:" is a better choice than "Please enter your age here:". Another example
could be to avoid words like "Entertainment" when one can simply say "Fun".
Do not serve a website to a mobile device and do not serve a mobile site to a
web browser.
Cache Management
Do not disable caching (unless low page lifetime is part of actual business
model).
The exact caching model is part of the business model of the application.
Browsing an email inbox may require nothing short than total disabling of any
caching. Weather forecast may live with a couple of hours caching. Yet again,
advertisement and banners may pose additional requirements on caching. These
requirements may clash with the service usability.
Things are complicated by the fact that some microbrowsers allow fine grained
control of the cache by respecting Time-To-Live (TTL) directives, while others
only respond to a somewhat brutal use of META tags.
Two techniques are provided: completing disabling the cache and a somewhat
softer reset that will preserve the usability of backward navigation (back button).
Pragma: no-cache
In case access to headers is not possible, the same functions can be achieved
with the usage of the following META tags:
<a href="bookmarks?id=${bookmark_folder_id}&
cache_buster=${now.time}">Go to Bookmarks</a>
It goes without saying that this trick cannot be performed with static XHTML-MP
pages.
Use input masks to minimize user input. Beware of HTML-style forms. Do not
require that users login each time. Do not mask user input when entering a
password.
Input Masks
Most mobile devices let users specify input-masks, i.e. the format with which
user-input is supposed to be entered. If a telephone number is required of the
user, setting the input form in numeric mode greatly simplifies the task of
entering the data for the user. Also, this prevents user errors.
Beware of Forms
XHTML-MP forms are very similar to the ones in HTML, which, in turn, mimic
widgets such as push button, radio buttons, check buttons, combo boxes (also
called 'drop-down' boxes) and others commonly found in desktop applications.
While those widgets are usable in web pages and desktop applications, they are
often implemented in ways that force users to do far too many clicks on a mobile
device. Selecting, activating and deselecting each single widget is time
consuming and not pleasant, particularly on devices without a stylus or other
pointing device (the great majority of devices).
Developers should get creative about ways to minimize recourse to such
widgets. While complex forms with text fields, radio buttons and drop-down
boxes are the norm on the web, they should be avoided on a mobile devices by
splitting a form in several atomic steps (such forms are sometimes referred to as
'wizards'). Wizards make users focus on a task at the time and are less error-
prone than monolithic (elective) forms.
Avoid Logins
Logins are a big killer for usability. Requiring users to type a username and a
password before they can use the application will reduce the number of users by
two-thirds or more.
If the application business model does not allow for the removal of a login task
altogether, developers should at least make whatever they can to recognize
users the second time they access the service and refrain from requiring login.
Forms:
Radio buttons, checkboxes and combo boxes tend to be confusing and require
too many clicks. It is usually possible to re-define complex forms in terms of set
of menus.
For example, the following code shows a combo box implemented though a
syntactically correct XHTML-MP code snippet. The combo box is rendered as
shown on the left. This is not very usable, since users are required to perform
the following activities:
• Scroll to the combo box and select it (which brings them to a virtual page
that implements the choices. This makes the user loose context)
• Select the right value
• Choose to abandon the combo box (which brings them back to the original
context)
• Focus on what the next thing to do is (de-select the combo and select the
next widget in the form).
Forcing the user to perform a large number of clicks and to concentrate
continuously on what he or she is doing is likely to make the application feel
unfriendly and hard to use.
Top of Form
Age: Age:
<select>
<option value="17">Less than
18</option> Less
<option value="25">[19- than 18
25]</option>
<option value="45">[26-
[19-
44]</option> ->
25]
<option value="100">over
44...</option>
</select> [26-
44]
Over
44
Bottom of Form
To optimize the number of clicks, a better option is to break down the form in
more atomic parts which require users to focus on a single task at the time. The
case described above could be implemented in terms of single steps. In
particular, the age could be collected by providing a set of links. When to user
selects a link, the age is chosen and the user is automatically brought to the
next step of the form.
<title>Age</title>
: Age
<a href="next/form?age=17">Less than
18</a><br> Less
<a href="next/form?age=25">[19- than
25]</a><br> 18
->
<a href="next/form?age=44">[26- [19-
44]</a><br> 25]
<a href="next/form?age=100">Over
44</a><br> [26-
44]
Over
44
For example, text input fields often require clicks to activate and deactivate.
Combo boxes bring users to a new virtual page and back after the selection,
which may be confusing to some users.
Creating usable forms is generally difficult. Developers are encouraged to do
usability tests with real users ([TESTING]) as early as possible in the lifecycle of
the application, possibly with the help of prototypes.
It cannot be ruled out that different forms are required to optimize usability on
different classes of devices. This is consistent with the general idea that
adaptation drammatically improves the success of mobile applications.
Avoid Logins:
Assuming that removing login tasks completely is not an option because of a
mobile site business model, there are a few techniques to prevent users from
having to login again the second time around.
Most operators gateway attach extra HTTP headers to each mobile-generated
request which uniquely identify the user. This bit of information can be used to
recognize the user and log him or her in automatically.
Yet another option is to use cookies. While cookies may not be supported on
some ntwork or on older devices, they should be used to avoid the login task
when available.
Some WAP gateways can manage cookies on behalf of a device which does not
support them.
One word of caution should be spent about usage of URL re-writing for mobile applications.
Many commonly available URL-rewriting packages assume that the HTTP client is a web
browser. For this reason the rewritten URLs include session IDs that can be very long and
contain special characters. This can cause problem on some mobile devices.
Some URL rewriting libraries let themselves be configured to address this problem by
avoiding special chars and keeping session IDs under 50 chars. Creating one's own URL
rewriting function is also a possibility.
Finally, in many cases, operator gateways and independent portals attach unique headers and
values to each HTTP request, such as phone number headers (x-wap-msisdn, x-nokia-
msisdn, x-up-calling-line-id) and subscribeer id headers (x-up-subno). The headers
can be exploited as unique keys to track users and the foundation for session management.
Large content
Developers should make sure that their software can produce JPEG pictures
without extra information and small in size.
Specify the real image width and image height in the mark-up.
One possible exception to this practice might be a free wallpaper site, where
users can be sent a whole picture while specifying the dimensiones of a smaller
thumbnail. In that case, saving the page will work without having to fetch the
full-size version.
Minimize the number of items in menus. Keep the total number under 10.
No Thinking Web
When designing the port of a web site to mobile, one possible approach is
identifying two kind of information:
This may turn up to include only 5% or less of a web site current functions, but
that is still acceptable. In fact, that is the key to creating a mobile site which has
high value for mobile user and which, ultimately, makes it acceptable for users
to carry the cost (time, money and concentration) of accessing the service.
W3C MWI Best Practices should be ignored by developers who are new to
mobile.
Find real, non-techie users and make them perform functions. Observe what
problems they have.