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-30 00:41:33 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!cs.tu-berlin.de!not-for-mail From: Volkert Barr Newsgroups: comp.lang.ada Subject: Re: A standard package for config files is needed Date: Thu, 30 May 2002 09:41:32 +0200 Organization: TU Berlin, Fachbereich Informatik Message-ID: <3CF5D7AC.975B0DB3@cs.tu-berlin.de> References: <39ee2480.0205282322.3bbd4673@posting.google.com> <839J8.1076$r5.175696924@newssvr13.news.prodigy.com> NNTP-Posting-Host: bolero.cs.tu-berlin.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.cs.tu-berlin.de 1022744492 5771 130.149.19.1 (30 May 2002 07:41:32 GMT) X-Complaints-To: news@cs.tu-berlin.de NNTP-Posting-Date: 30 May 2002 07:41:32 GMT X-Mailer: Mozilla 4.79 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:24987 Date: 2002-05-30T07:41:32+00:00 List-Id: tmoran@acm.org wrote: > > >The Java Property class is simple and easy to use! The Properties > >can be stored as an ASCI File, which is a List of (Key,Value) pairs. > In the Windows Registry case, the data is never accessed directly, so it > doesn't matter if it's ASCII or whatever. If you are going to allow safe > concurrent access, the config file obviously can't be a simple ASCII file. > Instead there's a database manager frontend (nee regedit) to allow low > level mucking, and most changes are normally done via API calls under the > control of the relevant app itself. > Looking at Claw, I see, eg, > -- Typical usage might be: > -- Claw.Registry.Get( > -- Root_Key => Claw.Registry.HKEY_CURRENT_USER, > -- Subkey => "Software\MyCompany\ProgramName", > -- Value_Name => "User_Nickname", > -- Item => Saved_String, > -- Last => Last); > and appropriate variations for stream io, record io (a la Sequential_IO), > etc. Note also that Windows has the concept of branches of the > configuration tree for Users, Current_User, Local_Machine, Current_Config, > etc. That's useful and should be considered for inclusion. In my eyes, we would should seek for a simple useable solution first. 1) an application can handle (read/write) one or more config files! 2) a config file should store information in plain ASCII, so a user can easily modify them by hand! 3) the config file should be simple organized: - All entries sould be of the form "scope.key := value" - Ada-like comment blocks (parsing this is very easy, so no other toolkits are needed) If concurrent access is a need, we should take this into account! But i did not see it! In later versions more sophisticated features can be added, if we need them! What about this location (Java-like API) Ada.Utilities; Ada.Utilities.Configuration Ada.Utilities. ... Volkert -- - - - - - - - - - - - - - - - - - - - - - - - - - - - Volkert Barr Institut fuer Softwaretechnik und Theoretische Informatik Fachgruppe Softwaretechnik * TU Berlin email: barr@cs.tu-berlin.de web: www.cs.tu-berlin.de/~barr - - - - - - - - - - - - - - - - - - - - - - - - - - -