Visual C++ 6 Unleashed

Visual C++ 6 Unleashed

By MICKEY WILLIAMS and David Bennett

MFC Versus Active Template Libraries

Before we get into the meat and potatoes of actually coding some of these servers, it's important to understand at least a few of the reasons why Microsoft has released a set of templates for developing active components (which includes automation servers, full servers and miniservers, containers, and controls).

MFC is a great class hierarchy, but it can be too large for some types of applications. This is especially true when you're creating small active components that you want to display on your Web site. It's a real annoyance spending 20 minutes downloading support DLLs that don't need to be there. If you decide to statically link an MFC control or component, the result is a very large DLL, EXE, or OCX.

So, after much debate, it was decided that a newer, leaner class library would be created. This class library initially was released with Microsoft Visual C++ 4.2 and is called the Active Template Library (ATL).

Now, for those of you who have ever done any programming with templates from the standard C++ library, you'll appreciate the beauty of this class library. It's a great solution for creating tight DLL or EXE components, because it doesn't use MFC at all (unless you specially include it). ATL is discussed in more detail in Part VII, "Using the Active Template Library."

Share ThisShare This

Informit Network