[csw-devel] SF.net SVN: opencsw:[398] catalog_signatures/catalog_gpg
Maciej Bliziński
maciej at opencsw.org
Fri Jul 22 00:27:28 CEST 2011
Em 21/07/2011 23:10, "Peter Bonivart" <bonivart at opencsw.org> escreveu:
>
> 2011/7/22 Maciej Bliziński <maciej at opencsw.org>:
> > 1. Keep the data in a simple text format so that it is easy to read the
> > right bit of data in shell
>
> +1
>
> > 2. Keep the data in json and provide a shell utility that prints the
> > requested piece of data to stdout.
>
> Too complicated for no particular benefit.
The main benefit is that you use a standard file format that gives you a
data structure, e.g. a dictionary of lists.
To use a simple text format, we need to design it well. For example, keeping
multiple dictionaries of lists in one file might be annoying to parse in
shell. On the other hand, you don't want to create one file per variable,
because this can kill performance (start up times). Having a command line
utility has the advantage that you can change the underlying mechanics
without changing the API. If you use text files, it is harder to change that
because you might have 15 different parsers already scattered throughout the
code (and the world), with different bugs and quirks.
Simple text files might still be better; I just wanted to point out that
there are concrete benefits of using a standard file format.
Maciej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/devel/attachments/20110721/299dabe6/attachment.html>
More information about the devel
mailing list