Recommended Book on COM :: C++

This is a discussion on Recommended Book on COM :: C++ within the Windows Programming forums, part of the Platform Specific Boards category; not at all. ATL is a framework for building COM objects that is using templates. STL is a set of ...

  1. #31
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    not at all.

    ATL is a framework for building COM objects that is using templates.

    STL is a set of templates for general use with commonly used algorithms and storage types.

    very different things, just happen to have similar acronyms
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  2. #32
    Registered User
    Join Date
    Oct 2002
    Posts
    6
    A few points:

    1) COM (Component Object Model) is not DDE (Dynamic Data Exchange). If you've heard bad things about the early days of COM its probably due to DDE. There is nothing wrong with COM.

    2) DCOM is Distributed COM. It adds a new threading model and the ability to create and use objects created on a remote machine. It's COM, with a few extra features.

    3) COM+ added another threading model, increased security, and a bunch of features useful for creating objects that expose interfaces to data stores (an area I'm not especially familiar with). It's DCOM, with a few extra features.

    4) ActiveX (formerly OLE, which was originally implemented using DDE - hence the bad rap) is a set of standard COM interfaces. Using these interfaces an application can "host" a control implemented by another app (i.e. inserting an Excel spreadsheet in a Word doc). Its COM put to good use.


    Notice that items 2, 3 and 4 are all built on COM. An interest in any one of them is going to require a solid understanding of COM.

    COM is a standard for creating interfaces to objects. The standard defines a binary structure for the interfaces as well as an interface all COM objects must implement called IUnknown. The standard also defines the behavior of the methods of the IUnknown interface.

    Why COM? Why not just use C++ to create a base class with nothing but pure virtual member functions, a derived class that implements the member functions, and a pointer to the derived class for an interface? In it's most simplistic form that's all a COM object really is (a COM object being an implementation of one or more COM interfaces). But COM adds increased levels of abstraction. COM allows you to serve up the object from either a DLL or an EXE. The method of containment you choose is invisible to the application that uses the object. And where that container exists is also hidden. A client application doesn't need to know anything about where the object comes from or how it's implemented (loose coupling). In the realm of Software Engineering these properties are generally filed under "desirable". Trying to accomplish this same level of abstraction on your own is quite a bit of work.


    If COM sounds interesting read the book recommended earlier in this thread. When I first saw it I already had a pretty solid understanding of COM. I bought it anyway. It explained the fundamentals of COM so well I just had to own it.

  3. #33
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    I hear about COM. I hear about its complexity. Nonetheless, I have never seen real COM implementation in pure C++.

    Do Inside COM (Programming Series) by Dale Rogerson and Essential COM by Don Box go over examples?

    Kuphryn

  4. #34
    Registered User
    Join Date
    Oct 2002
    Posts
    6
    I can't speak for "Essential COM" since I've never read it but "Inside COM" starts at the beginning, the very beginning. It'll cover what COM is and why it exists. Page 15 begins coverage of COM interfaces (using plain C++). Chapters 3 and 4 cover the IUnknown interface and present a simplistic (again plain C++) implementation of the methods of IUnknown. Later chapters cover class factories, aggregation, in process and out of process servers, the IDispatch interface and Automation, and threading. The book does not use ATL or MFC. You end up understanding everything you need to implement a COM object by hand.

    What makes the book so great is that it starts simple. Each chapter adds another piece of the pie and each piece is small enough to swallow.

    kuphryn: If you happen to see it in a book store open up to page 18 and I think you'll like what you see. And it has plenty of examples.

  5. #35
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Okay. Thanks.

    For some reason, Amazon does not carry new copies. Although I am not completely sure that is true, but I do know the listed price is "$12.99." I know that is definitely not the price for a new copy.

    I buy books from Amazon because I live in California and do not have to pay tax. Secondly, Amazon ships out the book very quick.

    Is B.N. as good as Amazon?

    Kuphryn

  6. #36
    Registered User
    Join Date
    Oct 2002
    Posts
    6
    B&N is fine. I buy most of my books from them. But they also don't seem to have any new copies in-stock (online anyway, I know the store front near my home has one new copy on the shelf). I bought my copy new for $35.00 USD. That was about a year and a half ago.

  7. #37
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    The Mark Michaelis book I mentioned earlier starts out with coding up COM with no wizards or other short cuts - all by hand. It then goes on to show how the tools are used what they can, and can't do.

    Something that struck me after one of my earlier responses in this thread, is that COM+ really started with Win2000. The simpler COM stuff works with 9x and NT4, COM+ specific stuff will not.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  8. #38
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Okay. Thanks.

    Inside COM fairly recent. I wonder why book stores do not carry new copies?

    Kuphryn

  9. #39
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812

    Do you still wanna learn COM?

    Sorry to bump an old thread, but I put out some questions on a different board & I thought the answers were relevant, especially no.2. Also I put out a similar question on the C# board of this site, and got the same answer.

    Do you still wanna learn COM?


    [1. What is COM+? How does it differ from COM? What are the advantages/disadvantages over COM?]

    COM+ is a System Services formerly known as MTS (Microsoft Transaction Services). It's an application server, not much unlike Java Application Servers which hosts in-process dll's and provides them with features needed for enterprise deployment like: object pooling, multiDB/MSMQ transactions, Role Based Security, etc.
    MS doesn't make life ease for developers by giving their old products a new name with every versions change. COM is the worst example: OLE, Automation, COM, ActiveX, MTS, COM+. Despite the buzzwords, the fundamental technology stays the same(COM).



    [2. I understand that COM is supported in .NET to limited degree, and only for backward compatibility? Is this correct?]

    jeah that's right, and therefore you should avoid by any means learning anything about the over complicated and much misunderstood technology COM

    The CLR introduces a new Component architecture superior to COM with garbage collection and all of the new CLR features. Since there is a $trillions of investment out there written with COM technology MS must support COM in the near future. That's what they are doing, When the .NET runtime went from Beta to Release there were a lots of fixes added for making use of old technology (like the good old ADO Recordset) easier from .NET.

    So it is correct that COM is not a first class citizen in .NET and it's a becoming a legacy technology.

  10. #40
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Interesting. Okay. Thanks.

    Kuphryn

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recommended C#/.NET Book
    By kuphryn in forum C# Programming
    Replies: 4
    Last Post: 04-23-2004, 10:21 AM
  2. Books on C and C++
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-28-2002, 04:18 PM
  3. Recommended book for DirectX?
    By Dual-Catfish in forum Game Programming
    Replies: 3
    Last Post: 05-26-2002, 11:23 PM
  4. any recommended exercise book for C++?
    By gogo in forum C++ Programming
    Replies: 5
    Last Post: 11-07-2001, 04:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21