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)

defect

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.
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
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.
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
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.
> 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.
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
FWIW, currently extensions use <extension name>.pref or extensions.<name>.pref naming scheme.
OS: Windows NT → All
Hardware: PC → All
Assignee: dveditz → nobody
Status: ASSIGNED → NEW
Component: Mozilla Developer → Documentation Requests
Product: Documentation → Mozilla Developer Center
QA Contact: imajes → doc-request
Component: Documentation Requests → Documentation
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
Reopening for review by Sheppy.
Assignee: nobody → eshepherd
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
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.