
The Most Exciting Mobile Community on the Planet
Download Latest WURFL
Last Updated: November 12, 2009
What's a Patch File?
Web Patch(recognize web browsers)
TRAC: report bugs/CRs
Using TRAC to report
bugs and requests changes
WURFL API (Java, PHP, .Net)
WNG
WALL (new retrofitted WALL lib)
Documentation
!!! Capabilities !!!
Video Testing
About WURFL
What's the WURFL?
What can the WURFL do for me?
What's so smart about the WURFL?
WURFL and UAProf
Voices from the Net
WURFL Pronunciation
FAQ
Contributions & Attributions
WURFL-based apps
WURFL Endorsements
WALL-based apps
License
Get Involved!
Contribute Device Info
WURFL Utilities
Utilities,
uaprofile2wurfl.pl,
Alembik,
mDevInf,
Thumbnails,
Wallify,
Image Server,
Tera-WURFL,
GAIA Trascoder,
Mobile Web Toolkit,
PHP Image Rendering Library,
PHP Image Rendering Library (II),
FastWurfl,
Apache Mobile Filter
Credits
Luca Passani
Old APIs
(too be deprecated and removed)
Old Java API and WALL
Perl
Ruby
Python
XSLT Tools
C++ tools


Crowdsourced Mobile Application Testing
|
|
WURFL FAQ, Part 1: General about WURFL
by Luca Passani
passani at eunet dot no
Q: What is the WURFL?
A: WURFL = Wireless Universal Resource FiLe.
WURFL is a database (some call it a "repository")
of wireless device capabilities. The ambition
of the WURFL project is to model the properties of common wireless devices
around the planet *and* provide a simple API to programmatically query
the capability database.
Since the goal of WURFL is to be open and available on as many platform as possible,
XML was chosen as the format to capture device data (every self-respecting development
platform offers XML APIs of some kind these days).
Q: Where do I find the WURFL.
A: In short:
The WURFL Home Page
http://wurfl.sourceforge.net
The most recent public version of the WURFL file is made available at:
http://wurfl.sourceforge.net/latest.zip
Latest WURFL version through CVS
http://sourceforge.net/project/showfiles.php?group_id=55408
The WURFL home page also carries the APIs for the different platforms.
Q: What is a WURFL device?
A: A WURFL device is an XML fragment that models a certain device.
As a minimum, the device XML fragment contains the user agent string, the device ID (which
is created by the WURFL maintainer and can be disregarded by the casual WURFL user)
and the fall_back attribute, which gives a way to infer more info about the device.
In addition to this data, a device element may carry more information:
- device features commonly referred to as capabilities
- the
actual_device_root="true" attribute signals that the current device element may be chosen as the representative for all devices by the same brand and model name.
An "actual device root" will typically have a WURFL ID ending with "_ver1" ("_ver2" and "_ver3" are also possible for popular devices which have had significant major revisions of their firmware). More importantly, all device elements referring to devices with the same name and model will be falling back into the actual device root either directly or indirectly.
A WURFL device with capabilities looks something like this:
<device user_agent="Nokia3100" actual_device_root="true"
fall_back="nokia_generic_series40"
id="nokia_3100_ver1">
<group id="product_info">
<capability name="model_name" value="3100"/>
</group>
<group id="xhtml_ui">
<capability name="xhtml_format_as_css_property" value="true"/>
<capability name="xhtml_supports_table_for_layout" value="true"/>
<capability name="xhtml_supports_css_cell_table_coloring" value="true"/>
<capability name="xhtml_readable_background_color1" value="#99CCFF"/>
<capability name="xhtml_readable_background_color2" value="#FFFFFF"/>
</group>
<group id="markup">
<capability name="preferred_markup" value="html_wi_oma_xhtmlmp_1_0"/>
<capability name="html_wi_w3_xhtmlbasic" value="true"/>
<capability name="html_wi_oma_xhtmlmp_1_0" value="true"/>
</group>
</device>
An introduction to WURFL is also provided as part of the WURFL contributor on-line help for the WURFL DB at wurflpro.com.
Q: What is a WURFL device capability?
A: A device capability is an XML fragment which contains information
about a specific feature of a given device (and all the devices falling back
into it. Refer to the example in the previous answer to see what capabilities look like.
Q: What is a WURFL device capability group?
A: Groups are used to improve the readibility of the WURFL XML database
by humans. Don't be fooled, though. The WURFL capability namespace is flat and name
should be unique also across groups.
Q: Where do I find capability X explained?
A: There is a very nice document on the WURFL website which describes
all the capabilities:
http://wurfl.sourceforge.net/help_doc.php
Q: What is a device "fall back"?
A: No newly-released wireless device is totally new when it comes to the software
it runs, meaning that the same software was already running on older devices by the same
manufacturer.
This fact can be exploited to make the WURFL more compact and to make reasonable guesses
about the features of new devices. The fall_back mechanism achieves exactly this. By pointing
to a different device (typically an older device by the same manufacturer), programming APIs
can traverse the device hierarchy and figure out the capability of any device.
A more detailed explanation of how the fall_back works can be found at:
http://wurfl.sourceforge.net/smart.php
Q: What is the 'generic' device?
A: The 'generic' device is the first device at the top of the WURFL file and
represents unrecognized devices, meaning that when a device cannot be matched to any device
in the WURFL, it is guaranteed to match the generic device.
In addition, generic guarantees a termination point for all of the fall_back chains
in the WURFL. 'generic' contains the definition of all capabilities. Its capabilities
typically have minimalistic values (small screens, basic XHTML support,
and so on). Of course, this implies that a WURFL file can potentially be broken
way beyond what the WURFL DTD can protect you against. The WURFL maintainer has utilities
that make sure new WURFL files are good when they get shipped. If you hack a local copy
of WURFL, though, you have to be careful. Also, check out the patch file article.
Q: What does the 'actual_device_root' represent?
A: WURFL models devices which only different in the firmware subversion of the
software as different devices. This is good, since it allows WURFL-based applications
to handle correctly only apparently identical devices. One side effect is that certain
devices are responsible for 10 or 20 WURFL entries. This would normally prevent
APIs from using the WURFL to compile lists of actual user devices. This possibility
is made possible again by the actual_device_root="true" attribute, which
lets APIs select one and only one device out of a family of firmware subversions.
Q: How to query WURFL information.
A: Actual device data is just a part of what the WURFL project offers
you. WURFL is also about giving you a programming interface to querying device
capabilities. The WURFL website
features APIs for Java, PHP, Perl, Python, Ruby, DotNet and XSLT.
Q:What's a 'patch file'?
A: If you need to add device info to your application, managing the WURFL file
directly is probably inpractical, since this would impair your ability to upgrade to
future WURFL versions without deleting your changes.
The patch file has been introduced to help with this problem. Rather then modifying the WURFL
directly, you can define a patch file that looks like some kind of mini-WURFL. Once the WURFL
is loaded, APIs can use a the patch file to enrich the data in the WURFL itself. From this moment
new WURFL versions can be imported without overwriting local data.
A more thorough discussion of patch files can be found at:
http://wurfl.sourceforge.net/patchfile.php
Q: My 'patch file' does not work. What did I get wrong?
A: (Michael Kaye) The process of patching is:
- Copy *exactly* the <device/> that you are patching (no subelements)
- Insert only the changed capabilities within the <device/>
- If you add a new capability, you must also patch the generic device with the default value for that capability.
For example, to patch:
<device user_agent="BlackBerry5810/3.6.0"
fall_back="blackberry_generic_ver3_sub60" id="blackberry_5810_ver1_sub360">
<group id="product_info">
<capability name="model_name" value="BlackBerry 5810"/>
</group>
<group id="display">
<capability name="rows" value="16"/>
<capability name="columns" value="26"/>
</group>
</device>
so that a new capability, "height" is available in group "display" (for
those 3d displays, you know), the patch file should
contain two entries:
<!-- so we register the 'default' value, and add this capability to the
list of available capabilities -->
<device user_agent="" fall_back="root" id="generic">
<group id="display">
<capability name="height" value=""/>
</group>
</device>
<!-- patch on the capability to the device mentioned above -->
<device user_agent="BlackBerry5810/3.6.0"
fall_back="blackberry_generic_ver3_sub60" id="blackberry_5810_ver1_sub360">
<group id="display">
<capability name="height" value="150"/>
</group>
</device>
Q: I found an error in the WURFL. What shall I do?
A: You can either post your findings on the WMLProgramming mailing list
or communicate with the WURFl maintainer directly.
Q: Who created the WURFL?
Luca Passani architected the file structure and the fall_back mechanism.
Luca is the WURFL owner and current maintainer.
In addition to architecting the WURFL and the patch file,
Luca Passani has created a company called WURFL-Pro. WURFL-Pro has released the
latest version of the PHP, Java and .Net WURFL APIs, in addition to WALL and WNG.
Q: How do I contribute device information to WURFL?
A public website called WURFLDB (available at www.wurflpro.com) allows contributors
to submit device info directly into WURFL. Contributors are appointed by Luca Passani.
Details about what WURFLDB is and how to become a contributor can be found at
http://wurfl.sourceforge.net/get_involved.php
Q: Who is the WURFL maintainer?
A: Luca Passani (passani AT eunet DOT no )
Q: I have a new device. How do I get it added to the WURFL?
A: You can find information about how the WURFL maintainer (Luca Passani) would
like to receive WURFL submitions at
http://wurfl.sourceforge.net/contribute.php.
You may also want to take a look at this FAQ: How do I contribute device information to WURFL?.
Q: Is there a simple way to browse the WURFL?
A: Yes. The WURFL java package contains an utility called WURFL-browser which shows
the data in a more human-readable format. You can easily install the Java package on any
platform even if your development platform is not Java.
Q: ALARM! ALARM! Device X is not in WURFL
A: WURFL relies on user input. If you have a new device we have not heard of, check this
page
http://wurfl.sourceforge.net/contribute.php
for information about how to get it added to the WURFL. You may also want to take a look at this FAQ: How do I contribute device information to WURFL?.
Q: Is there a WURFL mailing list?
A: Sure thing! It's called WMLProgramming on Yahoo Groups.
http://groups.yahoo.com/group/wmlprogramming/.
Q: Where do I find more info about WURFL?
A: The WURFL website should have all you need to get started. The Openwave Developer
Netowrk (
http://developer.openwave.com/dvl/tools_and_sdk/wurfl_and_wall/) is dedicating a
series of article and tutorials to WURFL.
Q: Is there a WURFL book?
A: No, there isn't. If you are a publisher and you are investigating the possibility to
publish a book about WURFL and WALL, let Luca Passani know. Luca has already worked with Wrox Press
in the past.
Q: What is UAProf?
A: UAProf (User Agent Profile) describes the capabilities of a device/browser.
This information is in the form of an XML document and covers the following device attributes:
- Hardware Platform, eg screen size, audio capability colour capability.
- Software Platform, eg operating system, content types etc.
- Network Characteristics; eg GSM/GPRS capable, WLTS capable etcBrowser;
- Browser name and version, xHTML version, JavaScript Support
- WAP Characteristics; WML version, deck size, OMA download
- Push Characteristics; Push content types, application.
A lot of info. Sort of similar to what the WURFL contains. In fact, UAProf is some kind of industry
standard to represent device capabilities. Since it is not feasible for a device
to send this information over the air, the profiles are stored in publicly accessible
repositories (at least in theory) so that all the device needs to do is to state the URL
of its UAProf. Theoretically, applications should be able to retrieve this profile programmatically
(give and take some caching) and dynamically repurpose the content for the each device.
Of course, always theoretically, you don't need the WURFL.
In practice, you need the WURFL real bad, because:
- UAProfs are often wrong
- Old devices do not have UAProf
- UAProf is hosted at non-public URLs (only apps in the domain of a given operator have access
to them)
- Even if you fix UAProf, you are not legally allowed to re-host it on another URL
- There's no decent middleware to use UAProf out of the box
Q: How does UAProf releate to WURFL?
A: When a new device hits the market, the WURFL maintainer uses the UAProf data
to populate the WURFL. Of course, if the community finds that some of the data is wrong, the data
gets fixed for everyone's enjoyment. In other words, WURFL offers one level of indirection which
goes a long way in making WURFL more valuable than UAProf for developers.
It would also make sense to describe WURFL as "UAProf on steroids".
Q: Are there open-source alternatives to WURFL?
A: (Credits: Mark Butler)
Apart from WURFL, they are two standards for describing devices to
describe their capabilities to web servers. One of them, User Agent
Profile (UAProf 1.1,
UAProf 2.0)
from the Open Mobile Alliance, is now maturing as
profiles have improved dramatically in quality and are now supported by
in excess of 150 mobile devices. The other,
CC/PP from the W3C, is
still not widely used but it is anticipated this situation will change
when the W3C Device Independence Working Group has completed work on a
core vocabulary for CC/PP. Developers interested in using these
standards may like to take a look at
DELI
(HP), an open-source library
developed at Hewlett Packard Labs that allows Java servlets to resolve
HTTP requests containing delivery context information from CC/PP or
UAProf capable devices and query the resolved profile. DELI also
provides support for legacy devices so that the proprietary delivery
context descriptions currently used by applications can be replaced by
standardised CC/PP descriptions. It can also validate profiles so the
Open Mobile Alliance currently recommend terminal manufactures use DELI
to check profiles for errors as part of interoperability testing.
|
|
|
|