Mobile Device Browser File vs. WURFL for ASP.NET

2019-01-31 01:46发布

I am working on a commercial web application that has a separate mobile browser version intended for the more capable devices (BlackBerry, iPhone, Android, etc). I don't want to do simple User Agent contains style logic and was looking at the various detection libraries. It seems like WURFL and Mobile Device Browser File are my best options.

The Mobile Device Browser File (MDBF) project at CodePlex exposes information through the Request.Browser property. Also, it has a Microsoft Public License (Ms-PL). Mobile Browser Detection in ASP.NET mentions "data for MDBF comes from WURFL" and Mix: Mobile Web Sites with ASP.NET MVC and the Mobile Browser Definition File confirms MBDF is "created from a database from many sources, including the popular WURFL mobile device capabilities database."

51degrees has a .NET Mobile API that uses the WURFL data files and also populates Request.Browser. It is licensed under the Mozilla Public License Version 1.1. and claims:

With the .NET Mobile API installed and WURFL providing mobile device data, these calls will return extremely accurate data when compared to the standard browser information provided by Microsoft

Since the official WURLF .NET API is distributed with a GPL License, so it is a non-starter for my project.

WURFL ASP.NET Implementations compares ASP.NET implementations of WURFL, but this is over a year old (2009-01-16 - Article submitted) and doesn't mention the 51degrees API or MDBF.

Can I get any feedback on which library to use.

  • How often are these data files updated?
  • Is it better to use feature detection that user agent parsing?
  • Is an online service (e.g. Handset Detection) easier that update data files?
  • Any other useful input.

5条回答
▲ chillily
2楼-- · 2019-01-31 02:22

I think WURFL has more capabilities and more active community, and it has more frecuently release than mdbf. But i have to say that microsoft is doing good work. You could look Marg.Wurfl, too.

And remember you can use GPL software in SaaS.

You can look Marg.Wurfl too,

查看更多
叼着烟拽天下
3楼-- · 2019-01-31 02:24

The MDBF was updated fairly recently. If what you need is basic information it's probably better as it integrates nicely with your .NET framework.

Marg.Wurfl is definitely a good choice and integrates with .NET framework as well.

Both have an approach that is good for the old .NET style, not the MVC. In MVC you will have to do your own legwork.

You might also want to consider DeviceAtlas that has an API for .NET and has very good performance in .NET.

Specifically to your questions, WURFL is updated almost once a month, while AFAIK there are no planned updates for MDBF, they will release an update if and when they feel like it (yes, not very exciting). You might use Javascript to detect features in modern browsers such as iPhone, Android and recent Nokias, but for all the rest, the User-Agent string is still the only real option, so I'd say it depends on your target market. You might want to create a super-simple version that works for all and an advanced version where you do feature detection. I don't like the idea of online services, if you plan to have a high volume site. Once-a-month updates are OK, with commercial products like DeviceAtlas or Mobile Phone Wizards you can get more frequent updates.

DISCLAIMER: I used to work for dotMobi that created DeviceAtlas

查看更多
走好不送
4楼-- · 2019-01-31 02:31

The WURFL official .NET API has been released recently by ScientiaMobile--the WURFL people's newco. You can access it here: http://www.scientiamobile.com/site/page/view/downloads. However, it is subject to the AGPL license, which basically means you need to buy a commercial license to use the API in a commercial app, including a Web site. Raw data remains free.

A whitepaper showing how to integrate it with ASP.NET is: http://wurfl.sourceforge.net/dotNet.

查看更多
Deceive 欺骗
5楼-- · 2019-01-31 02:35

Regarding Mobile Device Browser File:

Quote: "Due to the organizational restructuring of the team that developed and supported the Mobile Device Browser file, we will no longer have the resources to support and update this CodePlex project. The team will be providing two more releases – one on the 27th July 2010 and the final release on the 24th August 2010."

So that I am not just the bearer of bad news...

We are planning on using:

by 51 Degrees

Which has a really good example of:

Hope this helps.

查看更多
家丑人穷心不美
6楼-- · 2019-01-31 02:42

As Dino mentioned, the WURFL API is distributed under AGPL, but also available under commercial licensing terms (this is called dual licensing, or also offering a GPL exception in FSF's parlance).

The wurfl.xml file is not longer considered raw data, though. Because of the creative work of keeping the data organized and groups, ScientiaMobile claims the copyright on the wurfl.xml file starting with version 2.2 and distributes it under certain conditions (notably, that the wurfl.xml file can only be used in connection with one of the standard APIs):

http://wurfl.sourceforge.net/licence.php

Acquiring a commercial license also delivers certain extra rights on the wurfl.xml file itself.

查看更多
登录 后发表回答