What else is there to say after the title, really? Funny that I'm talking about it like it has been around since the mainframe.
Oh yes, I remember now; it wasn't really that long ago. There was tedious initialization protocol everywhere something got constructed, and in a "real" system, that's a lot of places.
Of course, that information didn't just evaporate; it just got transformed into metadata. Anything can be solved with another level of indirection, whether it takes the form of anno.attributes or XML configuration verbosity.
And of course, there's the wonderful ability to control lifecycle policy, etc. Ahhhhh.....
Now remember how gak you feel when you have to go back to a codebase that doesn't use those techniques. Yes, I just worked on some. Work up some bile with me as you visualize a seemingly-endless if/else chain, checking for hard-coded strings, with even more hard-coded constructor sequences.
Now it's hard to implement a nice dynamically-loaded-module class and object factory cough use ATL cough in C++; That darned Windows LoadLibrary() is so hard to use, and that GetProcAddress() just can't find a mangled name to save its life.
Let's face it, some platforms make it way easier; dynamic platforms like Java/.NET allow even amateurs to build factories cough get an open source DI container cough, and let's face it, this is for the better.
Now some dinosaurs won't get it, but they are going extinct; next they will be telling you the world is flat, and how can you argue with such an arcane point-of-view?
No comments:
Post a Comment