Comments on: On Config Files http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Matt` http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4425 Fri, 18 May 2007 19:02:57 +0000 http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4425

I didn’t have an opinion until about 10 seconds ago, but when its as simple as a series of “key = value”s then the extra fluff around the edges seems pretty pointless.

Reply  |  Quote
]]>
By: Luke http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4424 Fri, 18 May 2007 18:03:17 +0000 http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4424

When I use java I usually just use simple flat files. Then all I need to do is initialize an input stream to the file and pass it to the Properties class. It will do the rest and store all the values internally as a hashmap. :)

Of course all the values are considered generic objects so you will need to do some casting. I guess I can see how XML would be useful here – ie. you specify the data type of the key and etc.

Reply  |  Quote
]]>
By: Wikke http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4423 Fri, 18 May 2007 08:28:08 +0000 http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4423

I only use XML files for configuration.
I develop web apps in Flex and reading an xml file is just as easy as typing the URL to the file :)
It then is available as an Object with all the data parsed into appropriate data types.
Since Flex 2 is strong-typed, this is a major advantage.

Reply  |  Quote
]]>
By: Luke http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4422 Fri, 18 May 2007 01:22:16 +0000 http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4422

I’m not disagreeing – XML can be very good for storing some types of configuration files. For example, the application list for InstallPad is a good example when XML as config file works well. This sort of data lends itself to be structured as a tree, and storing it as a flat file would be inappropriate.

But then again I see people using XML files to store stuff such as username, password, server address, and resolution settings for single application. Stuff like that could be stored as 4 lines of text, but instead we have 14 lines of XML.

I’m not against using XML – I’m just against using it where a simple file would do just as well. For example when you develop a new application and you are deciding how to structure your data file, XML may not always be the best choice.

But if your current platform, IDE or application suite natively supports XML config, then using anything else would probably be silly.

:)

Reply  |  Quote
]]>
By: Craig Betts http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4421 Thu, 17 May 2007 23:57:55 +0000 http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4421

Yeah, but how much “power” do you actually get from using an XML structure for what is essentially an unstructured 1-to-1 pairing of keys and values?

Well, XML is more than that. It give you the ability to store data in a tree instead of a flat namespace. Sure, there are ways to represent that kind of data in a flat file, like an LDIF file, but XML does what it was intended to do.

I guess this is turning into a “vi vs emacs” type of battle . . .

Reply  |  Quote
]]>
By: Luke http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4420 Thu, 17 May 2007 23:47:29 +0000 http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4420

Yeah, but how much “power” do you actually get from using an XML structure for what is essentially an unstructured 1-to-1 pairing of keys and values? With LDAP there are some tangible benefits you can point to.

With XML config files – not so much. I find that often XML is used where a simple text config would be more appropriate, because… Well, because XML is cool. :P

Reply  |  Quote
]]>
By: Craig Betts http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4419 Thu, 17 May 2007 22:18:14 +0000 http://www.terminally-incoherent.com/blog/2007/05/17/on-config-files/#comment-4419

Being a Solaris junkie, I have become accustomed to XML config files. Yeah, I like the older style when hand-editing, but XML parsers are efficient and easy to use.

I rank this right up with NIS vs LDAP. Sure, NIS was easier when editing by hand, but LDAP is so much more powerful and easier to use once it is deployed.

Reply  |  Quote
]]>