From: Ralph on
Tom Shelton wrote:
> On 2010-02-10, Ralph <nt_consulting64(a)yahoo.com> wrote:
>> David Kerber wrote:
>>> In article <e91cFEmqKHA.6064(a)TK2MSFTNGP02.phx.gbl>,
>>> alain.dekker(a)NO.SPAM.loma.com says...
>>>>
>>>> Thanks. I've started coding in VB.NET (1.1) and its actually very
>>>> different to VB6, which was an excellent language. Not a step
>>>> forward in my view. I know that MS have advanced XML and the
>>>> registry as the preferred serialisation technique(s) in .NET, but I
>>>> do note that INI files refuse to die and with good reason - they
>>>> are simple to use and easy to understand. In fact, I'm a little
>>>> puzzled why MS want us to use XML over INI files.
>>>
>>> IMO, the advantage of XML over plain .ini files is that you can use
>>> a more complex hierarchy if necessary. The one that I don't
>>> understand is why anybody would use the registry in preference to
>>> either one.
>>>
>>
>> Because the Registry can manage binary data and is much faster.
>>
>
> You can put binary in xml as well. It's quite simple actually - it's
> called base-64 :)

Never meant to suggest that an INI or XML couldn't contain binary data.
There are any number of text_to_binary and binary_to_text schemes, the
difference being XML has published formats and INIs don't. (MS employs
several different 'binary' formats.)

What I meant and should have said - "Because the Registry is binary AND
faster."

Those that work with both will also offer that since the Registry can only
be targeted with a limited set of tools, is central, and robust, it tends to
be more secure and more easily managed - but I won't go there as those
qualities are subjective in nature. ie, it always boils down to one's
comfort zone.

-ralph


From: Karl E. Peterson on
Ralph wrote:
> Tom Shelton wrote:
>> On 2010-02-10, Ralph <nt_consulting64(a)yahoo.com> wrote:
>>> David Kerber wrote:
>>>> In article <e91cFEmqKHA.6064(a)TK2MSFTNGP02.phx.gbl>,
>>>> alain.dekker(a)NO.SPAM.loma.com says...
>>>>>
>>>>> Thanks. I've started coding in VB.NET (1.1) and its actually very
>>>>> different to VB6, which was an excellent language. Not a step
>>>>> forward in my view. I know that MS have advanced XML and the
>>>>> registry as the preferred serialisation technique(s) in .NET, but I
>>>>> do note that INI files refuse to die and with good reason - they
>>>>> are simple to use and easy to understand. In fact, I'm a little
>>>>> puzzled why MS want us to use XML over INI files.
>>>>
>>>> IMO, the advantage of XML over plain .ini files is that you can use
>>>> a more complex hierarchy if necessary. The one that I don't
>>>> understand is why anybody would use the registry in preference to
>>>> either one.
>>>>
>>>
>>> Because the Registry can manage binary data and is much faster.
>>>
>>
>> You can put binary in xml as well. It's quite simple actually - it's
>> called base-64 :)
>
> Never meant to suggest that an INI or XML couldn't contain binary data.
> There are any number of text_to_binary and binary_to_text schemes, the
> difference being XML has published formats and INIs don't. (MS employs
> several different 'binary' formats.)
>
> What I meant and should have said - "Because the Registry is binary AND
> faster."
>
> Those that work with both will also offer that since the Registry can only
> be targeted with a limited set of tools, is central, and robust, it tends to
> be more secure and more easily managed - but I won't go there as those
> qualities are subjective in nature. ie, it always boils down to one's
> comfort zone.

Security's more granular, too. Not that I'd ever want to go there,
myself!

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Alain Dekker on
Thanks for all those replies.

I do appreciate the heirarchical nature of XML and that binary data can be
stored in the XML format. I also appreciate the benefits of using the fast,
centrally-managed registry. In my instance, and I'm guessing in a lot of
applications, the INI file is perfect for the job, though.

Thanks again,
Alain

"Ralph" <nt_consulting64(a)yahoo.com> wrote in message
news:OwbUyWqqKHA.4752(a)TK2MSFTNGP04.phx.gbl...
> Alain Dekker wrote:
>> Thanks. I've started coding in VB.NET (1.1) and its actually very
>> different to VB6, which was an excellent language. Not a step forward
>> in my view. I know that MS have advanced XML and the registry as the
>> preferred serialisation technique(s) in .NET, but I do note that INI
>> files refuse to die and with good reason - they are simple to use and
>> easy to understand. In fact, I'm a little puzzled why MS want us to
>> use XML over INI files.
>>
>
> Because as noted by Mr. Kerber XML allows for deeper hierarchies (more
> complex structures), and while still 'human readable' also allows for more
> datatypes, ie self-describing. Although don't get me wrong - XML is still
> 'text'.
>
> 'Text' configuration files have always had the advantage of simplicity and
> being able to be read and edited with a common editor - as long as you
> understood the structure - and that was always the problem - you had to
> know
> the format. Other O/Ss, such as Unix, also use text configuration files,
> but
> often with vastly different and unique formats. MS settled on the 'Dec'
> INI
> format and used it consistently for 'text' and the Registry for 'binary'.
>
> But quickly out-grew the INI limitations and migrated to pushing everyone
> use the Registery. But then that got out of hand so adopted XML for its
> 'common' text format, and is now suggesting everyone use it.
>
> MS has a history of mood swings. <g>
>
> -ralph
>
>
>


From: mayayana on
> I do appreciate the heirarchical nature of XML and
> that binary data can be
> stored in the XML format. I also appreciate the
> benefits of using the fast,
> centrally-managed registry. In my instance, and
> I'm guessing in a lot of
> applications, the INI file is perfect for the job, though.
>

That seems to be it in a nutshell. XML has
specific advantages. It's also currently high
fashion, being shoehorned into "everything
but the kitchen sink".

Manifests are a good example of
XML overuse: A very simple file that just needs
to contain a small string of data, it could easily
be an INI file. Yet Microsoft has turned manifests
into mysterious, ridiculous blobs of superfluous
XML, so complex that nobody can remember the
syntax.

In another current thread of this group people
are talking about special software to generate
manifest XML. :)



From: Tom Shelton on
On 2010-02-17, mayayana <mayayana(a)nospam.invalid> wrote:
>> I do appreciate the heirarchical nature of XML and
>> that binary data can be
>> stored in the XML format. I also appreciate the
>> benefits of using the fast,
>> centrally-managed registry. In my instance, and
>> I'm guessing in a lot of
>> applications, the INI file is perfect for the job, though.
>>
>
> That seems to be it in a nutshell. XML has
> specific advantages. It's also currently high
> fashion, being shoehorned into "everything
> but the kitchen sink".
>
> Manifests are a good example of
> XML overuse: A very simple file that just needs
> to contain a small string of data, it could easily
> be an INI file. Yet Microsoft has turned manifests
> into mysterious, ridiculous blobs of superfluous
> XML, so complex that nobody can remember the
> syntax.
>
> In another current thread of this group people
> are talking about special software to generate
> manifest XML. :)

XML - while human readable is not necissarily meant to be human readable. I
use it because it's portable, parsers are common and generally easy to use.
In .NET it's a no brainer:

string mySetting = ConfigurationManager.AppSettings("MySetting");

Plus, it's pretty straight forward to extend the syntax of the app.config for
your own custom xml.

But even before I moved to .NET I was migrating towards xml configuration
files - simply because they are more flexible.

--
Tom Shelton