Re: [GD-General] A portable preferences library
Brought to you by:
vexxed72
From: Brian H. <ho...@py...> - 2003-12-04 21:48:44
|
> [a] One can have many independent instances of the application on a > single machine, each with different preferences; That's great, except in many cases most users don't like/want/know about that. > [b] The user can edit preferences if the application malfunctions, > which is impossible in a scheme where the application itself is the > only entity that can manipulate the preferences file; That's quite true. Except now you've committed to a plain text file, which might be bad if you have to store binary information for whatever reason (yeah, you could convert to 7-bit ASCII...bleh). > [c] Users can send or receive preferences files, or disucss > specific named settings, via e-mail or web pages; Yes. Although technically you can do that with a Windows registry... > [d] Settings in the preferences file can correspond to an > application's scripting system -- so that the preferences file is > nothing more than a batch of scripting commands that can otherwise > be entered at run-time in the application itself (as in a console > window for a video game); Yep. > [e] Settings persist after clean install of operating system; Yep. > [f] Application and settings can be stored on a CD-ROM or portable > disk or flash-memory device, and one can take it to someone else's > computer and operate the application without doing an > "installation" or polluting their computer with any files > whatsoever; (I bring my prototype applications to a friend's house > for demonstration on my keychain USB memory device, and execute > directly from the keychain!) Yep. > Maybe I'm hard-core, but I think everything an application needs to > operate, short of the absolutely guaranteed resources of the > operating system, should be packaged with the application -- and > totally portable. Unix used to be like that, and most applications on DOS used to be like that -- the good old days. In fact, most Unix applications were just an executable and didn't even have external crap associated with them. Today, even the most trivial Windows application seems to require numerous INI and DLL files. I'm in violent agreement with you. I don't like the Windows registry, it seriously pisses me off in fact, however it is kind of a de facto standard for preference storage and does have a couple (albeit minor) benefits. IT types like it simply because users don't know enough to get in and muck it up. Also, I believe you can do remote registry queries under NT. Standardized locations for everything is a nice thing, but whether it's worth the gigantic problem that the registry presents is questionable. That said, I prefer files, and will support files-as-preferences on Windows, but supporting the registry will probably be a requirement no matter what. On OS X, it's kind of the best of both worlds -- your preferences ARE files, and they're XML as well so they can be edited directly. > or somehow the application disappears from the computer without un- > install ever happening, leaving tons of scattered junk behind. That's my biggest pet peeve -- I shouldn't HAVE to uninstall, I should just be able to delete a directory and have it go away. Such a simple thing, but yet Windows still doesn't get it. I'm also aghast at the sheer # of files that most applications and games require for installation into /windows/system32 and /windows, including game specific DLLs. I have NO idea why developers insist on putting game specific DLLs in global locations. > Okay, I sympathize with the idea that putting everything in one > place somehow seems more organized. I dislike the idea of things > being scattered around. But I think it's perfectly good to put > things in self-contained bundles that do not rely on any > centralized thing or on scattered things. It's very clean. You must love OS X Application Bundles then? I happen to think they're one of the coolest aspects of OS X. > Okay, some of these ideas are radical, but I just wanted to share > my own thoughts about preferences files. Not THAT radical. Just in the Windows world =3D) Brian |