Proposed Magazine Articles

Implementing Dynamic Delegation using COM, C++ and Microsoft's Java (J++)

As Coplien and others have pointed out, defining a seaplane to be a kind-of-a boat and a kind-of-plane may not be the most effective use of the inheritance feature in C++. This is because we are dealing with state changes and inheritance is a static relationship between classes. A more effective approach is to define a seaplane as a class that dynamically delegates to class boat or plane, depending on the state (i. e., whether it is airborne or water-borne). We run into similar problems whenever we try to model anything that has state. Other examples include idle, dialing and connected telephone lines, and (my favorite) space shuttles that are sometimes rockets, satellites, gliders or land vehicles.

Top
Home

Using ATL Controls to Connect to Remote Servers

Normally controls are self-contained and use COM to communicate with their local containers (e. g., browsers, Visual Basic dialog boxes). To harness their full power, however, this article explores several approaches to establishing remote connections with DCOM Servers -- including other controls.

Top
Home

Windows, Threads and the ActiveX Template Library

We often take threads for granted, but Win32 imposes some very interesting challenges when we consider memory managment and windows inside COM servers. This article explains the different kinds of threads, when to use them, how to create them, and, most importantly, how to shut them down gracefully when using the ActiveX Template Library.

Top
Home

MFC Template Containers and Serialization

This three part article explains the subtle issues of using and serializing the MFC Template Container classes. (Unfortunately, this can be very perilous for the uninitiated.) We will examine Microsoft's strange approach to optimization and iteration and propose some basic improvements (such as copy constructors) that can be implemented in descendant classes. Lastly, this article compares the Template MFC Containers with the Standard Template Library and the earlier inheritance based containers. Of course, this article discusses vital issues not found in any tutorial.

Top
Home

Why COM?

The typical textbook approach of using C++ to implement custom interfaces for COM can make COM seem horribly complex to the beginner. This article explores the merits and alternatives to COM server programming in C++ and explains why and how to implement a function in COM.

Top
Home

COM Client Programming in C++

The typical textbook approach to learning COM with C++ is to immediately dive into implementing custom COM servers as described in a previous article. Aside from the fact this can be overwhelming, it abandons the key aspect of object-orientation: code reuse.  And lastly, one should not ignore the obvious: before diving into writing your own server object, one should, as a matter of general principle, examine what classes have already be implemented for you. This article examines the basic aspects of COM client programming in C++ and focuses on using classes already implemented for us.

Top
Home