pieroxy / java-user-agent-detection

Some code to deduce an OS/Platform/Browser out of a user-agent string
53 stars 12 forks source link

The brand can apply to Browsers, Devices or OSes #15

Closed mrDoctorWho closed 7 years ago

mrDoctorWho commented 7 years ago

I think, there should be a separate class for each of the above. So it will be easier to add new or edit items.

What do you think, @pieroxy?

pieroxy commented 7 years ago

I don't see the point of having separate enums: BrowserBrand, DeviceBrand, etc... Google makes Android, ChromeOs and Chrome. It is the same Google.

In my view it would amount to duplicate information.

What is complex about adding or editing an item in the enum ?

pieroxy commented 7 years ago

(FYI, I'm going to make a release this week. I'll try to incorporate as many changes as I can.)

mrDoctorWho commented 7 years ago

What is complex about adding or editing an item in the enum ?

That's probably not the only reason.

What if one day Chrome changes it's name? Anyway, I think it's a good idea to have different things in different classes.

pieroxy commented 7 years ago

If Chrome change it's name it'll be handled just like Edge which is the new name of IE. The brand will still be microsoft, which is the same brand as Windows, because it's the same company.

Anyway, I think it's a good idea to have different things in different classes.

Microsoft is one company producing browsers and operating systems. It's one thing. Why should we have it in different enums ?

pieroxy commented 7 years ago

Any comments about my last remark ?

If not I'll just close this item.

mrDoctorWho commented 7 years ago

I see your point. And I think it might be right.

Closing this.