views:

339

answers:

7

Hello Guys,

I am a fresh graduate with a bachelor in Computer Science. As most school today, they are no longer teaching students C or advance C++ (only an Introductory course in C++... With lessons up to Pointers). The standard programming language prescribed in the curriculum is C# (.NET stack).

Just recently, I got hired as a junior software developer. 95% of our codebase is in C++ and our products are using COM/DCOM. The other 5% is in .NET. My current responsibility is to maintain a project written in .NET (ASP.NET) and I am not required to study C++ and other technology YET. But I want to learn COM as soon as possible so I can help out on other projects.

So I am seeking the advice of this community on how I can go about learning COM. My current questions are the following:

  1. Any required reading? (Pre-requisite topics)
  2. A Good Site in Learning the basics of COM?
  3. A type of Simple Program to really appreciate the "purpose" of COM (A chat program perhaps?)

Thanks! :)

PS: Should I mark this as a community wiki?

+3  A: 

The book of Don Box about COM is the definitive reference. Amazon link.

Beware is a tough read, but it covers everything in deep. And remember, as Don said... COM IS LOVE.

I do not believe you can find a lot of web site, COM was a up to date technology a lot of time ago, but if you can forgot about it trust me... it's better!

massimogentilini
Arnaud Gouder
I just checked and we have this book (Its an OLD book) in our library! :) Thanks!
Ian
You can download chapter 1 for free, for example from: http://www.informit.com/content/images/0201634465/samplechapter%5Cchap01.pdf
Arnaud Gouder
IDispatch sucks, but i need the bucks. -Don Box (tech ed - circa some year where people cared about this stuff)
Aardvark
+1  A: 

I would recommend the book ATL Internals, it may be getting a bit old but it will teach you the basic fundamentals of COM. As the tho poster commented, the Don Box is good as well.

Shane Powell
I don't agree. This book was great to understand the underpinnings of how ATL works *internally*. I found that to be distracting from understanding how to just use ATL (let alone COM in general). I wouldn't open this book until you understand some fundamentals.
Aardvark
Before I read this book I didn't know anything about COM. It taught me both ATL and COM. Maybe it should be recommended for good programmer that has a solid understanding of programming paradigms?
Shane Powell
+1  A: 

It's obvious, but have you visited microsoft site for COM? That's how I started, later I just googled for info when I stuck at something (which was a lot, COM's nasty at some points). I also asked a lot my co-workers, nothing's better than face-to-face explanation on some voodoo you can see in code

grapkulec
As much as possible, I want to stay away from MSDN since it involves a really technical discussion. (At least for now)
Ian
whatever you meant by that, I think msdn is first source of info about anything made by MS, you get story behing it, api reference, samples... and then you can google out because you know what to enter in the search text box :)
grapkulec
A: 

Read the Don Box book for all you could ever want to know (and forget) about COM.

As for the purpose of COM: Whereas C++ gives you (source) code reuse, COM gives you (compiled) component reuse.

Daren Thomas
If I compile something to a DLL and told everyone to copy it to their machine, it is considered as a "compiled" component reuse right?
Ian
right, except COM goes a bit further (interface based polymorphism, reference counting for memory management etc.)
Daren Thomas
+4  A: 

To learn the very basic ideas behind COM, I've never come across anything better than Inside COM by Dale Rogerson. This is an old book, but it explains very clearly why COM is needed and how it is implemented, and you can pick up a second hand copy on Amazon.

As for the Don Box books, I've read all of them and I think they are pretty damn poor. Box neverr explains the motivation for the code he descrribes and uses deeply unrealistic examples. But I realise this is a minority opinion.

anon
I've recommended this book several times on SO. This is the place to start Ian!
Aardvark
+2  A: 

I have in my library these books on COM which I'd recommend:

  1. 1995 - Kraig Brockschmidt - Inside OLE 2nd Edition
  2. 1998 - Don Box - Essential COM
  3. 1999 - George Shepherd - Inside ATL
  4. 2000 - Andrew Troelsen - Developer's Workshop to COM and ATL 3.0
  5. 2006 - Christopher Tavares - ATL Internals : Working with ATL 8, 2nd Edition

and if you say you have some .net background there's the

  1. 2003 - Julian Templeman - COM Programming with Microsoft .NET

Hope this helps.

da_m_n
Inside OLE2 is a good one - but it is a monster.
Aardvark
A: 

Some classic books already mentioned here. I'll also throw in Designing Component-Based Applications by Mary Kirtland.

It is old (as most titles mentioned are), and is mainly aimed at Enterprise developers. It has a nice overview of COM without getting too deep in the weeds, talks about 3-tier development, discusses MTS (the book predates COM+) and its uses. It also talks about designing data and business components and walks through developing a sample application.

I'm not sure how well it has aged but I remember 10 years ago it was a great introduction to the world of COM. The strength of the book is that it assumes that you know nothing about the topic. It nicely balances theory with practical implementations in a logical progression. I think there is some ASP (classic) in there too...so for the love of all that is holy skip that part. :)

I remember that Dr. GUI had some great COM articles (e.g. Dr. GUI's Gentle Guide to COM) but was unable to track them down.

Tuzo