From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47bc849aad30d586 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-28 11:10:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.online.be!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: achrist@easystreet.com Newsgroups: comp.lang.ada Subject: Re: A standard package for config files is needed Date: Tue, 28 May 2002 11:10:00 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <3CF3C7F8.1C57BE12@easystreet.com> X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 References: <3CF3B160.DF10E94F@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:24873 Date: 2002-05-28T11:10:00-07:00 List-Id: Darren New wrote: > > Preben Randhol wrote: > > Of course one can use XML for something like this, but in most > > applications this would be an overkill. > > XML is generally overkill anywhere you don't have blocks of text (i.e., > CDATA) as part of your data structures. > > > We have been discussing a bit about Window registry versus .ini files, > > and have more or less agreed that the latter is the better. The reason > > is that .ini files are: > > > > * Platform independant (can use the exact same routines on Unix) > > * Easier to backup > > * Easier to have more than one version of > > Be aware that using the registry has some benefits also, including (for > example) roaming profiles, where you get "your" registry regardless of which > computer you log into, notification of changes by other processes, etc. > > Also, be aware that .ini files and the registry are in many senses > API-compatible. > > Hence, I'd suggest perhaps considering whether it could be designed in such > a way that only the "open" routine knows whether it's the registry or a > file. (Not that you need to implement both immediately.) > There is some chance for a big mess here, thanks to progress that MS has already made in this direction. There is support for ini files in the Windows api, and MS has at some time said that it might migrate the ini files into the registry without letting the application using the Windows API to access the ini parameters know. So, not even the program opening the ini files knows for sure. Reading and writing ini files as files already breaks MS's API. I've not hit a case where it breaks MS's actual implementation, but it might. The possible downsides of all this are stunning, but the upside is that because the registry is like a database, the programmer using the registry does not so much worry about what happens if multiple programs accessing and updating the same settings might be running simultaneously. Al