Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we need platform sniffing if we have feature detection? #7

Open
seaneagan opened this issue Mar 6, 2015 · 5 comments
Open

Do we need platform sniffing if we have feature detection? #7

seaneagan opened this issue Mar 6, 2015 · 5 comments

Comments

@seaneagan
Copy link

AFAIK feature detection is generally preferable to platform sniffing ("user agent sniffing" in the web world). So why do we need the latter?

@seaneagan
Copy link
Author

For example, maybe chrome apps will get full access to dart:io in the future. Presumably chrome apps would be a separate platform. It would better to check dart.feature.io == 'true' than dart.platform == 'server'.

@seaneagan
Copy link
Author

@mezoni For reference, I'm referring to these chrome apps. They have access to for example a JavaScript file system API. One can write a dart API which proxies to that JavaScript API like chrome.dart. If they want to have a direct dart API instead, maybe they'll just embed a version of dart:io which fails at runtime for some things that it can't support, instead of exposing custom chrome app dart APIs. Could be a bad example, but was just trying to make the point that dart.feature.* and dart.platform may be duplicative, and that features may be preferred since a feature may be available on multiple platforms.

@zoechi
Copy link

zoechi commented Mar 7, 2015

I think for tools like the analyzer it would be much more difficult. A platform is just the whole set of features. Small differences (differences between Firefox, Safari, Chrome) wouldn't be considered anyway and woulnd't make much sense except dart2js switches to an output format like GWT does with a build output per browser version.

@BillDStrong
Copy link

@zoechi
Agreed, as a user, I would only want to care about being deployed to server, web or packaged app. Maybe packaged app would be split into mobile or desktop, if there is ever a story there.

@lrhn
Copy link
Owner

lrhn commented Mar 10, 2015

I'd sat no, we don't need platform selection if we have feature selection.
The platform selection was the initial request, so it's still in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants