I agree with all your thoughts on the component. The part with returning device capabilities was more like an eventual goal as you say though. A good start would be to simply classify devices into some predefined categories. The name Zend_Device is also more fitting I guess.

Thanks for the comment. I'll update the proposal with these ideas.

Matthew Ratzloff wrote:
Christer,

I'm actually in the process of finishing up just such a component for my
job.  (Can't share it, unfortunately--it contains some proprietary
knowledge.)

Some thoughts:

- Call it Zend_Device.
- Identifying specific mobile devices is more important than identifying
specific standard browsers.
- Rely on multiple data sources, not just one.
- Return device capabilities in addition to identifying the device (maybe
you'd want this to be an eventual goal, but plan for it).
- If you're returning device capabilities, you'll want some form of local
caching/storage.  Figure that into the proposal.
- Integrate it into the ContextSwitch view helper.

Good luck!

-Matt

On Wed, January 30, 2008 11:26 am, Christer Edvartsen wrote:
I have created a page in the wiki that will hold the proposal for a
Zend_UserAgent component. The proposal does not hold that much
information yet, but I will add some more as soon as I get some feedback
from you guys. It's located at
http://framework.zend.com/wiki/display/ZFPROP/Zend_UserAgent+-+Christer+Edvartsen

The component is supposed to be used to classify user agents into some
predefined categories. I suggest the following categories:

* Browser
* RSS Reader
* Mobile Device
* Robot

A Zend_Controller_Action helper could also be made by using this
component but I guess something like this could live outside of a
typical MVC application so I suggest it as a separate component.

There are several user agent databases out there, and the one I was
thinking about using is http://www.user-agents.org/ which has an
extensive list of user agent strings. One problem is that the database
does not have the "Mobile device" category. The list is huge though
(2500+ user agents) and I don't think it would be necessary to use
_every_ user agent string in that database.

Does anyone have any ideas of how to decide of what list we could use
for something like this? The component will be made in such a manner
that developers can add their own list/database if they think the one we
provide is not sufficient.

The component could also be extended to fetch some more detalied
information about mobile devices using WURFL
(http://wurfl.sourceforge.net/).

Any comments?


--
Christer Edvartsen
[EMAIL PROTECTED]
http://cogo.wordpress.com/





--
Christer Edvartsen
[EMAIL PROTECTED]
http://cogo.wordpress.com/

Reply via email to