Post

 Resources 

Console


XML/INI Article at Atomic Monks - Brother Erryn (11 replies, 29 views) (2004-Jul-7)
-
I've put up a new article on XML files for application settings in VB.NET as an alternative to the INI files commonly used in VB6. The article offers a complete class wrapped up with GetSetting and SaveSetting methods, using the xmlDocument object.


-
Back to News

An interesting way of getting around the problem, but I wonder how it compares speed-wise to an ini file. Long program load times are a personal pet peeve for me :) .
  Close
Re: XML/INI Article at Atomic Monks - rene (0 replies) (2004-Jul-7)
well I guess that unless you have like a milion settings you want to save/load then it shouldn't be such a problem.. it's only a little text file after all..
  Close
Re: XML/INI Article at Atomic Monks - Brother Erryn (0 replies) (2004-Jul-7)
As Rene said...it's a non-issue unless you've got a LOT of data in your INI files. Since it loads the data in memory just once, it should be pretty snappy. I haven't tested performance, but calls for that data won't be made from within a render loop in anything I make with it. I would think the performance would be better just because it's going the managed code way, instead of via COM.
  Close
Re: XML/INI Article at Atomic Monks -  Dan (0 replies) (2004-Jul-8)
If your using .NET then you can also use .ADO Which allows you to open xml files as disconnected databases allowing the use of SQL to fool around with the data. Flippin Marvelous.
  Close
Re: XML/INI Article at Atomic Monks - Brother Erryn (0 replies) (2004-Jul-8)
I looked at ADO.NET for this too, but decided it was SERIOUSLY overkill for what I needed. Definitely a plus about the .NET platform...all the data methods are available, and you don't have to worry about which version of MDAC they have installed, etc.
  Close
Yeah, it's probably a non-issue. I was mostly thinking of things like Word, Word Perfect, Opera, Paint Programs, etc.
  Close
XML is great for hierarchal information, but INI files are orangized as a Dictionary. [Section]Key=Value. I'm a bit uncertain why you would want to convert a Dictionary to an XML heirarchy. I do see the power of XML for other applications, but as an INI file replacement, it seems like it's a bit overkill.
  Close
Re: XML/INI Article at Atomic Monks - Brother Erryn (0 replies) (2004-Jul-9)
It probably IS a bit of overkill. Like the article said, though, it seemed the "true" .NET way to do an INI file. On the other hand, it does keep your .NET app out of COM...that's at least one performance bump avoided. :)
  Close
Re: XML/INI Article at Atomic Monks -  VBBR (0 replies) (2004-Jul-9)
But you don't use COM to use INI files... You use the Win API. ...or am I wrong?
  Close
Does .NET have dictionary or collection objects? OO is nice, but for data storage and retrieval, hashing and sorting is really the best way for data storage and retrieval.
  Close
Re: XML/INI Article at Atomic Monks - Brother Erryn (0 replies) (2004-Jul-9)
My understanding is that when you use the API calls in .NET, you do so through COM. There IS a dictionary object that you can get to in a roundabout way. It looked VERY cludgy to use for an INI file, and was certainly a lot more work.
  Close

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 16 visitors within the last 20 minutes
RSS News Feed