From: John J. <jj...@as...> - 2005-09-18 20:31:36
|
Sam Hathaway wrote: > Ah, GUI editing of text-based config files... This is never pretty, > and it's even worse for us since our config files are perl source, > which is damn near impossible to parse (unless you're /usr/bin/perl). Emacs has run into this. It had a long history of the site and user customizations being executable, and then added a gui component to it. > The only sane way I can think of is to rewrite the file completely > every time it is edited. However, this destroys ... An improvement on > this is to define a special section in the course.conf file that > would be written programatically in response to the user's choices in > the GUI. The text before and after that section would also be > editable, but as two undifferentiated chunks in textareas. The emacs solution is to write to (or rewrite) the end the user's initialization file. This is pretty similar to your improved version. I don't see much to be gained by having users enter code after the web-based entries, so it can similarly change just the end of the file. As you said, most people will use the web, or direct editting, with few mixing and matching. We might also want to supress the textarea of code, or hide it a little (e.g., under an advanced button). > I suspect the long-term solution is to abandon the human-editable > perl-based configuration file in favor of storing configuration in > the webwork database > ... > I see a lot of value in a file- based, perl-based configuration > system, and I'm not sure we should throw it away for this one reason. > On the other hand, it would be really nice to give non-technical > users control over the settings that they're probably going to want > to change. It seems that having a web-based module writing course.conf, but only rewriting part of it lets us keep all the benefits of the current configuration system, and give people the ability to do more with the system. John |