With the possible exception of purely vertical applications that only work on one specific type of device, content providers need to identify devices with which users access their sites and services. This Device Detection task is typically made through a Device Description Repository (DDR), a software component which can map the HTTP request generated by a mobile device to a description of the features supported by that device.
The most obvious example of this is detecting a device screen size in order to serve pictures with the correct dimensions and avoid images that are too large, too small, cropped incorrectly or simply take too much time to download. These are all aspects of mobile development which can significantly detract from the overall usability of a mobile site or application.
The introduction of HTML5 only makes the challenge of delivering web services to a heterogeneous population of mobile devices more important. According to a recent study from Appcelerator and IDC, “a resounding 79% of mobile developers report that they will integrate HTML5 in their apps in 2012.”
WURFL, the Wireless Universal Resource FiLe
WURFL, the Wireless Universal Resource FiLe, is arguably the de-facto standard DDR. WURFL has addressed the problem of device fragmentation for over 10 years. Originally created as an open-source initiative, WURFL is now offered according to a “dual-licensing” scheme. Organizations that prefer not to open-source their own source code (as per Affero GPL v3 provisions) can acquire a commercial license and use WURFL commercially.
To better understand how developers can efficiently serve a diverse mobile device population, we interviewed Luca Passani, the original creator of WURFL and now Chief Technology Offer at ScientiaMobile, Inc, the company that offers WURFL commercially. His opinions are his own and do not necessarily reflect Nokia’s view.
Nokia Developer: You recently announced a new API for WURFL that has specific benefits for developers targeting Nokia Lumia Windows Phones and Nokia Series 40 phones running the Nokia Browser. Tell us more about the change.
Luca: WURFL strives to reach maximum coverage of devices in the market. In spite of this, there are always devices that WURFL cannot recognize either because they are very new or simply not very popular. One cool feature of WURFL is that it never gives up without a fight. A device may not be recognized with its make and model, but WURFL will adopt extra logic to at least detect the family, such as the OS and the browser. This means that the user of the device will still get the experience its device deserves, because features like touchscreen, large display, or an HTML5-capable browser can still be assumed.
Specifically to version 1.4 of the WURFL API, to be released by the time you read this, new logic has been added to detect Nokia phones with Windows Phone 7.X and Series 40 Nokia Browsers, even in those cases where the device itself is not recognized. Of course, this comes on top of our regular activity of categorizing Nokia devices and making sure that they are well represented in WURFL.
Nokia Developer: With WURFL, developers customize what they serve to a mobile user based on the device the user has in hand. Some developers prefer to avoid server-side techniques, and rely instead on full-featured mobile browsers. When and why do you think server-side optimization is worth the effort?
As a mobile developer, I was constantly asking myself “How do I create mobile content that works on all devices?” Well, guess what. This is the same question that WURFL users were asking themselves and to which WURFL was the answer. Server-side detection makes mobile look like a platform because it gives developers control. Client-side detection means losing control on what you can deliver on different devices.
Nokia Developer: How do developers use WURFL to optimize their content?
Luca: If I had to characterize WURFL with a single word, it would be “agnostic”. WURFL makes as few assumptions as possible about the ways people need device detection solutions. Some companies will create a single version of their mobile site and add a few WURFL-powered micro-optimizations here and there. Others will segment the device market and offer different user experiences to different families of devices. It’s all WURFL. Support for Java, PHP, .NET and other platforms is simply another dimension to such agnosticism.
Nokia Developer: Many large web sites use WURFL data, and also supplement it with their own database. What are the reasons they are doing this? Is WURFL planning anything to make this practice obsolete?
Luca: Every mobile project is one off. There is no way anyone can come up with an all-encompassing set of device capabilities. WURFL was designed from the ground up to embrace variation, rather than fight it. Personally, I hate it when someone tells me that my problem is a different problem simply because they don’t have the right solution to sell. In short, a DDR must allow developers to create and maintain their own capabilities if they so wish.
Nokia Developer: That brings up the topic of proxy browsers like Nokia deploys on its Series 40 phones. Are there any special considerations developers should take when they know they’re dealing with a proxy?
Luca: You should consider security when you know you’re serving through a proxy. An incoming request to your servers over HTTPS does not necessarily mean there is HTTPS encryption throughout the transaction. Nokia browsers provide HTTPS connections between the device and the proxy and also between the proxy and your servers, but not all proxy browsers provide this security. If your service involves financial transactions or otherwise requires secure communication, WURFL has a capability “is_transcoder” that developers can use to adapt to the situation.
Nokia Developer: There appears to be further mainstream adoption of proxy-based browser technology (e.g. Nokia Browser, Silk). What do you think about this trend? What are some key things you’d like to see in proxy-based browser technology in the future?
Luca: The security aspect of proxy-based browsers is a concern. Of course, for sites where security is not a concern, a proxy can improve the user experience: resources can be compressed, cached and resized on the proxy, which will improve the speed with which a page is loaded.
Nokia Developer: What are the business options for companies working with WURFL?
Luca: Our main value proposition is that we deliver WURFL with the full source code and open repository. Openness means ease of integration and maintenance. Our code is very reasonably priced.
Recently, we launched the WURFL Cloud. The Cloud allows companies that do not care all that much about open source to access WURFL and pay based on the actual number of device detections. We even launched the Cloud with a free offering. Hobbyists, micro-companies or simply developers who want to give our cloud a spin can do it without a credit card or anything like that.
Of course, we are perfectly aware of the fact that companies are very different and their DDR needs are very different. Our team is available to hear your requirements and come up with an offer that is good for all needs.
Nokia Developer: Can you give us an example of a developer or two who use WURFL today?
Luca: Of course. There are thousands of companies using WURFL around the planet. Small and large. I’ll mention one: Facebook. It was small in 2004. Has it grown any bigger?
Nokia Developer: You already mentioned your cloud-based offering. How does that differ from your traditional service?
Luca: By choosing the cloud, one gives up the control that comes with installing all the software on your server. On the other hand, there are also upsides. With the cloud there is no need to invest in software and hardware to set up your DDR. Just install a script or lightweight library and you’re good to go. Automatic updates to the repositories are also a big plus: you don’t need to have someone in charge of updating your system periodically.
Nokia Developer: Where can developers go for more information and to get started?
Luca: The WURFL website is where you find the documentation for the different WURFL APIs.
Information about Device Detection in the Cloud is available on the ScientiaMobile website: http://www.scientiamobile.com/cloud