The biggest challenge in server side development for mobile applications (web or otherwise) is delivery which itself is divided into three major tasks
1. Device detection – Detecting the device means finding out the device capabilities from user agent. This task
2. Content delivery – This is basically about delivering the content based on device if available. This requires content to be adapted before hand for all the target devices.
3. Content adaptation – Content adaptation generally means trans-coding rich media content like audio, video etc. into different formats, resizing of content for various different resolutions. Generally following strategy is used
- manual design changes for major resolutions
- automatic adaptation for minor changes, formats and capabilities
Coming back to the topic, there are not many standards or methods around mobile device detection. Many companies providing technologies to telecom operators have developed their own proprietary system for device detection, delivery and adaptation. The only standard in device detection is CC/PP (Composite capabilities/Preferences Profile) specified by W3C which is based on XML Serialized RDF, the Resource Description Framework. A CC/PP profile defines a set of attribute names and associated values. It allows usage of one or more vocabularies which are extensible. UAProf (User Agent Profiles) developed by the Open Mobile Alliance (OMA), is a concrete implementation of CC/PP primarily aimed at mobile devices that support WAP. It has six components, each having a predefined set of possible attributes. The profiles are stored in publicly accessible repositories. A device needs to state the URL of its UAProf, which applications can retrieve and dynamically transform the content suitably for that device. Both CC/PP and UAProf use profile repository maintained by the manufacturers. UAProf is widely accepted standard in the industry to represent device capabilities.
Wireless Universal Resource FiLe (WURFL) is an open source database of wireless device capabilities. It is based on the concept of family of devices. This will let a phone inherit capabilities of its family. WURFL is basically an XML file. The sources for WURFL are the UAProf as well as open source community contributors. WURFL goes a step further to UAProf in allowing open source community to update device information, thereby enabling the data to be more practical and up to date.
WURFL is being used by many in industry and has been integrated with many open source platforms like Drupal. Integration of WURFL can be done at either
- web-server level, for example Apache Mobile Filter (http://www.idelfuschini.it/it/apache-mobile-filter-v2x.html)
- web application filter using WURFL’s php, java api
It is generally preferred to have detection on web-server level while delivery & adaptation at application level for mobile applications. For our use-case of mobile advertising, we are doing detection at web-server level (using nginx module) and delivery at application level (using erlang based DHT-Scalaris to fast match the ad based on detected capabilities).
