REVIEW - Beginning ATL 3 COM Programming


Title:

Beginning ATL 3 COM Programming

Author:

Richard Grimes, Julian Templeman, George Reilly, Alex Stockton

Publisher:

Apress (1998)

Pages:

521pp

Reviewer:

Francis Glassborow

Reviewed:

August 1998

Rating:

★★☆☆☆


The Standard Template Library dramatically enhanced C++. It provided a generic set of components and algorithms to manipulate those components. The World of C++ has never been the same since. Prior to 1994 the concept of a library was largely one of functions together with class hierarchies. Examples such as MFC and OWL dominated our vision. The adoption of the STL changed all that. Those responsible for the STL hoped that it would set an example for others to follow.

With the release of the Active Template Library (ATL) Microsoft shows that they have noticed something outside their own proprietary world. Microsoft have been campaigning to get their COM (Common Object Model) concept widely adopted. Probably the best known part of this marketing exercise is the promotion of ActiveX controls.

The concepts of COM are heavy going, and getting the details right so that your objects function as expected is time consuming and demanding of a lot of tedious work. That makes it a prime candidate for some form of automation and code generation.

There are two distinct mechanisms available in C++ for reusing various aspects of design and code. The first of these is inheritance. In the right hands it is a powerful tool for building on the work of others. Much more recently templates have been added. While inheritance allows you to provide alternative implementations (both ships and lorries are vehicles but the way their movement is implemented is different), templates allow you to provide the same code (implementation) to different objects (for example the coding of a linked-list is virtually independent of the type of object in the list).

MFC and the wizards that apply it is an example of the use of inheritance (not a good one in my opinion, but that is a different issue). ATL is an example of using template technology to ease the writing of COM components. You will need some basic understanding of COM (quite a lot if you want to leave the paths that Microsoft have provided). You will also need a general grasp of template technology (and more particularly, the experience to interpret the arcane error messages generated by compilers when template code goes wrong) as well as the specifics of ATL.

This book (despite the 'Beginning' in its title) is aimed at experienced C++ developers. By the time you have absorbed chapter 1 you will be ready to appreciate how much good code generators can offer you. The rest of the book leads you through to reasonable competence at using the ATL to develop COM components.

The book is well written and readable (despite Microsoft's magic incantations that they fondly consider to be a sensible set of naming conventions - I do wish they would learn about namespaces because that is where such things as the ATL and MFC belong.) If you just bought your first C++ compiler and want to jump in to learn all about the latest technology you should think again. The ATL is not for the first time user. Buy a good book on C++ and study that first. Then study a Windows component library (I guess most will default to MFC ) only then are you ready to think about ATL and COM. At that stage this book would be helpful.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.