Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why have a registry?

Why have a registry?

Scheduled Pinned Locked Moved The Lounge
windows-adminquestiondiscussion
14 Posts 10 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D DarrollWalsh

    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.

    T Offline
    T Offline
    Tim Smith
    wrote on last edited by
    #5

    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

    C 1 Reply Last reply
    0
    • D DarrollWalsh

      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.

      S Offline
      S Offline
      Steven Hicks n 1
      wrote on last edited by
      #6

      I have one, http://www.ltpb.8m.com/tutorial/XMLOptions.html[^] -Steven

      Visit Ltpb.8m.com
      3D Image Library: Ltpb.8m.com/Image

      T 1 Reply Last reply
      0
      • T Tim Smith

        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

        C Offline
        C Offline
        ColinDavies
        wrote on last edited by
        #7

        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.

        1 Reply Last reply
        0
        • D DarrollWalsh

          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.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #8

          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

          D 1 Reply Last reply
          0
          • C Christian Graus

            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

            D Offline
            D Offline
            DarrollWalsh
            wrote on last edited by
            #9

            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.

            C 1 Reply Last reply
            0
            • D DarrollWalsh

              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.

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #10

              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

              1 Reply Last reply
              0
              • D DarrollWalsh

                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.

                S Offline
                S Offline
                Stuart van Weele
                wrote on last edited by
                #11

                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.

                1 Reply Last reply
                0
                • S Steven Hicks n 1

                  I have one, http://www.ltpb.8m.com/tutorial/XMLOptions.html[^] -Steven

                  Visit Ltpb.8m.com
                  3D Image Library: Ltpb.8m.com/Image

                  T Offline
                  T Offline
                  Tom Welch
                  wrote on last edited by
                  #12

                  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.

                  S 1 Reply Last reply
                  0
                  • D DarrollWalsh

                    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.

                    J Offline
                    J Offline
                    Jason Henderson
                    wrote on last edited by
                    #13

                    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

                    1 Reply Last reply
                    0
                    • T Tom Welch

                      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.

                      S Offline
                      S Offline
                      Steven Hicks n 1
                      wrote on last edited by
                      #14

                      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

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups