Often when learning about .NET I run into things that hail from the COM world, or C/C++ (handles, gdi, interop, STA/MTA, etc., the list goes on!).
Would it be worth my time to go learn how to program in COM with C or C++, thus killing two birds with one stone?
Would this deepen my 开发者_开发百科knowledge of developing with .NET? I am tired of the "This HAPPENS BY MAGIC" feeling!
Learning COM will help you understand certain portions of .NET better, but they are mainly the portions that deal with COM interop. It will not help (much) for general .NET development overall, other than in certain scenarios.
That being said, if your primary goal is to learn and be focused in .NET, I would focus on learning some of the newer .NET technologies. Between WCF, WPF, Silverlight, WF, EF, etc - there's no way one person can become a true expert at all of the .NET technologies already existing, let alone others. Focusing on the main .NET based technologies that interest you may be a more productive use of your time.
If you want to try to expand your knowledge in general, then COM may be worth learning - but I'd probably personally recommend learning a new language, especially one that uses a very different paradigm than your main .NET language. For example, studying a functional programming language might really expand your view of programming and be a much better use of your time.
Instead of diving into this, read Don Box's tomes on the .NET framework and why things work the way they do inside .NET. All magic will be relinquished after this book (though dated, it is still very relavent).
My personal opinion...keep in mind this is just my opinion:
I am glad that I learned .NET first. I was not constrained to think about things like binary compatibility and activeX. These are legacy concepts that I have really only needed when dealing with older COM libraries.
I will admit that going back and learning COM was useful in certain aspects as you really should understand how compatibility works. Though, my situation was a little different in that I learned about COM with vb6 which can be VERY different.
I would say learn .NET fairly well first, but go back and learn about MTA and multi-threading with C++. This still seems to be an area where many people have hesitated to say that .NET is better.
To add one last thought, I work with many legacy programmers that come form the COM world. They get so stuck in that world that it prohibits them from moving on. If I see something like clsOrder one more time I may barf. Do yourself a favor and learn how to actually program in .NET. Don't just program vb6/c/c++ in .NET. It's a huge waste of time.
Learning anything will help your understanding of similar concepts, so sure why not.
It can't hurt, but if you don't know C/C++ very well, especially pointers and memory allocation, you may want to brush up on those before jumping straight in to interfacing with COM objects.
"C/C++" suggests to me that you definitely don't know, well, anything about it. I would skip it if you just want to know about .NET, as they will likely come with relevant documentation that will explain how it works from the .NET side. However, if you want to learn more generally, or the kinds of things involved in the implementation details of .NET, like the magic that's involved in interop, then I'd definitely go for C++.
I wouldn't learn c++/C for the com I would learn it because its a very different way of looking at how to structure problems and solutions. Any of the higher level languages do a lot by magic and the closer you go to the machine the less that happens.
精彩评论