移动设备浏览器文件与WURFL for ASP.NET

时间:2021-04-23 20:07:44

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.

我正在开发一个商业网络应用程序,该应用程序具有单独的移动浏览器版本,旨在用于功能更强大的设备(BlackBerry,iPhone,Android等)。我不想做简单的用户代理包含样式逻辑,并且正在查看各种检测库。似乎WURFL和移动设备浏览器文件是我的最佳选择。

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."

CodePlex上的移动设备浏览器文件(MDBF)项目通过Request.Browser属性公开信息。此外,它还具有Microsoft公共许可证(Ms-PL)。 ASP.NET中的移动浏览器检测提到“MDBF的数据来自WURFL”和混合:移动网站与ASP.NET MVC和移动浏览器定义文件确认MBDF“是从许多来源的数据库创建的,包括流行的WURFL移动设备功能数据库。“

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:

51degrees有一个.NET Mobile API,它使用WURFL数据文件并填充Request.Browser。它根据Mozilla Public License Version 1.1获得许可。并声称:

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

安装.NET Mobile API并提供移动设备数据的WURFL,与Microsoft提供的标准浏览器信息相比,这些调用将返回极其准确的数据

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

由于官方WURLF .NET API是使用GPL许可证分发的,因此它对我的项目来说是非首发。

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.

WURFL ASP.NET实现比较了WURFL的ASP.NET实现,但这已经超过一年了(2009-01-16 - 文章提交),并没有提到51degrees API或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 个解决方案

#1


5  

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."

引用:“由于开发和支持移动设备浏览器文件的团队的组织重组,我们将不再拥有支持和更新此CodePlex项目的资源。该团队将提供另外两个版本 - 一个在7月27日2010年和2010年8月24日的最终版本。“

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

所以我不仅仅是坏消息的承载者......

We are planning on using:

我们正计划使用:

by 51 Degrees

到51度

Which has a really good example of:

其中有一个非常好的例子:

Hope this helps.

希望这可以帮助。

#2


2  

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.

MDBF最近更新了。如果你需要的是基本信息,它可能会更好,因为它与你的.NET框架很好地集成。

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

Marg.Wurfl绝对是一个不错的选择,也可以与.NET框架集成。

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.

两者都有一种适用于旧.NET风格的方法,而不是MVC。在MVC中,你将不得不做自己的腿部工作。

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

您可能还需要考虑具有.NET API的DeviceAtlas,并且在.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.

特别是对你的问题,WURFL几乎每月更新一次,而AFAIK没有针对MDBF的计划更新,他们会在他们感觉到的时候发布更新(是的,不是很令人兴奋)。您可以使用Javascript来检测现代浏览器(如iPhone,Android和最近的Nokias)中的功能,但对于所有其他功能,User-Agent字符串仍然是唯一真正的选项,因此我认为这取决于您的目标市场。您可能希望创建适用于所有功能的超简单版本以及执行功能检测的高级版本。如果您计划拥有大量网站,我不喜欢在线服务的想法。一个月一次的更新是可以的,使用DeviceAtlas或Mobile Phone Wizards等商业产品,您可以获得更频繁的更新。

DISCLAIMER: I used to work for dotMobi that created DeviceAtlas

免责声明:我曾经为创建DeviceAtlas的dotMobi工作

#3


2  

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.

WURFL官方.NET API最近由ScientiaMobile发布 - 这是WURFL人民的新人。您可以在此处访问它:http://www.scientiamobile.com/site/page/view/downloads。但是,它受AGPL许可的约束,这基本上意味着您需要购买商业许可才能在商业应用程序(包括网站)中使用API​​。原始数据仍然免费。

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

显示如何将其与ASP.NET集成的白皮书是:http://wurfl.sourceforge.net/dotNet。

#4


1  

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.

我认为WURFL拥有更多功能和更活跃的社区,并且它比mdbf更快速地发布。但我不得不说微软正在做好工作。你也可以看看Marg.Wurfl。

And remember you can use GPL software in SaaS.

请记住,您可以在SaaS中使用GPL软件。

You can look Marg.Wurfl too,

你也可以看看Marg.Wurfl,

#5


1  

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).

正如Dino所提到的,WURFL API是在AGPL下发布的,但也可以根据商业许可条款获得(这称为双重许可,或者在FSF的说法中提供GPL例外)。

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):

但是,wurfl.xml文件不再被视为原始数据。由于保持数据组织和组的创造性工作,ScientiaMobile声称wurfl.xml文件的版权从2.2版开始并在某些条件下分发(特别是,wurfl.xml文件只能与一个文件一起使用)标准API):

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

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

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

获取商业许可证还可以在wurfl.xml文件本身上提供某些额外的权限。

#1


5  

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."

引用:“由于开发和支持移动设备浏览器文件的团队的组织重组,我们将不再拥有支持和更新此CodePlex项目的资源。该团队将提供另外两个版本 - 一个在7月27日2010年和2010年8月24日的最终版本。“

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

所以我不仅仅是坏消息的承载者......

We are planning on using:

我们正计划使用:

by 51 Degrees

到51度

Which has a really good example of:

其中有一个非常好的例子:

Hope this helps.

希望这可以帮助。

#2


2  

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.

MDBF最近更新了。如果你需要的是基本信息,它可能会更好,因为它与你的.NET框架很好地集成。

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

Marg.Wurfl绝对是一个不错的选择,也可以与.NET框架集成。

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.

两者都有一种适用于旧.NET风格的方法,而不是MVC。在MVC中,你将不得不做自己的腿部工作。

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

您可能还需要考虑具有.NET API的DeviceAtlas,并且在.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.

特别是对你的问题,WURFL几乎每月更新一次,而AFAIK没有针对MDBF的计划更新,他们会在他们感觉到的时候发布更新(是的,不是很令人兴奋)。您可以使用Javascript来检测现代浏览器(如iPhone,Android和最近的Nokias)中的功能,但对于所有其他功能,User-Agent字符串仍然是唯一真正的选项,因此我认为这取决于您的目标市场。您可能希望创建适用于所有功能的超简单版本以及执行功能检测的高级版本。如果您计划拥有大量网站,我不喜欢在线服务的想法。一个月一次的更新是可以的,使用DeviceAtlas或Mobile Phone Wizards等商业产品,您可以获得更频繁的更新。

DISCLAIMER: I used to work for dotMobi that created DeviceAtlas

免责声明:我曾经为创建DeviceAtlas的dotMobi工作

#3


2  

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.

WURFL官方.NET API最近由ScientiaMobile发布 - 这是WURFL人民的新人。您可以在此处访问它:http://www.scientiamobile.com/site/page/view/downloads。但是,它受AGPL许可的约束,这基本上意味着您需要购买商业许可才能在商业应用程序(包括网站)中使用API​​。原始数据仍然免费。

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

显示如何将其与ASP.NET集成的白皮书是:http://wurfl.sourceforge.net/dotNet。

#4


1  

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.

我认为WURFL拥有更多功能和更活跃的社区,并且它比mdbf更快速地发布。但我不得不说微软正在做好工作。你也可以看看Marg.Wurfl。

And remember you can use GPL software in SaaS.

请记住,您可以在SaaS中使用GPL软件。

You can look Marg.Wurfl too,

你也可以看看Marg.Wurfl,

#5


1  

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).

正如Dino所提到的,WURFL API是在AGPL下发布的,但也可以根据商业许可条款获得(这称为双重许可,或者在FSF的说法中提供GPL例外)。

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):

但是,wurfl.xml文件不再被视为原始数据。由于保持数据组织和组的创造性工作,ScientiaMobile声称wurfl.xml文件的版权从2.2版开始并在某些条件下分发(特别是,wurfl.xml文件只能与一个文件一起使用)标准API):

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

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

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

获取商业许可证还可以在wurfl.xml文件本身上提供某些额外的权限。