Thursday, September 15, 2005


Those of you who have been writing applications for more than a couple of years probably recall a technology called ActiveX.

ActiveX was never really well defined. It kind of grew out of VBXes and OLE Controls as a kind of catch-all component term. ADO stood for "ActiveX Data Objects". ATL stood for "ActiveX Template Library". Still, over time, we calmed down and ActiveX was subsumed by COM in the general mindset, and COM we all understand, right?

ActiveX became a synonym for OLE, which isn't COM; it's built on COM, as a means to perform object linking and embedding. Much like you can drop .NET components into a Windows Forms designer or a Web Forms designer today, you could drop ActiveX components into a VB6 form designer.

You could also - and this is the killer functionality - embed into Office. Everything from Windows Write and WordPad up to PowerPoint supported embedded ActiveX objects. Equation editing, Excel embedding in Word, org charts, and the Binder.

Now, this might be memory-lane stuff for you, but bear with me.

What happened to this functionality? Well, it's still there - but in order to do it, you still have to use ActiveX. Where's our promised Windows Forms hosting in IE? Okay, it's possible, but point me to an Internet site that actually uses it. And what about Word? I'm sure I could care less about Word 12's "open XML", but I'd have to work at it. I want to be able to embed into Word, and ActiveX is still the only game in town.

The trouble is that ActiveX is truly horrible. ATL does its best, bless it, to ease the pain, but ultimately the technology needs a complete rework. The average ActiveX control has to implement a dozen interfaces, needs extensive boilerplate code, and has severe limitations on presentation.

If you need to work in Word, you've got a real problem. Word doesn't use IViewObject to display ActiveX controls. Word uses IDataObject, instead, to render the control into a Windows metafile (not an enhanced metafile). No font embedding, no gradient fills, no fancy context-sensitive interaction. When you load a Word document with an ActiveX control in it, Word just plays back the metafile - the control isn't even loaded.

No wonder Microsoft gave up on the ActiveX Control Host for .NET controls.

OLE is fifteen years old, having been released with Windows 3.0 and Write, and we still don't have anything in Microsoft Word 2006 to replace it. IE still relies on ActiveX to provide everything from Flash to the MSN Messenger installer and Windows Update. ActiveX and OLE are not secure, are not portable, are actually incompatible with .NET, and are inhibiting the development of applications for end-users.

Sometimes I think that Microsoft forgets that Word is used by people to write letters, essays and reports - and that developers would like to target that market, too.


Post a Comment

Links to this post:

Create a Link

<< Home