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

Inconsistant naming of members #7

Closed
marcoscaceres opened this issue Apr 22, 2013 · 14 comments
Closed

Inconsistant naming of members #7

marcoscaceres opened this issue Apr 22, 2013 · 14 comments
Assignees

Comments

@marcoscaceres
Copy link
Member

Why are some properties with underscore and some not?
relNotes vs required_features?

@AMorgaut
Copy link

JS APIs usually prefer camelCase syntax.
Few JS Conventions Examples:

W3C APIs only use underscore for constants.

JSON documents may vary as they can be provided by different languages with different conventions.
This manifest file looks very much to me as the CommonJS/Node.JS Package format.
The Node.JS one have some "multi-word" property names for which the camelCase notation has been choosen:

As this manifest file target web apps written in JavaScript, camelCase looks more natural.

@marcoscaceres
Copy link
Member Author

Thanks for doing this research. Very helpful!

@mounirlamouri
Copy link
Member

I think it would be great to have a note about that in the specification.

@marcoscaceres
Copy link
Member Author

@mounirlamouri I can add that, but is it ok to fix the manifest to use camelCase?

@hollobit
Copy link

@AMorgaut 👍 Good comment

@mounirlamouri
Copy link
Member

I'm fine with changing the manifest. However, you have to keep in mind that you might need to revert that later because Google [1] and Mozilla [2] both use underscores in their manifest format.

[1] http://developer.chrome.com/extensions/manifest.html
[2] the spec is based on that one...

@marcoscaceres
Copy link
Member Author

@mounirlamouri true that. I think at this point, we should just fix the relNotes -> rel_notes.

@marcoscaceres
Copy link
Member Author

So, I'm going to ignore Google compat because we are currently fairly incompatible with them anyway. I'm still not sure what's worst/best here:

  1. follow mozilla blindly (keep realNotes and other quirky things).
  2. break compat with Mozilla (change all "foo_bars" to "fooBar").
  3. break compat with Mozilla only a little (change just "relNotes" to "rel_notes")

Thoughts?

@mounirlamouri
Copy link
Member

If the specification changes everything from "foo_bar" to "fooBar", I can do my best to have Mozilla implementing those changes and updating the documentations. However, we might end up with compat issues. If we do it early enough, those compat' issues might be small enough. I do not know if it is worth trying though.

@marcoscaceres
Copy link
Member Author

The only solution I see is that Moz continues to support its own + the new W3C ones (and eventually mark the Moz one as deprecated in the docs). If the W3C changes the behavior of an existing Moz field, then the W3C should rename that field so not to cause compat issues for Moz.

@mounirlamouri
Copy link
Member

As I said, I will push our App team to update the manifest handling as soon as possible if you update the document and the mailing list agrees with the naming convention. From there, we will see how to make sure the spec is compatible with the Web.

@marcoscaceres
Copy link
Member Author

Can someone please review: #36 and give it an OK (or not) to merge.

@mounirlamouri
Copy link
Member

Just FTR, every time I see properties using the "foo_bar" format, my eyes bleed ;)

@AMorgaut
Copy link

I agree with Mounir the "underscore" notation irritates me each time I see it
I raised another issue mentioning it: #50

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