Microsoft to End DLL Confusion
MankyD writes "ZDNet is reporting that Microsoft is attempting to do away with DLL version conflicts in its next version of Windows with a technology it calls 'Strong Binding'. When new programs attempt to overwrite old versions of DLL's, the Strong Binding will index the DLL's and allow the programs to reference them by a unique ID, rather than by file name. Hopefully it will prevent a new program from breaking an old one. I would think this might add to DLL clutter however."
Sounds like a great idea. While there will be more DLLs in the registry, at least each and every program will have it's "own" DLL and can't be broken. Although I wonder if the software will default to the newest DLL and then go back if it doesn't function correctly.
Slashdot: Playing Favorites Since 1997
I never really understood the advantages of a DLL over a static lib in modern times.
In the old days, when diskspace & memory were precious goods, they made sense to share code. But today, what's the burden of 4MB extra app size compared to the DLL misery ?
Except for plugins, I see no reason why developers would need DLLs. Can anyone shed some light here ?
When will I end this grieving ? When will my future begin ?
I always find it interesting that Microsoft gets to announce and shake up the world with "a new feature" that they caused and of which at least one other major OS had long since solved. Versioning the library API? "Who would've thunk it?!?"
In other news, Microsoft invents a journaling file system to prevent data loss.. oh, wait..
Bel, the mostly sane.. "Of course I can't see anything! I'm standing on the shoulders of idiots." -- Me
I wonder how they deal with upgrades to DLLs where the the upgrade represents a security fix. In such circumstances one would definetly not want an application to use an old version of a particular DLL...
I could see some possible security problems with this. When a DLL needs to be patched for a security issue it will only fix programs witht the correct version of the DLL. and the old version of the DLL wont be fixed. This is bassicly defeting the porpose of DLLs in the fact most applications will be using simular but slitght different versions of the DLL. At this point why not just compile everything staticly with DLL that way it is no longer an issue. As well as quicker and easer to install and uninstall.
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
Microsoft re-invents static linking.
Christ, if you are going to do this, why not create a recompiler that bundles the executable and all of its referenced DLLs into one EXE and be done with it.
As a nice side effect it'd make it a hell of a lot easier to move programs around your disk and between machines... Oh, ok, now I get it.
-josh
This is a capability of the .NET framework. It has nothing to do with the next version of Windows.
.NET assemblies. .NET assemblies are the equivalent of DLLs for the .NET system, but this won't solve the problem of "DLL hell" unless all applications are re-written in .NET.
.NET, but this article is just the Microsoft PR/marketing machine, and is nothing new technically.
It isn't really DLLs either, but rather
This is a great feature of
This book contains all you need to know about working on Win32, including a pretty comprehensive section on DLLs.
It's all very well in practice, but it will never work in theory.
Wasn't that the point of the Registry?
"Would it kill you to put down the toilet seat?" -- Maya Angelou
Librarys have version numbers /lib you will see you have several links to various version of a c library e.g. libc.so.6, libc.so.5.
look in
These point to the actual library.
As long as a libraries API doesn't change between major versions (as it should) there is no problem.
Jeroen
Secure messaging: http://quickmsg.vreeken.net/
In addition, the OS should be intelligent enough to know when an EXE's been manually deleted (thrown in the Recycle Bin). The current practice of placing all unstallation responsibilities on the vendor tends to result in DLL buildup when the uninstaller doesn't work right or isn't provided (not uncommon.) There should be a unified process for adding a DLL that links it to the executable file that requires it.
I thought Microsoft already claimed to have fixed "DLL Hell" once or twice before with Windows 2000 and Windows XP. How many times are they going to "fix" the same problem?
One of the really annoying things about Microsoft is they always promise to fix something in the next version. It's always "next time" with them, but the problems never seem to go away.
Sounds a lot like what Apple did with OS X's Frameworks.
Read more about that here. Be sure to read through the section on Framework Versioning.
Also note that MacOS has long done a great job at packaging applications together so that the installer is unecessary.
I instruct people in Linux, and my biggest complaint with RPM is that the user must solve his dependencies himself.
E.g. we had made an installation, but left out the development tools. When you try to install gcc, it says which packages are missing, but not where you can find them. You have to dig them up yourself from the CD-ROM's, and sometimes you have to look on all of them.
I do not have any problems with the RPM system itself, but why has Red Hat still no system implemented like Debian apt ? After the installation it asks for the CD-ROM's, scans them and builds a database about what packages reside where.
So, in the case of gcc, it would say what packages are missing, select them automatically, load the needed packages onto the disk and asking for the appropriate CD-ROM whenever necessary.
This is much more friendly than the stock Red Hat approach. Oh, I know there are tools to do that with Red Hat, but you still have to install them yourself. It should come out of the box.
I don't get it. The sole idea about DLL is, that they are dynamically linked libraries (hence the name ;) shared by applications. This new idea suggest that, in theory, every program can have their own unique DLL. What's wrong with this picture? It's a workaround because today, programmers create DLL's that are not backwards compatible thus breaking older programs once the DLL has been overwritten. Yes, the workaround will work, but at the same time it undermines the idea of sharing libraries and it doesn't exactly urge programmers to write nice code that doesn't break existant functionality.
/Christian
Well this makes one start to wonder, if each program is going to have a unique DLL (or at least one shared with VERY few others) why bother to have DLLs at all? Why not just roll the library up into the application binary?!
It'll be interesting to see how this adds to the bloat, I imagine it won't take long for the average user to amass quite a number of these things, mostly doing the same job!
There must be a better solution than this!
The number of copies in memory, for one thing.
Consuder how many processes are loaded on a typical 'doze system. Now imagine what would happen if every one of them had a different copy of USER32.DLL (or whatever).
According to Microsoft's Ivo Salmre, quoted in the article: "When a .Net component is installed onto the machine, the Global Assembly Cache looks at its version, its public key, its language information and creates a strong name for the component."
In a few cases in the past, backwards compatibility has been (slightly) broken by service packs and security fixes. How will they deal with that? Presumably, the public key of a library can be affected by a patch. If an application uses the strong binding to request a specific version of a DLL, does that mean that it will keep its own copy of the DLL without the patches? Or will it have to deal with potential incompatibilities introduced by the patches? How "strong" will this binding be?
And by the way, this idea looks rather similar to the usual UNIX shared libraries that allow an application to bind to libpng.so (version doesn't matter), libpng.so.1 (version 1 required) or libpng.so.1.0.89 (specific version and patchlevel required). The proposed system for DLLs does not seem to be very different from that.
-Raphaël
This has been around for ages in .NET, and doesn't look like anything new to me. The image that comes to mind is of Dr. Evil putting "la-ser" in hand speechmarks.
SlashDot regurgitates, period. NYT, Wired, whatever. The vast majority of the stories mentioned on SlashDot I've seen elsewhere, sometimes days earlier.
What's the problem?
This is not a "Breaking News" site, it's a community discussion board. One doesn't come here for "news," per se, but to read what like-minded people in the "geek community" think about that news.
You're getting upset because your dog doesn't 'meow.'
Correct me if I am wrong, but wouldnt that slow windows down even more. You computer will now have to search through your registry to find the correct DLL for your application. And what happens if you registry gets corrupted (not like that ever happens), then that you put you in an even worse position. Would it be easier to make the DLLs backwards compatible?
Almost all non-Windows operating systems avoid this DLL problem.
For one, Mac OS X uses bundles. Each application has its code as well as libraries all wrapped up in a single package. Only that app uses the libraries there. Clean, simple.
I doubt Microsoft's solution will solve the problem because their operating systems rarely show the cojones to stop an errant application from taking advantage of "features" placed within Windows that are self-compromising (e.g., Visual Basic Scripts, ActiveX). Some programming yahoo would just write something to override Microsoft's effort.
Windows could use a DLL manager similar to the old Mac OS Extensions Manager. Actually giving the DLLs easily recognizable names and clear version numbers wouldn't hurt either.
Aw, fuck--just chuck the damned thing and run a *nix, for cryin' out loud.
Vos teneo officium eram periculosus ut vos recipero is.
In order to solve "DLL confusion" in Windows, Microsoft are going to increase of the number of DLLs on the system, potentially by as much as there are applications installed, and give each DLL a unqiue, but symbolic only (xyz123:pdq098 versus msvcrt.dll for example) identifier.
One result is that from one machine to the next, not only will you not be sure what applications are using which DLLs, you will also have applications that use radically different identifiers for accessing their libraries.
This eliminates library confusion... how? I can't wait to have to troubleshoot it. Here's another solution Microsoft: document your standard libraries so that idiot application developers don't feel they need to re-invent the wheel and dump custom libraries all over the place.
Of course, the rest of us will continue using open source software.
Why bother.
It's funny reading through the different replies to this story-
.
Reply 1- "This is a horrible idea! Look at all the RAM/disk space this is going to use. M$ programmers are idiots!"
Reply 2- "VMS/Apple/*enter slanted fav OS here* already does this! This was a good idea when it was done 10 years ago by ____
Reply 3- An idea like this is so stupid, it will NEVER work right.
So, its a stupid idea that will never work EXCEPT it has already been done BUT will take up too many resources UNLESS it is done by our fav OS AND then thats okay
*grin*
---"What did I say that sounded like 'Tell me about your day?'"---
Well, it is one thing to say that application can now obtain the version of the DLL they want if they *explicitly ask for it*. It is another thing to say that, they always and forever, until the end of time get the DLL they were "compiled against" or "packaged with". It is not clear from the article which of these two situations is the case.
The point of shared libraries is that you CAN upgrade one single library and have many applications "automatically" inherit the changes. This is how you can update a file dialog for instance, without recompiling every single one of your GUI applications. This is a Good Thing. The question then becomes "why is this shit breaking so much". The right solution is a proper combination of carefully-followed deprecation and backwards compatibility rules (preferentially married with some sort of standard version naming convention), and the ability for applications to explicitly choose the library version they want (or even better yet, runtime configuration directive that can be set by the user or administrator) in the cases that *it is known that the new shared library is not backwards compatible*.
It's 10 PM. Do you know if you're un-American?
This has nothing to do with DLLs, but with .NET components. Read the article carefully! .NET application can bind to a specific version of a component, but that's not even news - it already exists in .NET 1.0 and some aspects of it were already available in COM years ago. .NET components are usually exported from DLLs, but this won't solve any of the problems with 'normal' DLLs.
A
The only aspect of it that has to do with DLLs is that
This won't effect existing .dlls... this "new" technology is part of the .NET framework. Each assembly (which is just a compiled binary of .Net classes) has a version number and guid. When you compile one assembly that references another assembly, there's information that tells the CLR what versions of the referenced assembly are acceptable. There another thing called the Global Assembly Cache that keeps track of the different versions of each assembly.
.dll hell for existing stuff.
So, anyway, it will only help future programs. We'll still have to suffer from
--
"What do you want me to do? Whack a guy? Off a guy? Whack off a guy? Cause I'm married."
There's this new thing called an "object".
Basically, you can create an object of a particular type anyplace that has access to the definition of that object.
Find a bug in that object? No problem...just update your single definition of that object ( the DLL, loadable library, module, etc ).
If every time I wanted to connect to the database or check an MD5 signature, I had to include that code into my project, that would really suck.
Instead of having 1 version of that code, I would now have as many versions as there are programs using it.
If I found a bug after using it in several places, I would have to recompile perhaps dozens of programs that use the same code.
With DLLs and libs, we can make reference to the object defined in the external library, and just use them from anything that _can_ reference them. I find this is very much my preferred method, and the reason people in general prefer to use external libraries when they can.
Imagine actually having to include all the code from CGI.pm, DBI.pm and DBD::Mysql everytime you wanted to just make a simple call to the database.
Here's an example to show how many modules you would need to copy + paste into even the most simple perl script if not for loadable libraries (you can see what I'm saying here):
Windows--
perl -e "use CGI;use DBI;use DBD::Mysql;use Digest::MD5;print $_. ' => ' . $INC{$_} . chr(10) foreach sort {$a cmp $b} keys %INC"
Other--
perl -e 'use CGI;use DBI;use DBD::Mysql;use Digest::MD5;print $_. " => " . $INC{$_} . chr(10) foreach sort {$a cmp $b} keys %INC'
This is the output I get from running that 1-liner on my windows box: :/perl/lib/Carp.pm .pm .pm /vars.pm
AutoLoader.pm => C:/perl/lib/AutoLoader.pm
CGI.pm => C:/perl/li b/CGI.pm
CGI/Util.pm => C:/perl/lib/CGI/Util.pm
Carp.pm => C
Config.pm => C:/perl/lib/Config.pm
DBD/Mysql. pm => C:/perl/site/lib/DBD/Mysql.pm
DBI.pm => C:/perl/site/lib/DBI
Digest/MD5.pm => C:/perl/site/lib/Digest/MD5.pm
DynaLoader.p m => C:/perl/lib/DynaLoader.pm
Exporter.pm => C:/perl/lib/Exporter
Exporter/Heavy.pm => C:/perl/lib/Exporter/Heavy.pm
constant. pm => C:/perl/lib/constant.pm
overload.pm => C:/perl/lib/overload. pm
strict.pm => C:/perl/lib/strict.pm
vars.pm => C:/perl/lib
warnings.pm => C:/perl/lib/warnings.pm
warnings/registe r.pm => C:/perl/lib/warnings/register.pm
Loadable modules are cool.
Indeed most libraries have subversions, but most apps just link to the major version. When an app insists it needs version 6.3.2.4.33 it gets nasty..
Stop spreading FUD. You can access any library you want with LD_PRELOAD. So if libfoo is at 6.3.4 and you have a 6.3.2.4.33 on the system that your app absolutely requires, a simple
will do the trick. In fact, I do this specifically for StarOffice so I can use my local copy of freetype2 with the bytecode hinter turned on instead of the version which comes with StarOffice.
and abandones the advantage of shared libraries: one DLL ABC which is used by several applications.
.NET metadata with a versionnumber.
Sharing a library has one disadvantage: the interface of the library should not change, otherwise using applications will crash. When an interface changes, you have to update the version. Now, you can do this in several ways, most likely this is doable by using a filename version scheme, or as in
The central point where you register shared dll's shouldn't be based on a directory though, but a central repository which holds ID's that refer to files on disk. This is implemented in COM somewhat: COM objects are stored in DLL's mostly and when you register a COM dll, its COM Objects are registered in the registry: each CLSID is stored with the physical file where to find the object. If you now store the files locally with the app, as it should be, you can register the com dll's and each application using a COM object with a given CLSID that is stored in the local stored dll can use them.
The problem arises when you install 2 applications which use the same DLL with the same objects, only application A uses v1.0 and application B uses v2.0. v2.0 of the library has all the objects of v1.0 but also newer objects. You first install A. All dll's are stored local. Then you install B. A works, it will probably use the dll of B because B registered all teh objects with the local stored DLL. When you UNinstall B, A will not work anymore, unless you keep the dll with the objects around. Most people don't do this ("Hey the uninstaller left some dll files behind!" *executing del command*). That's DLL hell.
What's best is thus a central repository (Be it the GAC or the registry) and a central store which allows multiple versions of a DLL to be stored. I'm pretty sure that's what MS is heading at, and not your MacOS X nor any Unix does this.
Never underestimate the relief of true separation of Religion and State.
I don't think there was any 'FUD' in that statement.
If an application _requires_ a certain sub version to work (by that I mean version == x.y.z, not version >= x.y.z), then there's something wrong with either the design of the application, or the design of the library...
Advanced users are users too!
If each application pretty much has their own version of the DLLs, doesn't that defeat the purpose of having shared libraries anyway?
The libertarian solution to the failures of capitalism is to apply more capitalism til the failures are fixed.
Nice nick. Maybe we could grab a beer and take turns blaming each other for all the worlds problems.
You think that I'm crazy, you should see this guy!
As long as a libraries API doesn't change between major versions (as it should) there is no problem.
Unless the semantics of an API change subtly from one version of the DLL to the next. This is sometimes done to fix bugs, security holes, etc. in one version of the DLL. You wouldn't believe how many proprietary programs in practice rely on undocumented behaviors of specific versions of libraries.
Will I retire or break 10K?
OS/2 - as an example only - had a much better scheme where o/s stuff lived in its own space and the stuff you built/bought lived in its own space (and never the twain shall meet). On top of that, they implemented the idea of a LIBPATH env variable so that you could set the path OS/2 would take when looking for DLLs. Consequently, screwups were minimized, versioning was not an issue, built/bought software could be maintained easily, and (wait for it...) you could upgrade the o/s without blowing away all your apps!
Can't wait to hear what MS 'discovers' next!
CrazyLegs
"Pork!!" said the Fish, and we all laughed.
MS already advises software developers to put application-specific DLLs in the application folder. The reason some DLLs need to go in a global location is because they are shared by MULTIPLE APPLICATIONS. Sure, you could put copies of each DLL in each app's folder, but that leads to other problems as pointed out by other messages here. (Wasted disk space, wasted RAM by loading multiple similar DLLs, difficulty in upgrading all those DLLs, etc).
the app will use the .dlls from its local directory and unless it is running in a 3.1 environment it will not encounter any possible conflicts. Amazing how what is old is new again.
Caution -- printing is no longer well supported from the sixteen bit compatibility so a workaround is needed but the rest continues to work well. Not sure about sockets, haven't tested.
The whole idead behind dll's was to keep from having multiple copies of the same file for each program. This seems to overrule that theory, so why even store it in windows\system(32) then, just put the dll in the programs directory and do away with the dll-id nonsense.
The artical doesn't make it very clear, but I think it only applies to applications developed using the .NET framework. So, for all those other applications out there it's dll hell as usual ;)
Does anyone else see this as a pre-registry registry?
I think it works by 'indexing' the dlls which are required only based on version. call me old-fashioned, but i like to read the article first. ;-)
why run from Vincenzo?
The real solution is to indicate whether a DLL is a bug-fix release or whether it represents a significant and incompatible change to the APIs. You know, like Linux major/minor dynamic library versioning, for example.
First, what are the advantages of DLLs?
- Less Memory Footprint
- Less Disk Footprint
- Global Security Fixes
- Use of third party binaries
- Plug ins
Less Memory FootprintIn Unix, when you have two instances of an application running, say, vi, the executable code between the two is automatically shared. The shared library gains you nothing. To gain memory footprint, you need to use the same shared library from two applications at the same time. For example, libc might be used by vi and cc.
However, if you compile statically, you bind in only the routines that are needed. For shared libraries, you need to have all routines available, since you don't know which of them are used. Now, your virtual memory system may notice that a shared libary page isn't used, and page it out. Yes, this requires additional run time execution time. The upshot is that you save memory only when you have enough different programs use the same shared library to overcome the overhead. I claim that this happens with libc, libX11, and not a whole lot else.
Less Disk Footprint
If you have 50 programs that use the same shared library, you can save some disk space becasue that libary code does not need to be duplicated that many times. However, shared libraries need to have the symbol information requried to perform the dynamic binding. The savings isn't that much.
In the old days, when an entire Unix distribution fit on a 150 MB tape, the libc shared library savings amounted to about 30%. You could get more reduction in size by using compression.
In fact, programs could be compressed on disk. The loader could decompress the image as it reads it into RAM. For slow disks, this may be faster than loading the uncompressed version into RAM. The down side here is that you then may not be able to use the original file on disk for virtual memory paging.
In any case, it's getting hard to get a disk drive under 20 GB. 30% overhead reduction for the most common shared library doesn't amount to much.
Global Security Fixes
So, your libzlib.so.5 has a bug. You whip up a quick fix, create a new libzlib.so.5, and drop it into your system. You've just fixed all of your libzlib dependent programs, right? In fact, you fixed programs you didn't even know used libzlib. You may also have broken programs that you didn't know use libzlib. And, short of testing every program on your system, you don't know. The more complex the patch, the more likely you are to have broken many things.
Quick. What is a utility which will tell you all the shared libraries that an application uses?
Use of third party binaries
Third party binaries can just as easily be distributed in source form or in a library that is statically bindable. Static binding is preferable, since you are unlikely to use a large fraction of a kitchen sink shared library - where the authors have no idea how the programmers will use it. Source is preferable, since the documentation rarely specifies enough semantic detail to allow proper use.
Plug ins
OK. Your application is Apache, and you want some real flexibility. If Apache is compiled so that modules can be loaded at run time, then the administrator can add the new module and turn on it's use in the configuration. This doesn't save any RAM or disk, but it may allow the admin to change a line of config, restart the web server, and start using some new feature.
For Apache, the admin can also recompile with the new module compiled statically. I've done it both ways. My measurements show a small run time advantage to static compilation.
Granted, if you can't recompile IIS, then DLLs will give you the same flexibility in exchange for a small performance penalty.
The Dark Side of Shared Libraries
If you compile your application statically, then upgrade your OS, you can copy the old application to the new OS, and it just runs.
If your app has shared libraries, you have to track them down on your old OS, and copy them to your new OS. If you make a mistake, and copy your old libc.so over your new one, you run the risk of trashing every program on your new system. Brilliant.
Take netscape as an example. It comes installed in it's own /usr/local/lib directory
tree. In /usr/local/bin, netscape is a
script which sets up the shared library search
path to include the libraries that netscape needs,
then runs the binary. This introduces script
overhead
and shell dependencies on a complicated package.
And, when you upgrade your OS, you still need
to find the old libc.so and copy it forward.
RPMs
Many seem to think that RPMs solve all these problems. However, many packages have bugs in their dependencies, etc. Many RPMs use different versions of the same shared libraries. I find that I have to override the dependencies to get stuff to install. Often, the requried package IS installed. Not just once in awhile. Much of the time. The difference between theory and practice is that, in theory, they are the same.
Conclusions
Shared libaries seldom save RAM or disk space. The problem with using them to fix bugs globally is that you don't know what you fixed, or even if you broke some things. Third party binaries should invariably be statically linked. In an open source environment, plug ins are not strictly needed. Shared libaries make OS upgrades more painful.
So, what I'd like is a Linux distribution with no shared libaries. The compiler, gcc, would be configured to compile statically by default. Then, after some years of running the system in production, and after adding hundreds of applications to it, I'd be able to upgrade to a new distribution without having to recompile or do the shared library search.
-- Stephen.
Unfortunately, even when 1GB is standard, the problem is that people will be running Windows KAE-T (Kick Ass Experience - Trusted) which requires about 927MB of memory without themes.
ich bin der musikant
mit taschenrechner in der hand
kraftwerk
Sure if this capability were overused it would be a mess. On the other hand, judicious use of it would solve a lot of problems. Normally I'm not a fan of MS but if they do it right (big if I know) it's a GOOD idea.
Maybe some policy would help a bit. I'm thinking that things like services, especially public net facing ones be forced to use the latest DLL whether it breaks anything or not. If it's compatible, the service stays up. If it's not the service dies and doesn't make a public nuisance of itself. Reporting tools would help too. If it were easy to get a list of which apps were using which DLL, it would be possible to intelligently manage the situation. For that matter, make apps use the newest by default and then fall back to the oldest only if that doesn't work and it isn't a public facing service.
Yes, this can cause problems but if they include the right tools and sane policy they're managable. This isn't intriniscally new VMS did something like this. Unix admins have been doing manually for years. MS just wants to automate it.
Unix has had library versioning from the very beginning. Shared library filenames specify what version of the shared library the file contains, and when programs load they can request a specific version thru the file name.
And here comes M$ taking the same idea, and adding a point of failure in the form of some binary index of dlls. Jeezz this is just another thing I'm gonna have to fix when my windows friends start having trouble with thier computer. Really unnecessary. Couldn't they have just outright copied the Unix method? At least then they would have done it right.
I have raised this point in the past, but it once again applies:
With storage space being so inexpensive and abundant, all programs should be fully independent, self-contained entities. The idea of linking programs against a set of standard set of DLL's is a great way to make smaller programs, but if you haven't noticed small and efficient is not the most important aspect of any program these days.
DLL's and Linux's library dependencies can be completely solved in this way, and management would become much simpler.
And, for those who believe that this would mean huge programs... take a look at the Phoenix web browser, it installs completely in it's own folder and is still very small and efficient.
www.GamezCore.com For Hardcore PS2 Gamerz : By Hardcore PS2 Gamerz
Even though this article isn't really about DLL's, why do we have NEWER versions of DLL's breaking applications anyway? The whole point of making a new minor release of a piece of software (DLL, component, whatever), is to fix things, NEVER to change the API or change the behavior of existing functions. It's these changes that break existing applications.
New major releases should be considered a completely different DLL/component, since it conceivably has a different API or changes its behavior in some incompatible way.
It seems to me that DLL's/components need to be treated as self-contained applications. They need to go through a rigorous testing and QA cycle (except that they don't generally expose anything directly to the users, but to other applications), and need to be installed as if they were their own application. Windows applications that have dependencies on DLL's can, during installation, tell the OS which DLL's they need and what the minimum version should be.
Bundle these with the application if you need to, but to suggest that DLL's/components need to be kept at the same *minor* version to avoid breaking applications indicates a bad problem with how you build and test DLL's. I'd rather fix this problem than introduce this layer of version matching.
Why do you invision[sic] that? This system is actually going to prevent such a thing. As it is on a Windows platform if you install an old program that needs and installs an older dll it will simply overwrite the newer one causing new programs to break. It's called dll hell and it's been the scourge of win32 developers for a long time. This new system allows the old program to install the version it needs but the system still has a copy of the new one that the newer programs need and each program calls it's respective dll.
.Net handles dll versions using the
.Net, if you prefer you can instead simply copy the dll to the bin directory inside the application directory and that application will use that dll. That's usually refered to as XCOPY deployment.
If you want more information on how this is going to work simply look into how
Global Assembly Cache (GAC):
The GAC can be used to register a dll on a system wide basis and allow other programs on the machine to link to that dll. It handles the different versions of each dll and how they are configured. BUT you do not have to use the GAC to use a dll within
The trade off of this system is that you have more files on the filesystem which need to be managed. It has it's own drawbacks. But to anyone who's ever f'd a win32 machine because a system dll got replaced when they installed that dvd player app from 1997 and it just happened to replace a critical system dll that was just updated in the last service pack, this is a godsend.
I code in assembly and a few other languages. I can understand that it can be a very good thing to reuse one piece of code in several different places. I understand also that it can save space to reuse. No news here...
As for the idea of "Strong Binding", I wonder what Billy G. expects to acomplish by adding yet more poorly designed, poorly documented LIBs to the programming mess that Windows has evolved into. On top of that, I wonder why I would need to save EVERY SINGLE VERSION of a DLL that makes it to release...
Version tracking will become a nightmare.
Consider:
+User installs program COOL_PROGRAM.EXE
-COOL_PROGRAM uses MS_COOLNESS.DLL
+User gets an update to MS_COOLNESS.DLL:
MS_COOLNESS_V2.DLL
-The fix in V2 repairs a buffer overflow
in a function that COOL_PROGRAM used from
COOLNESS.DLL.
Question : Does the installer for V2 know that COOL_PROGRAM is dependent on it? If this is the case, Billy G. is gonna have his hands full trying to keep track of what goes where with third party devs.
If not, perhaps COOL_PROGRAM will go by default to the newest version of COOLNESS.DLL. Ok, now Billy will likely contend with tracking and modifying functions that have previously been used in highly specialized ways for security/system critical functionality that Windows does not provide either by accident or by intention. So NOW third party devs developing well organized and functional code/programs are forced to keep up with the madness of Windows development to save space. Hmmm... Guess it got the better of the buffer overflow this time. Or maybe they introduced a new bug into the system {par for course with MS}...
Better yet, how about people developing security/system critical environments use their own code to avoid this whole mess? Ok, now you dont need DLLs do you? How about 3-5 times as many? Wait for the next Windows release? So the effort YOU made during XP to keep up with DLLs and other updates is pointless right? Or XP+1? The style of MS defines itself....
Security/system critical programs?...
Thats only one side?...
Ok. Try this:
Graphics, network comunication, encryption, file editing, database editing? Or maybe drivers, file converters, scripts, inter-app comunication, diagnostics?
The list goes on. The problems generated by and complications arising from this framework are not worth the hassle.
Instead of building a system where things get more complicated I would recomend a redesign of the system itself. Current and past states of instability/insecurity are more than I care to witness again. Billy has enough money to sit around daydreaming for the rest of his days while still paying his programers for doing nothing but daydreaming themselves for the rest of theirs... Perhaps they could get up off their butts and design a system from the ground up that is easy to use, safe, fast, and reliable for users old and new... Logical?
I love C programming. C++ and Java are lots of fun. But IF you want something done right the first time, assembly and careful thought is the only answer...
S-()-u-|-s-!-|)-E
but I haven't experienced "DLL-hell" on Windows since 95. Not that it doesn't happen, but is this a feature whose time is over before it arrives?
Now, (rpm|dpkg)-hell, that's another story...
Given the current cost of massive hard disks, why are programs still putting DLLs anywhere outside of ...\Program Files\Foo\dlls? I think most people would be happier losing some extra space per program due to DLL redundancy than to keep dealing with shared libraries!
Finally Microsoft have started to figure out how to use cut`n`paste, so they could copy the method used in everybodys favorite os. The /lib/ dir have as far as shared objects go always used an unique id for its libraries, this is called a version number. and usually build up the name of the library, like my-incrediblelib.so.9.2.1
Let me explain this because many people seem not to understand.
.NET way of doing things is different though, and Microsoft won't logo or certify apps unless they follow these practices:
When a program installs a "shared" DLL, the assembly manager looks at the DLL version. One of three things will happen:
1. The DLL does not exist in the assembly cache - it is added.
2. The DLL exists, but all other instances of it are a different major/minor revision. (X.Y.0.0) In this case, the DLL is added to the assembly cache as a separate version.
3. The DLL exists in the cache, and the major/minor versions are the same. In this case, if the installing DLL has a newer revision (0.0.X.Y), then it will overwrite the old DLL. Otherwise, it is thrown away.
When a program executes, it's manifest specifys what major/minor version of the DLL it needs, and the assembly cache will fetch it. HOWEVER, bug fixes, etc are supposed to be changes to the revision numbers only, so if a bug fixed version of the DLL is installed, the app will use that version.
The assembly cache also keeps track of what set of DLLs go together. If version 1.2.7.X of FOO.DLL needs to also be run with 1.2.7.X of BAR.DLL, then the assembly cache can make sure a program never uses a mismatch, which has been a
MAJOR cause of difficult to track instability over the years.
The "new"
1. If you have a DLL only used by your application, install it in your application's folder.
2. If you have a suite or many apps that work together and use the same DLL, install it into program files\common\yourname.
3. ONLY install DLLs into the System folder if they are very very widely used, or are actual system objects or libraries. (I.E. your app needs a newer version of the microsoft common dialog runtime. In that case, you ship the MSM which has the latest version of common dialog and related libs that are all known to work together, for EACH version of windows. The Windows Installer knows how to read the MSM and pick the appropriate set of files for the current OS/service pack level you are on. That way, developers running Windows 2000 don't b0rk a Win9x user by shipping the w2k libraries.)
3a. An even easier way of handling things is to write your app for a specific service pack level on each OS (or possibly hotfix if a bug was fixed that is affecting your app.) In this way, you just tell your users "you need service pack X on OS Y, or service pack Z on OS A" to run the app.
Natural != (nontoxic || beneficial)
This is not clutter, apart from the fact that your list includes static links and directories, about two thirds of the dll's you listed are symbolic links to versioned filenames to avoid clutter.
He saw some dirty arabs and fired. Too bad it was just some friendly kurds, BBC reporters and his fellow cowboys.
Great... now when you install and uninstall a package, the DLLs are going to hang around (on purpose). I can see it now with a 13 year old that likes to install lots of little programs. Hopefully there is enough space on my hard drive.
Well, Microsoft does one thing better than any other company. It can take a bad idea and make it even worse than it was before.
Isn't there one person at Microsoft that sees how Dynamic libraries have been done in UNIX?
Put the version in the name of the DLL file name.
We do not need another level of untracible indirection in the registry.
Have each file have the correct phsical name.
i.e. lib-1.2.dll
Let the program decided latest or specific version. And have the system support this. If I want the latest lib-1.x.dll get it. Latest lib-x.x.dll get it. But directly, not by another dereferencing "ID" in the registry. These clowns love their obscurity.
"Microsoft is attempting to do away with DLL version conflicts"
Imagine Bill Gates in a black mask and with a much cooler voice:
"There is no conflict".
graspee
This whole Slashdot story thread is retarded. Obviously no one read the article to see that this really only applies to .NET (ASP/VB/C#/etc.)
.NET takes care of the rest. Piece of cake.
.NET Framework installed, I'd suggest checking out %systemroot\Assembly\ [to see all the assemblies you current have installed, and their versions] and also the "Microsoft .NET Configuration" program under Administrative Tools. In there is an entire interface dedicated to managing the GAC.
.NET rocks the hizzy.
I can't tell you what an improvement assemblies are compared to a "component"/COM object. You'd have to build your DLL, then regsvr32 it into the system.. and if you ever needed to update the DLL, you'd have to stop your service/app that uses the DLL, then regsvr32 -u it... and then overwrite the existing file, then regsvr32 it again, and start your service/program back up..
And now? You just overwrite the DLL.
If you have
It's pretty cool stuff.
Not All Who Wander Are Lost