On May 27, 2009, at 5:37 PM, Fabien Chéreau wrote:

       This does go back to the whole plugin topic though; there are many,
many applications out there that allow user-written plugins, that all
provide a UI interface for preferences.  They need not be overly
complex; a simple key-value editor can be automatically generated at
run time.

OK, now I think I get your point. You want to avoid the plugin
designer to mess around with config files, and let them use a simple
higher level API to manage the config options instead. This should
allow to create a generical option editor.

We could imagine to merge back Stellarium and plugins option in a
single repository/database/file, but using a design allowing to define
for each parameters:
- whether it should appear in the option editor
- a human readable description
- a formating check, e.g. a regex

Additionally, the options needs to be structured so that we can for
example have a "plugins" group containing the options sets for each
plugins, each set in his own subgroup. Actually a JSON file would do
it pretty nicely.

      "loadAtStartup": true,
      "maxExitCircle": {"value": 5.7, "description": "The largest
exit circle for all of the oculars.", "editable": true}
      "oculars":   [{"name": "My eye piece1", "focalLength": 15},
{"name": "My eye piece2", "focalLength": 55}],

It would be even maybe more clever to use a proper JSON schema for
each attribute as described there: http://json-schema.org/


That would be very nice indeed!  A concern I have is that I'd really like to add more plugins.  I do not necessarily find them better then as part of the core code, but some dev teams prefer them. It's definitely better than forking the code!  And I just don't want to go off and write my own app, as too many ill conceived open source projects start that way.  So the plugins do provide a nice metaphore.

But neither do we want each developer to go off and either re-invent the wheel, or come up with some off-the-wall way of doing things.  That's why I feel the preferences should be UI based.  How they are stored isn't overly interesting.

Getting even further off-topic from your original post, I think some core code clean-up, with better documentation, would help a lot of potential contributors feel more comfortable with writing more complex plugins.  I still can't figure out how to draw a line north-south on the screen. :(  But at least the Stellarium development community is open to all suggestions.  Some projects, they'd shoot ya! :)