"On NT, go to this key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
and create a DWORD called DesktopProcess with a value of 1. This makes the desktop and Taskbar run in one process, and subsequent Explorer windows each run in its own process. This means that you can do your debugging with a single Explorer window, and when you close it, your DLL is automatically unloaded, avoiding any problems with the file being in use. You will need to log off and back on for these changes to take effect."
Nice!
Taken shamelessly from: http://www.codeproject.com/shell/shellextguide1.asp
By the way: COM, COM+, ATL COM, etc. seems to be moronic and painfully unnecessarily hard.
I mean, C is kind of moronic. C++ is like moronic++. COM is a totally different, a totally different programming model. While C++ was born as a better C and object oriented C, then it was "upgraded" to generic programming using STL (which is the equivalent of Java generics), but a very bad implementation, although I admit that it is way better than the original implementation using macros (#define).
COM is "component oriented programming". It says "object orientation is hard, therefore let us not try to use object orientation and use components instead". Components are simply objects that do not use inheritance and that have both runtime behavior and design behavior.
Why would we need runtime behavior and design behavior?
Objects in object orientation have only runtime behavior. In case you are designing a GUI, objects have to be put in a place and objects have to remember that when they are running. But objects are not running if you are coding the application.
At least they are not running in Java and C++, but they are running in Smalltalk, because Smalltalk has a different way to look at the world. Therefore in Smalltalk object oriented user interfaces use object orientation and it was like a charm.
But in our poor languages C++ and Java, developers came up with the moronic idea that we needed this thingys called components.
And holly cow!!! There is so much people totally numbed with the idea that "components" is the next big thing as if they were seeing the light of truth, but of course they can't explain why it is so great. They even mention the typical falacy ad hominen "if Microsoft, Sun and IBM like components, components must be good".
I find myself totally happy with the idea that people are wasting their lives while we people on the object orientation camp have totally mastered and fixed all the bugs and we live totally happy in object land, while all those loosers on the component camp are wasting their lives trying to make those trivial things and fail miserably. At first, around 1992, of course I thought we were going to change the world and we had to be on a cruzade to defeat the infidels. But the infidels are so strong and they waste so much money that we do, so there is no point on wasting any effort on defeating them. They are defeating themselves. Good!
Actually it is good that they spend so much time on irrelevant stuff. This way all that irrelevant people is out of the way for us to build the important stuff. And we can learn in 3 months enough to work as much as 10 years, actually I've been working for more than 15 years with what I learned on the first 3 months of object orientation.
And that's because object orientation is hard. And I don't know if that is good or bad, but at least if you take the time to learn, you will be able to work in the industry for probably the rest of your life without having to learn much (ok, languages change, frameworks change, but the original idea has never been surpassed).
No hay comentarios:
Publicar un comentario