Closed
Bug 58816
Opened 25 years ago
Closed 13 years ago
No convention for creation of 3rd party prefs
Categories
(Developer Documentation Graveyard :: General, defect, P3)
Developer Documentation Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: drbrain-bugzilla, Assigned: sheppy)
Details
A documented convention needs to be established for the creation of third party
prefs. Currently according to dveditz (IRC) there is no convention for these
prefs. I don't wish to pollute the prefs namespace by arbitrarily defining my
own pref that may in the future be overwritten by a different mozilla developer.
I plan to the following scheme for prefs for my mozilla projects:
pref("3rdparty.segment7_net.drbrain.project.projectpref", "prefdata");
"3rdpary" is be the root of the prefs hierarchy for non-Mozilla projects.
"segment7_net" is be the domain of the email address of the developer with the
period ('.') characters changed to underscore ('_') characters. Unfortunately
this does not prevent confusion among domains that contain an underscore in the
name.
"drbrain" is the email address of the developer on the list domain. Underscore
characters would replace all period characters in the email address. Again this
does not prevent confusion among email addresses that contain an underscore in
the name.
"project" would be the name of the project as defined in the
manifest.rdf/contents.rdf file. All whitespace must be removed from the name.
"projectpref" is the pref for the project. There could be a hierarchy of
"projectpref" values. This would mirror browser.*, history.* ...
"prefdata" would be data for the pref.
Comment 1•25 years ago
|
||
drbrain offereed to write up documentation for his proposal. The proposal
needs to be reviewed and approved first though. Assigning to Dan since
this is his area and cc'ing others who may be interested.
Assignee: endico → dveditz
QA Contact: nobody → endico
| Reporter | ||
Comment 2•25 years ago
|
||
After thinking about the problem of using _ in the prefs I decided that it would
probably be better form to use either the URL scheme of %20, etc to represent
spaces and other strings than using _, or using HTML/XML escape sequences of
&#<character code>; This would remove the problem of ambiguity between the
actual undescore character and the underscore being used to represent a space.
Updated•24 years ago
|
Status: NEW → ASSIGNED
accepting QA for mozilla developer docs.
some of these bugs have been around for a _long_ time. Reporters, would you
please review the bugs, see if the issues have been resolved, and close bugs
appropriately.
I will do a full review of all bugs not touched in one week (8th April).
Thanks.
</spam>
QA Contact: endico → imajes
Comment 4•23 years ago
|
||
I just did a draft on preference design spec (bug 158384 attachment 121908 [details]). Please
review and comment
btw, '3rdpary' cannot work because it begins w/ a number.
Comment 5•23 years ago
|
||
> pref("3rdparty.segment7_net.drbrain.project.projectpref", "prefdata");
Isn't that overengineered? How about 3rdparty.net.segment7. ... and the stuff
below that is up to the owner of the domain? That's almost like Java's name
spaces work.
Comment 6•23 years ago
|
||
The reason Java has a mechanism similar to this is that there's no way for all
the Java developers in the world to coordinate to minimise namespace clashes.
That really isn't true for Mozilla - a central pref name registry is a sensible
project, and could be the input into the various pref editors that are out there.
If you are creating a new pref to do with http, it's much more sensible to have
it under networking.http than 3rdparty.net.gerv.gerv.http. A registry (or just
ignoring the problem, as we have been doing, which hasn't caused any clashes I
know of) would achieve that.
Gerv
Comment 7•19 years ago
|
||
FWIW, currently extensions use <extension name>.pref or extensions.<name>.pref naming scheme.
OS: Windows NT → All
Hardware: PC → All
Updated•19 years ago
|
Assignee: dveditz → nobody
Status: ASSIGNED → NEW
Component: Mozilla Developer → Documentation Requests
Product: Documentation → Mozilla Developer Center
QA Contact: imajes → doc-request
Updated•13 years ago
|
Component: Documentation Requests → Documentation
Comment 8•13 years ago
|
||
Automatically closing all bugs that have not been updated in a while. Please reopen if this is still important to you and has not yet been corrected.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 9•13 years ago
|
||
Reopening for review by Sheppy.
Assignee: nobody → eshepherd
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 10•13 years ago
|
||
This has been documented for some time:
https://developer.mozilla.org/en-US/docs/XUL/School_tutorial/Handling_Preferences#Adding_preferences_to_an_extension
https://developer.mozilla.org/en-US/docs/Adding_preferences_to_an_extension#Establish_the_defaults
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
You need to log in
before you can comment on or make changes to this bug.
Description
•