ActiveX Controls

Finally, let's look at ActiveX controls. These are yet another type of component, but one that's typically used to create visual objects as part of an interface design. Some ActiveX controls are invisible; but if we get right down to it, there's very little difference between an invisible ActiveX control and a regular in-process server.

Business objects can be placed in an ActiveX control just as easily as they can be placed in an in-process server. Many developers may find it easier to work with objects packaged in this type of component, since they can literally drop the component on a form and work with it from there - just as if it were a regular control.

Also, ActiveX controls can be very powerful in a Web application. Microsoft's Internet Explorer will automatically download and install controls, but not in-process servers. This makes it far easier to include a control into a Web page than to include an in-process server.

One significant drawback to ActiveX controls is that they require our client programs to have at least one form that can be a container to hold the control. More than simply having to include the form in the project, we actually have to have the form loaded in memory in order to gain access to the objects inside the control. This is somewhat less efficient than getting the objects directly from an in-process server.