Open WanWizard opened 11 years ago
Repository fuelphp/agent created.
Will there be also some GeoIP support. For example to locate the country by IP? Or is this the wrong place to add such a function?
Not sure, functionality should be kept simple and straightforward. Also, agent is slow enough on its own.
There are some discussions on the v1 issue tracker to replace Agent with a third party package too.
In general, we as developers of an entire framework should never try to be better than someone who only has one specific package as focus. As long as it does the job, or it can be easily wrapped into something that does the job.
We may suggest something, or include it if the core code needs it. And we may provide an API for it through the Legacy package (when it comes to Agent for example).
My plan is to create adapters for multiple agent libraries. @kenjis provided us a great benchmark. Should we drop this package? (Isn't it needed for the session, UA based matching?)
I don't think a few adapters justify a separate package. Better put it into Foundation then.
Session uses the raw UA from the Input class, it doesn't need to lookup anything, it just matches (or not).
Then I suggest deprecating the agent package if we don't need it. Everyone can use which mostly fits to his/her needs.
If you mean this (the v2) package: yes, good idea.
Yeah, I mean it.
I think it would be nice to have one seperated agent package with multiple adapters. So if the developer dont know any existing package he dont have to search. FuelPHP will recommend some existing one and if the developer dont like, he can still use his package he wants.
CodeIgniter got his own Class which will only detect some basic informations. Thats also a nice feature to speed up site.
https://github.com/bcit-ci/CodeIgniter/blob/develop/application/config/user_agents.php https://github.com/bcit-ci/CodeIgniter/blob/21898a45f323bb74ef6e5ee8cf21c3397467665b/system/libraries/User_agent.php
I don't think we should have one if we don't need one. UA parsing is messy enough not to care about it.
The functionality of the existing class can be converted as-is to non-static methods.
If probably need to be less dependent on the existence of the browscap file, since the availability seems not to be guaranteed these days.