ATL Development   «Prev 

Development Frameworks

Most of our time has been spent studying COM's core concepts. We are now moving towards a study of standard COM implementation practices. Most, if not all, COM developers use a development framework to support their development efforts. The most popular C++-based development frameworks are the Microsoft Foundation Classes (MFC) and the Active Template Library (ATL). ATL is the focus of our study.
A development framework differs from a class library in that it defines the structure of an application or component. Developers add code by "hooking" the framework. In ATL this means that you provide an application-specific class that derives from classes in the framework, and override virtual functions from the base classes. When the framework code calls these functions, the call is directed into your code. Additionally, ATL requires specific data structures at the global and class levels. ATL makes it very easy to add these structures via a set of high-level macros.
Visual C++ provides code-generators for ATL - an "App-Wizard" and an ATL-class tool. Using these a skeleton COM server and COM object can be created. You can simply fill in the methods generated by the tools. This allows you to concentrate on the details of developing application code, instead of worrying about all the COM and ATL code.
However, I highly recommend that you take the time to understand and differentiate between what the tools do and what ATL does. In other words, analyze the code generated by the tools, try to develop a basic understanding of ATL's core classes and how they support COM. I believe that these efforts will really pay-off when you need to customize and deploy advanced ATL-based COM solutions.