ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Why the Windows Registry Exists

<< < (3/4) > >>

tinjaw:
There are some many things in life that I just look at and think I must just not be smart enough to understand. But I know that it is just a matter of educating myself and eventually I would understand it. For example, higher level math or physics. However, there are other times when people widely regarded as some of the best minds in a field do something and I just know, without understanding all the high-level intricacies, that it just isn't right. The Windows Registry falls into the latter category. I know there are a lot of very smart people working at Microsoft. A few of them are close friends I made while working other places like Borland. But no line of reasoning or explanation has ever even made me doubt for even a fleeting moment that opening the registry to anything other than the operating system itself was a smart decision.

When the Windows Registry was first explained to me I could only see it in terms of a flat file being moved to a database behind an API. I saw no benefit of doing so. And what's worse is that the core problem, allowing write access to the OS-level configuration details, was still there.

Now, I am not experienced enough to know the details of how to actually implement what I am about to attempt to explain , but the general concept seems solid. The operating system should not allow other programs to make such changes as it currently does. External applications should only be able to request info from the OS and *request* to make changes. It should be up the OS to allow such changes, and it should be part of the contract that the OS, at any time, can reverse itself and deny the request. Along with this, external applications/developers should work on the assumption that such requests will be denied. This, I believe, although I do not know, is more along the lines of how consoles operate.

I think the whole crux of the issue is that Windows is *not* just an operating system (ie a kernel and basic services) but is basically a whole suite of middleware on top of and operating system. As such, it needs to do much much more, and thereby causes the need for all of the stuff that cause problems. But I understand that almost all of what makes a general purpose computer more useful than a narrow use console is the ability for the applications to run at the same time and interact. But the true solution to that is difficult to orchestrate, namely, programmers, many many programmers, all producing and API interface to their own programs that is five nines perfect in terms of doing what it claims to do in the manner it claims to do it *and* five nines perfect backward compatibility. Something that is possible but not probable.

In summary, once again, the solution is to cater to the least common denominator, namely the hundred of thousand, if not the millions of bad programmers that work on the system. And that is what Windows, and all its constituent parts is, the least common denominator that will survive the ungodly amounts of crap software that will be installed on it.

Ralf Maximus:
And that is what Windows, and all its constituent parts is, the least common denominator that will survive the ungodly amounts of crap software that will be installed on it.

--- End quote ---

Well said, tin!  However flawed, the registry has survived and functioned for 15+ years so the original designers did something right.  Of course, that's like pointing to a 1962 Volvo and saying the same thing -- it may be a crap car but by god it's still running.

And then Gothic sez:

I haven't seen an app that writes ini files into the windows directory in years

--- End quote ---

Very true.  But consider the perspective of the article: Raymond is writing about decisions made in the early 1990's, and indeed, if an app availed itself of the Windows API then the only place an .INI could go was the Windows (or WinNT) folder.

He's not defending or exhalting the registry, simply explaining how it came to be and some of the problems being faced; why the registry was created.  Taken in that context every one of his points is valid.

Central administration of INI files is difficult. Since they can be anywhere in the system, a network administrator can't write a script that asks, "Is everybody using the latest version of Firefox?" They also can't deploy scripts that say "Set everybody's Firefox settings to XYZ and deny write access so they can't change them."

--- End quote ---
You can do that with the registry?

--- End quote ---

Indeed you can.  Permissions willing, Windows allows remote administration of another PC's registry.  RegEdit provides an interface, if you want to play.  And querying the registry for a known key that points to a local file is *way* easier than scanning a remote file system.

Oh, I still hate the registry.  Hate, hate, hate.

But when I sit down to consider what we'd replace it with, I draw a blank.  A collection of .XML files?  How would that be better, aside from being able to edit them with notepad or index them with Desktop Search?  And you'd still have a Windows service to administer them, and yet another dozen API calls to master, so is that an improvement?

And again: how does Linux or OS X manage configuration settings?  Leave it up to each program?

Gothi[c]:
And again: how does Linux or OS X manage configuration settings?  Leave it up to each program?

--- End quote ---

On GNU/Linux, system-wide configuration files are in /etc
Applications will typically put their configuration in ~/.appname/config or ~/.appname
Works for me.

But when I sit down to consider what we'd replace it with, I draw a blank.  A collection of .XML files?  How would that be better, aside from being able to edit them with notepad or index them with Desktop Search?

--- End quote ---

It would be more portable, for one. And having windows crash to hell, requiring a reinstall, wouldn't mean loosing all your settings, for two...

tinjaw:
And again: how does Linux or OS X manage configuration settings?  Leave it up to each program?
-Ralf Maximus (November 26, 2007, 02:25 PM)
--- End quote ---

As I did the first time you asked, I assume this is a facetious rhetorical question. But for the benefit of those who don't know the answer... Yes. *nix systems work with text configuration files. Each app has its own (if the app needs such capabilities).

tinjaw:
I must restate that the whole ini vs registry vs xml vs whatever is a red herring. The *real* problem is that the software running on current day computers are not designed/implemented in the manner they *should* be. Namely, (very) loosely coupled individual components that request, but do not require, other pieces of software - the OS just being another piece of software.

The problem is the interoperability, stupid.

But, such a system is economically viable. It results in bloated redundant software that each become victims of LCD themselves.

There is an example of the other extreme. It is called Apple. Pre-Unix-Apple, but Apple none the less.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version