Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating visual components for use in VB
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00126337
Message ID:
00126808
Views:
22
>Yes and no. Is the difference just a naming difference or are there any differences between the interfaces supported, etc. The more I read about ActiveX/COM/OLE/etc, the less I understand where's the difference between ActiveX and COM. Is there any?

Depends on how you look at it. COM is a very low level mechanism. The very
basics of COM are described a handful of small interfaces (actually it all comes
down to one).

ActiveX is just a term. I think what you're really after is the difference
between a COM object and an ActiveX control. ActiveX controls must support a
very specific set of COM interfaces that allow controls to be hosted inside
of a control container like Visual FoxPro. There are interface for displaying
the UI of the control (if it has any), there are interfaces for standard
properties, and there are interfaces for the property sheet (and a few others
that are optional but usually implemented). Really, an ActiveX control is
just a very special kind of COM object that follows specific rules.

Plain COM objects are typically more flexible in that you can create the
object as needed. You're in full control of the interfaces. With Visual FoxPro
we're somewhat limited as all our servers automatically implement only
IDispatch compatible interfaces, but pure COM interfaces built in C++ can
pretty much do whatever they want as long as they follow the basic rules
of COM.

The bottom line is this: COM servers are meant to be for system and application
(business logic) layers. Think of them as non-visual classes (they can be
visual, but there are good reasons to avoid UI in them). ActiveX controls are
meant to be UI centric or focused on being controlled through scripting in
a browser. They must use IDispatch compatible types (ie. no pointers or
structures can be passed from container to control) There's a certain amount
of overhead for ActiveX controls that may not apply for COM objects. Building a
COM server and ActiveX control that do the same thing you're likely to get a
more lightweight server than ActiveX control.

Choose ActiveX if you: want to redistribute your creation to many people. The
ActiveX control interface is self documenting. Property sheet support makes
it easy for end users. If you need a user interface, use ActiveX. If you're
building non-UI pieces that need optimal performance or interact tightly with
Windows build a COM server.

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform