Comments
yourfanat wrote: I am using another tool for Oracle developers - dbForge Studio for Oracle. This IDE has lots of usefull features, among them: oracle designer, code competion and formatter, query builder, debugger, profiler, erxport/import, reports and many others. The latest version supports Oracle 12C. More information here.
Cloud Expo on Google News
SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
Welcome to the WURFL
Welcome to the WURFL

Creating a wireless application that works on as many devices as possible is not difficult, it's useless! If you invest a huge amount of resources today, chances are that a new device will ship tomorrow and you'll need to tweak your application again...unless you use WURFL and its framework.

Fragmentation of the Wireless Platform
Each and every wireless technology (with the possible exception of SMS) needs to face a major challenge: those wireless devices out there are all different from one another. WAP, J2ME, MMS, WAP-Push... no wireless developer can escape the need to target his or her apps to specific devices to squeeze the last drop of performance out of them. This process is exhausting for developers and expensive for their managers.

Periodically, we are reminded that this or that committee [in W3C/OMA/JCP/Pick your favorite] will fix that for the [J2ME/WAP/WAP-Push/Pick your favorite] technology. Unfortunately, new technologies have been popping up faster than any committee ever fixed anything. After all, if you consider that device manufacturers are all about differentiating (and you consider human nature), it's not surprising that good intentions vanish along the road and all you get is fragmentation: standardizing can be like trying to swim upstream.

While the fragmentation problem has been bugging everyone from the beginning of time (which for wireless is probably 1997), the industry has failed to give an effective solution to the problem. If I had to speculate about the reasons for this failure, I would probably name three things:

  • The mirage of standardization has kept many from pursuing a business model in the field of multiserving wireless applications.
  • Some companies have effectively built tools and frameworks that address the problem. Such frameworks are generally too expensive for the great majority of developers, and, often, they are not flexible enough for developers' needs. This is not surprising: given the number of devices and the number of markups out there, keeping those databases of device capabilities up to date can quickly turn into an expensive nightmare.
  • WAP Forum and OMA have embarked on a standard whose ambition is to be a framework for device capability recognition. It is called UAProf. Unfortunately, such a standard is endorsed by many in theory, but not enough in practice, which makes it hard to rely on. Let me add that many developers consider this approach flawed. This is reflected by the figures of UAProf adoption by developers: virtually zero right now.

    In this situation, it was only a question of time before the ones who need to make wireless work, the developers, would come up with something that did just what they needed.

    WURFL
    WURFL, the Wireless Universal Resource FiLe, is a configuration file that contains info about the capabilities and the features of devices available on the market. For example, if I were to ask you whether a Motorola V66i supports M-Services' Download Fun, would you know the answer? I would...but only after taking a quick look at the WURFL. The answer is yes.

    Does a Nokia 3510 come with a built-in camera? The answer is no. Thank you, WURFL.

    While the WURFL file itself is intelligible to a human (or at least a programmer), this is hardly its main use. Developers use the WURFL to figure out device capabilities programmatically and to serve different content to different devices dynamically, depending on the capabilities of the device accessing the content. This is commonly referred to as multiserving a wireless application.

    It is accurate to regard the WURFL as some kind of universal database containing info about all known wireless terminals. One requirement is that such a database must be accessible on all platforms. This is why we chose XML for the WURFL.

    The WURFL contains a list of <device> elements, each one representing a family of devices (and not necessarily a unique device). At the time of this writing, the WURFL contains over 1,500 devices and over 300 modeled properties (capabilities). It should be noted that WURFL also catches software subversions, which explains why there are so many devices.

    At this point, the technologically savvy reader may suspect that the WURFL is a pretty large file. This is not the case. A mechanism called "fall_back" keeps the WURFL size down a couple of orders of magnitude (350 kilobytes at the time of this writing). More about this later after we have answered some questions:

  • How can you be sure that the WURFL and the software around it is free?
    - WURFL is all about open source. The WURFL itself is just data and lawyers tell us that, as such, raw data is not copyrightable.
    - The software around the WURFL, on the other hand, has the license that the creator has assigned to it, but we are always talking open source of one kind or another (GPL, Public Domain, MPL, and similar).

  • Who guarantees that the data in the WURFL is accurate?
    - The short answer is: nobody! You'll have to trust the community of programmers who populated the WURFL by observing the behavior of those devices and reporting what they saw to the WURFL maintainer.
    - There's a long answer to the same question that's probably way more interesting to you: paradoxically, the lack of a formal validation process for the WURFL data has several advantages. First, the IP-free nature of the WURFL keeps people contributing data in the interest of the community. Second, if some of the data in the WURFL is wrong, but nobody realizes it, then there's not much of a need to fix that specific piece of data.
    - Better yet, if you realize that some of the data in the WURFL is inaccurate, you can go ahead and fix your own copy of the WURFL without waiting for anyone to fix it for you (it takes Notepad and five minutes to do that. This ability to update the data source so quickly and easily is one of the most popular features of the WURFL).
    - Of course, in that case, you are more than welcome to drop us a note to tell us what to fix. This basically means posting a message on the WMLProgramming mailing list on YahooGroups at http://groups.yahoo.com/group/wmlprogramming/

  • Why aren't there commercial products addressing the same issues?
    - They exist and they are expensive. Believe me.

    The Gory Details
    Let's take a closer look at the WURFL. The first device modeled in the WURFL is the generic. In the unlikely event that a device cannot be matched to any of the devices in the WURFL, the match with the generic will succeed. The generic models all the properties with minimalist values (no support for multiple colors, no MMS, no Java, and so on. Only WAP 1.1 support is assumed). Other devices sort of "derive" from generic through the aforementioned fall_back mechanism.

    Consider a new device. No matter how new and innovative that device is, chances are that 90% or more of the software running on that device is the same as some other device from the same vendor. For example, the differences between the WAP browsers of Nokia 7110 and Nokia 6210 are negligible. Same goes for the WAP browser of Siemens C35 and Motorola T2288, since both devices run the same version of the Openwave browser.

    Exploiting this fact is a huge advantage when modeling the capabilities of different terminals. We can now define devices in terms of families and subfamilies. New devices will inherit the capability values of their families by default, while specific differences can be modeled as a delta by overriding the inherited values that are not accurate. This is what the fall_back is all about. Given a specific device and a capability name, the WURFL either declares the corresponding capability value or lets you climb the heritage chain until a device that declares the value for that capability is found. In the worst-case scenario, you'll find the generic device.

    Listing 1 shows a WURFL fragment that makes the point (Motorola V66i, J2ME MIDP1.0).

    The user_agent attribute is the string that the device uses to introduce itself to the application or the server that runs the application.

    The ID attribute is assigned by the WURFL maintainer and uniquely identifies each WURFL device element.

    The fall_back attribute contains the ID of another element. This is, in practice, a pointer to another element from which the current element inherits its properties. The WURFL framework can track the value of a given property by following this trace and recursively querying each device.

    If one day Motorola were to introduce a new version of the V66 that does, say, MMS, this could be modeled very simply by defining (i.e., overriding) the capabilities for that device while falling back into the device shown in the previous listing for all the capabilities.

    As mentioned, the fall_back mechanism keeps the WURFL much smaller than the matrix of devices and capabilities it represents.

    Capabilities are divided by groups. This is purely to facilitate human reading, since capability names are global and cannot be repeated in different groups (smart developers like to keep their frameworks simple). The list of groups available in the WURFL at the time of this writing is:

    product_info, wml_ui, chtml_ui, xhtml_ui, markup, cache, display,
    image_format, bugs, wta, security, storage, downloadfun, wap_push,
    mms, j2me sound_format

    From Theory to Practice: the WURFL Framework
    I now assume that you are convinced of the value of the WURFL as a database of device information, but you may be wondering how much work it is to build applications on top of it, since you will need to actually parse the file and figure out a few things. This is not necessarily a problem. The WURFL framework is not just the data. It also includes tools, utilities, and libraries to parse and query the XML data. The PHP and Java platforms are particularly well represented in this regard, but you can check out the WURFL Web site (http://wurfl.sourceforge.net) to see which platforms are supported.

    Here's a look at WURFL support for the Java Enterprise Edition. There's a J2EE library that exposes a really simple API to query the WURFL (for example, given a user-agent and a capability name, the corresponding value is returned). On top of the API, there is a JSP tag library that makes it really simple to deploy WURFL application JSP. The tag library is much simpler to grasp than a servlet, so this is what I'll use to illustrate a practical use of WURFL.

    Imagine you need to build a portal that offers access to different wireless technologies (WAP, J2ME games, and cool color J2ME games, just for the sake of this example).

    Listing 2 will link all the services available on your site, but it will make sure that only the devices capable of handling that content will display links to the services.

    The page in Listing 2 will render differently depending on the capability of the device requesting the page:

  • Devices that support a GIF picture will receive a color GIF picture. Other devices will receive a good old WBMP (wireless bitmap).
  • A MIDP 1.0 device with colors will offer access to news, B/W midlets, and color midlets.
  • A B/W MIDP 1.0 device will offer access to news and B/W midlets.
  • Other devices will only receive access to "news."

    This is shown in Figure 2. Of course, what is important to you is that, if a new device enters the market, you will not need to change your application, but just update the WURFL to keep your application optimized.

    Conclusion
    WURFL is an open-source project created by wireless developers in the attempt to solve a common problem. Using the WURFL is simple and the architecture is sound (as proven by some important deployments throughout the world). On the WURFL Web site, you'll find more information, the software, and, of course, the most recent version of the WURFL.

    Source Code

    Listing 1

    <device user_agent="MOT-V66M/03" fall_back="mot_v66m_ver1" id="mot_v66m_ver3">
    <group id="product_info">
    <capability name="model_name" value="V66i"/>
    </group>
    <group id="downloadfun">
    <capability name="ringtone" value="true"/>
    <capability name="ringtone_imelody" value="true"/>
    </group>
    <group id="j2me">
    <capability name="midp_10" value="true"/>
    <capability name="cldc_10" value="true"/>
    <!-- limits in kilobytes -->
    <capability name="runtime_memory_limit" value="350"/>
    <capability name="physical_memory_limit" value="600"/>
    <capability name="download_limit" value="600"/>
    <capability name="j2me_colors" value="2"/>
    <capability name="j2me_softkeys" value="2"/>
    <!-- extras above midp-1.0 specs -->
    <capability name="phonenumber" value="false"/>
    <capability name="motorola_lwt_extensions" value="true"/>

    <capability name="j2me_colors" value="2"/>
    <capability name="screen_width" value="120"/>
    <capability name="screen_height" value="146"/>
    <capability name="socket" value="true"/>
    <capability name="extra_graphics_api" value="true"/>
    <capability name="vibration" value="true"/>
    <capability name="extra_sounds_api" value="true"/>
    </group>
    </device>

    Listing 2

    <%@ page contentType="text/vnd.wap.wml" %><?xml version="1.0"
    encoding="ISO-8859-1"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
    "http://www.wapforum.org//DTD//wml_1.1.xml">
    <%@ taglib uri="/WEB-INF/tld/wurfl.tld" prefix="wurfl" %>
    <wml>
    <card>
    <p mode="nowrap">
    <wurfl:if>
    <wurfl:condition capability="gif"/>
    <wurfl:then>
    <img src="/pix/logo.gif" alt="Openwave" />
    </wurfl:then>
    <wurfl:else>
    <img src="/pix/logo.wbmp" alt="Openwave" />
    </wurfl:else>
    </wurfl:if>
    <wurfl:if capability="midp_10">
    <a href="portal.jsp">Try Java on your phone</a><br/>
    </wurfl:if>
    <wurfl:ifmc logic="AND">
    <wurfl:condition capability="midp_10"/>
    <wurfl:condition capability="j2me_colors" relation="GT" value="8" />
    <wurfl:then>
    <a href="portal.jsp">More Better Java!</a><br/>
    </wurfl:then>
    </wurfl:ifmc>
    <a href="portal.jsp">News</a><br/>
    </p>
    </card>
    </wml>

    About Luca Passani
    Luca Passani, a Technical Advisory Board Member of of WBT, is Tools Development Manager for Openwave Systems, where he has led the OUI project. Luca has a Masters in Computer Science from the University of Pisa and several years of experience in Web development in Scandinavia. Over the past few years Luca has been working almonst exclusively with WAP. He is the author of several technical articles about WAP and WAP-related programming techniques and is a coauthor of "Professional WAP" (Wrox Press, 2001).

  • In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    Latest Cloud Developer Stories
    DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the ...
    "Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, an...
    SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of the 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. A valuable conference experience generates new contacts, sales leads, potentia...
    DevOps is under attack because developers don’t want to mess with infrastructure. They will happily own their code into production, but want to use platforms instead of raw automation. That’s changing the landscape that we understand as DevOps with both architecture concepts (Clo...
    In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enter...
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021



    SYS-CON Featured Whitepapers
    ADS BY GOOGLE