Subscribe to Windows IT Pro
December 22, 2011 01:00 PM

WURFL: An Essential Mobile Website Technology

Use this global repository to detect browser capabilities for your ASP.NET mobile websites
Dev Pro
InstantDoc ID #140645
Rating: (0)
Many people today associate mobile development with the development of an application for the iPhone, Android, or Windows Phone 7. Mobile development, though, certainly did not originate with iPhone. As early as a decade ago, Wireless Application Protocol (WAP) and Wireless Markup Language (WML) emerged as the respective counterparts of HTTP and HTML for mobile browsers. The first version of ASP.NET also included a special namespace for server controls to enable you to write mobile sites using the same developer experience as for regular ASP.NET-based websites. For some reasons (mostly lack of ubiquitous Wi-Fi connectivity and non-flat data rates), the WAP/WML duo, and with it development of mobile websites, never really caught on.

After a decade of waiting, today we are witnessing the definitive explosion of mobile computing. The technological scenario is a bit different, though. WML has been replaced by XHTML, and a bunch of newer mobile operating systems (iOS, Android, Windows Phone 7, Symbian, BlackBerry) have evolved along with smarter phones equipped with better hardware and overall much better usability. These new mobile OSs are drawing a lot of attention from developers. It is common these days to run across endless threads about the (false) dichotomy between native mobile applications and mobile sites. Mobile native applications and mobile websites are much more complementary than many seem to think. And mobile sites still keep customers no more than a URL away from the company's site.

If your business's mobile strategy includes building a mobile website, there's a technology you need to know about: Wireless Universal Resource File (WURFL), a database of information about mobile devices and browsers. I will introduce WURFL and explain how you can integrate it into your ASP.NET applications to support mobile websites. But before that, let's back up a bit and look at some higher-level considerations related to mobile strategy.

What's a Mobile Strategy, Anyway?

A company's mobile strategy depends on its business model. In a business-to-consumer scenario, some companies may need to push out an array of applications to cover the major families of smartphones. This typically happens when applications have high value for a relatively small group of loyal users.

Other companies, instead, may want to be reachable by as many people as possible over all possible mobile devices. For those companies, a device-optimized mobile website is the obvious solution. Of course, companies can adopt both solutions and offer a mobile site to everyone while encouraging customers to download a specific application for a particular smartphone.

In a business-to-business scenario, in addition to the strategies I just mentioned, some companies may opt to choose one mobile platform and tailor their mobile website and application development to that platform.

The Multi-Serving Approach and WURFL

When it comes to mobile site development, you must take into account thousands of different models of devices, not just a few dozen models of smartphones, often with a prefixed set of capabilities. How would you approach this challenging task?

Writing a set of pages (if not the entire website) per device model is simply not feasible. The one-size-fits-all approach is viable, but it comes at the cost of leaving a lot of legacy devices behind and relinquishing the advanced features of smartphones. This is typically not good enough for companies that found their success with online content, such as social networks or media and news companies.

The alternative is multi-serving, which basically consists of three points: Group devices in classes based on capabilities, build a version of the site per classes you intend to support, and define a strategy to serve the right site to each device that connects to the site.

Multi-serving takes mobile development to a new level of complexity, but it is here where WURFL shows its value: As emphatic as it may sound, WURFL makes multi-serving manageable. Multi-serving is expensive per se; with WURFL it becomes a lot less expensive.

WURFL is a centralized database that stores detailed information about thousands of mobile devices and browsers. The main point of the WURFL framework is that it shifts the focus from devices' brand and model to mobile browser capabilities. A mobile site built to accommodate the effective capabilities of the mobile browser installed on, or embedded in, a given device is much more resilient and also self-updating. Any device and browser updates are promptly incorporated into the WURFL database and simply result in a different mapping between the requesting client and version of the site to serve.

This approach, devised by Luca Passani more than 10 years ago, has proved so successful that pretty much any commercial mobile solution developed since then has adopted it.

Related Content:

ARTICLE TOOLS

Comments
  • James Rosewell
    4 months ago
    Jan 11, 2012

    Thank you for a great introduction to the subject of mobile device detection.

    Readers may also wish to evaluate 51Degrees.mobi (my company). We operate a freemium commercial model providing some data and all APIs under the Mozilla Public Licence. For more information see the following links:

    Product Overview - http://51degrees.mobi/Products/DeviceData.aspx
    NuGet Package - https://nuget.org/packages?q=51degrees&sortOrder=package-download-count

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.