mobileOK Pythia
A PHP suite of tools to help generate mobileOK content.

Introduction

Web pages authored for presentation on desktop-size displays with desktop-like browsing, bandwidth and input capabilities often result in a poor user experience on a mobile device where displays are smaller, bandwidth and inputs are limited. The Mobile Web Best Practices standard sets out a series of recommendations designed to improve the user experience of the Web on mobile devices. The W3C mobileOK Basic Tests 1.0 standard defines machine-verifiable tests based on the Mobile Web Best Practices that help assess that an author has taken some steps to provide a functional user experience for users of basic mobile devices. The W3C mobileOK Checker may be used to test a page against the tests defined in the specification.

Problem is authors may not have direct control over the tool they use to author Web content. Authoring tools are often used to generate Web sites. An author that uses e.g. a Content Management System (CMS) tool only controls fragments of the resulting page as the rest is automatically generated by the tool itself. When the W3C mobileOK Checker reports that pop-up windows should not be used, there is hardly anything she may do to improve her content.

Authoring tools that do not usually generate mobile-friendly content need to be extended to provide that functionality. This is the gap this work is trying to bridge by providing a suite of tools for use within PHP projects to generate mobileOK content and more generically to adapt content to fit the properties of the requesting device.

PHP is very popular on servers and is usually available in all sorts of hosting environments. A vast number of content authoring tools (e.g. WordPress, Joomla!, Drupal, MediaWiki) have been developed in PHP. mobileOKPythia's source code uses the notion of interfaces introduced in PHP5. In particular, these tools are not compatible with PHP4.

Description

mobileOK Pythia plug-ins for authoring tools

Open-source plug-ins for popular open-source authoring tools have been developed:

The plug-ins feature template switching, content pagination, images resizing, POWDER linking, as well as a few other content tidying operations to make it possible to generate mobileOK content and thus provide at least a functional user experience when content is browsed from a mobile device. Content is left untouched when the requesting device is identified as a regular desktop browser. They package AskPythia and TransPythia, mentioned below. They have not yet been submitted to the official tools directories.

AskPythia, an implementation of the DDR Simple API

AskPythia is an implementation in PHP of the Device Description Repository Simple API W3C Recommendation. This library can be used to identify and retrieve information about the requesting device.

AskPythia features an implementation on top of the WURFL database, and generic classes that may be re-used to add support to other types of repositories.

AskPythia is a stand-alone library whose source code is distributed under a W3C Software Notice and License.

TransPythia, a transcoding library

TransPythia is a transcoding library used to adapt content (HTML, CSS, images) to fit the capabilities of the requesting device. The library ships with a set of transcoding actions that are particularly adapted to mobile devices and that may be extended as needed.

Implemented actions include pagination of HTML pages (or fragments of HTML pages), images resizing, and various cleaning operations to remove embedded elements that are not hardly supported by mobile devices.

TransPythia uses AskPythia to identify and determine the properties of the requesting device. Source code is distributed under a W3C Software Notice and License.

Feedback

Comments, suggestions, contributions and bug reports should be sent to the public-mobile-dev@w3.org mailing-list. The archives of the list are publicly available.

You can subscribe to the list (and unsubscribe), or if you just have a small question and don't want to join the list, feel free to send it directly to the list.

About Pythia

Pythia was the priestess presiding over the Oracle of Apollo. An oracle is a source of wise counsel, where knowledge, supposedly inspired by deities, is distilled through prophecies. Authored content acts as the source of inspiration in the metaphor and the plug-ins relay that information, translating it to a language that can be understood by the requesting device.

Credits

EU FP7 Logo

This work is part of the MobiWeb 2.0 project supported by the European Union's 7th Research Framework Programme (FP7).

Contact: François Daoust <fd@w3.org>