Web authoring tools ease publication process. Simplicity comes
with some loss of control over the generated content. There is
hardly anything an authoring tool user may do to improve her
content when the
W3C mobileOK
Checkerreports that pop-up windows should not be used.
So what?! I do not have any of these pop-up links in
mycontent!
The underlying theme can be updated, but this approach works up
to a point when e.g. the post would best be split into multiple
pages when delivered on mobile devices. Authoring tools that do not
provide content adaptation mechanisms need to be extended to be
able to serve mobile-friendly content to mobile devices.
I have been working on an open-source suite of tools written in
PHP lately, named
mobileOK Pythia, designed to help generate
mobileOK content and more generically speaking to help adapt
content to fit the properties of the requesting device. Here is a
short overview of the outcome of this work. More information
(including crucial information about the choice of
Pythiaas a name ;)) can be found in the
documentation of mobileOK Pythia.
This work is part of the
MobiWeb 2.0project
supported by the European Union's 7th Research Framework Programme
(FP7).
Plug-ins for WordPress and Joomla!
From a user's point of view, the visual and hopefully useful
outcome of this work is the creation of the
mobileOK Pythia plug-insfor
WordPressand
Joomla!that make it possible to
generate mobileOK content with these tools.
The plug-ins feature:
-
Device identification: based on
WURFL, an open-source
DDR published as an XML file, and accessed through a standard
DDR Simple
APIinterface.
-
Content adaptationto fit the properties of the
requesting device in terms of e.g. screen size, script support,
page size limit.
-
Theme switching: possibility to switch to a more
mobile-friendly theme when the requesting device is identified as
mobile.
-
POWDER: a machine-readable mobileOK claim for the
Web site can be automatically created and served using a POWDER
document. The POWDER document is made discoverable through the
addition of a
LinkHTTP header field as decribed in the
POWDER
Primer.
-
W3C mobileOK Checker link: a link to the
W3C mobileOK
Checkeris added next to the authoring input form to be able to
assert the mobile-friendliness of the created content while it is
being written.
-
mobileOK theme: a mobileOK template may be
installed with the plug-in.
The development of a third plug-in for
Moodlehas started but it is still
work in progress.
There exist other plug-ins that provide similar functionality
(see for instance
WordPress Mobile Plugin,
WordPress Mobile Pack,
Mobilebot 1.0or
WAFL: Mobile Content Adaptation). mobileOK Pythia separates
tool-specific functionalities from tool-agnostic libraries to ease
porting to other tools. In particular, the plug-ins wrap the same
extensible libraries:
- AskPythia to identify and retrieve the properties of the
requesting device.
- TransPythia to adapt content based on the properties of the
requesting device.
AskPythia
AskPythia is an open-source conforming implementation of the
Device
Description Repository Simple APIin PHP. It is not a DDR but a
wrapperto existing DDRs.
AskPythia ships with an implementation on top of the WURFL
database that maps WURFL capabilities to properties defined in the
Device Description Repository Core Vocabulary standard. Support for
other DDRs is welcome!
Check
AskPythia's documentationfor more information.
TransPythia
TransPythia is a transcoding library that adapts content (HTML,
CSS, images) based on 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.
Main transformations are:
-
Images conversion and adaptation: adapts images to
match the requesting device's list of supported image formats and
to fit the screen size. Removes images that cannot be converted or
that are still too big for mobile consumption after
conversion.
-
Pagination: a generic pagination algorithm that
may be used to paginate HTML pages or HTML fragments when the
requesting device is identified as a mobile device.
-
Tables linearization: to remove nested tables and
linearize tables when the requesting device does not support
them.
Check
TransPythia's documentationfor more information.
Feedback
If you would like to comment, contribute, report bugs or simply
tell us what you think, you are very welcome! Feel free to send an
email to the
public-mobile-dev@w3.orgmailing-list (with
public archives).