Why have a registry?
-
Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.
-
Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.
Darroll wrote: Everything I can store in the registry I can store in an ini file Noooooo! Not ini files! Use .config XML files! Or do you not do C#? Or even MC++ for that matter... Norm Almond: I seen some GUI's in my life but WTF is this mess ;-) Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough:) Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children:laugh: Leppie:My sister is 25:eek: -Norm on the MailMagic GUI
-
Darroll wrote: Everything I can store in the registry I can store in an ini file Noooooo! Not ini files! Use .config XML files! Or do you not do C#? Or even MC++ for that matter... Norm Almond: I seen some GUI's in my life but WTF is this mess ;-) Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough:) Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children:laugh: Leppie:My sister is 25:eek: -Norm on the MailMagic GUI
Didn't think of using XML, is there a tutorial on this? A guide? I think that this would be a good idea. Better than an ini. Darroll Not one person lives in the present. Only the past. I can prove it.
-
Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.
Well, there are several reasons i can think of, including Speed, Security, and Consistency. INI files, especially if they are accessed via the standard Windows API routines, are quite slow. This doesn't matter much for a few app settings read on startup, but there is a *lot* of data in the registry that Windows accesses very frequently. Registry keys can have access rights and permissions applied to them. INI files can be protected as a whole on WinNT and up, but that's the best that can be done. Having all app settings in one place, ideally under a consistent layout, makes it easier to manipulate/save/restore/delete them when necessary. That said, there's certainly nothing wrong with putting *your* app's settings in an INI file, or XML file, or CFG file, or whatever the hell you want, so long as you keep it in your own installation folder & don't clutter up the system folders. This, sadly, was another big problem with INI files back in the Win3.1 days, as it was often the only location an app could be sure of finding on startup.
Shog9 ------
And on the pedestal, these words appear: "My name is Ozymandias, King of Kings, Look on my Works, ye Mighty, and despair!" Nothing beside remains.
-
Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.
Because the registry is setup to allow for roaming users in network domains. Your INI and XML files won't do that automatically. It also provides a central configuration location. Which in theory should be easier to backup. The alternative is 100000000000 different bloated ini/xml files everywhere. Pick your hell... Tim Smith "Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution." Hoare - 1980 ACM Turing Award Lecture
-
Didn't think of using XML, is there a tutorial on this? A guide? I think that this would be a good idea. Better than an ini. Darroll Not one person lives in the present. Only the past. I can prove it.
I have one, http://www.ltpb.8m.com/tutorial/XMLOptions.html[^] -Steven
Visit Ltpb.8m.com
3D Image Library: Ltpb.8m.com/Image -
Because the registry is setup to allow for roaming users in network domains. Your INI and XML files won't do that automatically. It also provides a central configuration location. Which in theory should be easier to backup. The alternative is 100000000000 different bloated ini/xml files everywhere. Pick your hell... Tim Smith "Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution." Hoare - 1980 ACM Turing Award Lecture
Tim Smith wrote: Which in theory should be easier to backup. Exactly !! Regardz Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining. Said by Roger Wright about me.
-
Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.
COM. Can you imagine how slow the system would be if it looked up GUIDs in a non indexed ini file ? The registry is a tree structure, and therefore much faster than an ini file. ini files are evil. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
-
COM. Can you imagine how slow the system would be if it looked up GUIDs in a non indexed ini file ? The registry is a tree structure, and therefore much faster than an ini file. ini files are evil. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
Why are ini files slow? All you have to do is read in the file, find the key, then find the data in the value you need. CString str = GetFile(); // ok sloppy shorthand int index = str.Find("Value", str.Find("Key",0)); str.Mid(index + 5,str.Find("\n",index)); It is my understanding that String functions in memory are very fast. So Why are INI files evil? Darroll Not one person lives in the present. Only the past. I can prove it.
-
Why are ini files slow? All you have to do is read in the file, find the key, then find the data in the value you need. CString str = GetFile(); // ok sloppy shorthand int index = str.Find("Value", str.Find("Key",0)); str.Mid(index + 5,str.Find("\n",index)); It is my understanding that String functions in memory are very fast. So Why are INI files evil? Darroll Not one person lives in the present. Only the past. I can prove it.
Darroll wrote: It is my understanding that String functions in memory are very fast. So Why are INI files evil? Because your ini file does not live in memory, it lives on disk. Why do people like Oracle and Microsoft with SQL Server not store their databases as flat 'ini' type files ? Because if they did, you'd need to search the entire file to find a record. It's like a CArray or vector, you start at the top and work to the bottom. A CMap or map, on the other hand, is a sorted tree, and so you never have to search the entire file, each search halves the number of records you need to search. That's just one way of storing data more efficiently than a flat file. Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
-
Is there a reason for the bloated registry in windows? Why even have one? Everything I can store in the registry I can store in an ini file. The one reason I can think of is to let other programs know what directory your app is in. A single global list would suffice. Any thoughts? Darroll Not one person lives in the present. Only the past. I can prove it.
The registry was created to get away from .ini files and the pain they caused. Like most of MS's technologies they started out with a good idea, then created a half assed implementaion that allows bloat and doesn't provide an easy way to purge old keys, track changes, etc. One of the main uses of the registry is to hold COM GUIDs that the system needs to know about. All that being said, do use the registry for storing configuration info and personal settings. You are just asking for pain if you attempt to use .ini files or come up with a home brew solution.
-
I have one, http://www.ltpb.8m.com/tutorial/XMLOptions.html[^] -Steven
Visit Ltpb.8m.com
3D Image Library: Ltpb.8m.com/Image -
Didn't think of using XML, is there a tutorial on this? A guide? I think that this would be a good idea. Better than an ini. Darroll Not one person lives in the present. Only the past. I can prove it.
Try my article here: http://www.codeproject.com/useritems/XMLSettings.asp[^]
Jason Henderson
start page
articles
"If you are going through hell, keep going." - Sir Winston Churchill -
Why would an example for XML config files not use the XMLDOM parser? It might be overkill so I'll grant some lee-way. You have any thoughts on this? -- If it starts to make sense, you're in a cult.
I just prefer to use the code that I already wrote, an XMLEditor and a CMS. Also the function that is listed on the tuturial recieves the contents within the specified tag (which you should know the tag if you are using the XML file for the options.). I just haven't found a need for the XMLDOM, nor any information about it. -Steven
Visit Ltpb.8m.com
3D Image Library: Ltpb.8m.com/Image