An Overview of ActiveX Charlie Kindel Architect & Chief Technical Advisor Microsoft Developer Relations Group
Dec 21, 2015
An Overview of ActiveX
Charlie KindelArchitect & Chief Technical AdvisorMicrosoft Developer Relations Group
What is ActiveX?
A marketing name for a set of technologies and services, all based on the Component Object Model (COM)
It’s just COM! “DCOM” is just COM with a longer wire
Wanted: Software Components
“Active wave” requires applications, content, operating systems, networking, distributed services to be integrated as never before
Monolithic solutions won’t work No one vendor or one team of programmers can
move fast enough Need to leverage others’ work and to build and
ship smaller pieces incrementally Need to evolve smaller pieces asynchronously
without sacrificing the whole
Solutions… “WOSA” architecture was Microsoft’s 2nd
generation component technology API (often with different “levels”) System (Microsoft) -supplied intermediary DLL
with out-of-band management routines SPI for real components/servers to plug in
“underneath”
Works great (e.g. ODBC) but has crucial limitations No safe decentralized extension or evolution
COM: 3rd Generation Components
Unified programming model Between OS and apps — unification of system
handle-based “objects” and variety of app models Between in-process and remote interaction —
unification of DLLs and RPC
Standards for binary deployment, connection Software pieces or “components” find and connect
to each other through clearly defined interfaces
Solves fundamental problems of software integration, independent evolution
Examples
Manufacturing process controlControls on the Interent/Intranet
clientComponent based server applications
Active Server Pages Microsoft Transaction Server (Viper)
Multi-tier “client/server” applications
3 Tier Client/Server
Third-Tier - Databases, Legacy Data
COM
SNAetc...
CORBA
Mid-Tier - HTTP, Biz Objects, Active Server Pages, Scripting
COM
HTTP
“Desktop” - Compound Documents, Controls, Scripting
ActiveX Builds on COM
COM’s initial thrust: integrating desktop applications with OLE
COM technology is generically useful, being applied to a range of other areas Inherently distributed
1000’s of shipping, commercially available, products.
World class development tools VB, VC, VJ, Delphi, PowerSoft…
Who Benefits?
Independent software vendors Build components in any language, any
development process Sell independently or in bundles No central coordination required
Corporate developers Buy from competitive market rather than build Large projects benefit from component discipline
Anyone doing software integration
COM Fundamental PrinciplesWhat the designers of COM were striving for...
Binary components Any programming language Any location (in-process, cross-process,
cross-machine) No centralized authority
Zero sacrifice in-proc performanceSimplest model possible
Enable extensibility and adaptability
COM Principles
Rigorous Encapsulation Black box -- no leakage of
implementation details All object manipulation through strict
interfacesPolymorphism
via multiple interfaces per class “Discoverable”: QueryInterface COM
Object
IUnknown
IRobot
IDispatch
Isn’t COM about “Objects”?
No … COM sets out to solve system software problems that arise when hooking up randomly evolving combinations of binaries
Yes … from the perspective of these new kinds of objects also called “components” Traditional object concepts used (but adapted) to
solve a different (but overlapping) set of requirements in a different problem space
Component services can be called more naturally from O-O languages
Systems OT complements language OT
COM Architecture
ClientClient ComponentComponent
InprocessInprocess
COMCOMrun timerun time
providerproviderSecuritySecurity
RPCRPC
COMCOMrun timerun time
SecuritySecurityproviderprovider RPCRPC
LocalLocal
LPCLPCProtocol stackProtocol stack Protocol stackProtocol stack
DCOM network-DCOM network-protocolprotocol RemoteRemote
Distributed COM
Just COM “with a longer wire”All COM components communicate in the
same way on the same machine
In-process, Out-of-process
across a Local Area Network across a Wide Area Network across the Internet
Same tools, knowledge, code
Distributed COM
Wire Protocol Based on DCE RPC Specification
Interoperable with OSF DCE RPC implementations
We call it “ORPC” Efficient and Scalable Documented in Internet-Draft
ftp://ietf.org/internet-drafts/draft-brown-dcom-v1-spec-01.txt
The COM “ORB”
The “model” is about how the technology is used
The “ORB” is how it’s implemented We call it the COM Runtime
Pluggable Transports
COMCOMClientClient
COM Runtime ArchitectureFlexible and extensible
Component
CO
M R
unti
me
Server MachineClient Machine
TCP, UDP
SPX,IPX
Net BUI
HTTP
“Falcon”CO
M R
unti
me
Proxy
Other Component
Pluggable Security Providers
COMCOMClientClient
COM Runtime ArchitectureFlexible and extensible
Component
CO
M R
unti
me
Server MachineClient Machine
DCE
NT Kerberos
SSL, Certs.
NTLM
CO
M R
unti
me
Proxy
Other Component
ServerServerClientClient
Efficient and Scalable
Multiplexing - Single Port per-protocol, per server process, regardless of # of objects
Scalable - Connection-Less Protocols like UDP Preferred
Established Connection-Oriented (TCP) Sessions Reused by same client
ClientClient
Server MachineServer MachineClient MachineClient Machine
ServerServerClient #1Client #1
Client #2Client #2
Keep-Alive TrafficKeep-Alive Trafficfor all for all
connectionsconnections
Logical
“
Logical
“Connec
tions
Connectio
ns””
or “Ses
sions”
or “Ses
sions”
Efficient and Scalable
Low Bandwidth Header is 28 bytes over DCE-RPC Keep-Alive Messages bundled for all
connections between Machines
COM Runtime Architecture
Secure - Security is designed and built in. Not an option.
Inherently DistributedPluggable
Security Transports
The COM “ORB”
Highly debugged and tuned The COM Runtime first shipped in 1993 Used by 1000s of commercial
applicationsAvailable today on Win95, NT, Solaris
DEC UNIX, HPUX, Linux, MVS, VMS, Mac, and others rolling out this year
The COM “ORB”
Full source code licensable from The Open Group (formerly OSF and X/Open) With conformance test suite
Free! (Built-into Win32 Platforms) No separate client access license or
expensive “developer” version
Structure of the COM “ORB”
The COM Runtime
COM and Distributed COM Registry
Pluggable Security(SSPI)
NTLMKerberos
Pluggable Transports DCE
MS-RPC
TCP UDP IPX SPX HTTP “Falcon”ETC...
Core Services(Automation, Monikers, Storage, ComCat, Data Transfer, IR)
Components and ApplicationsComponents and Applications
Core COM Services
SecurityLifecycle
ManagementType Information
(Interface Repository)
Monikers (Naming)Automation
(Dynamic Invocation)
Data TransferComponent
CategoriesRegistry
So What is ActiveX?
A marketing name for a set of technologies and services, all based on COM (the model, the “ORB”, and the services)
Internet Explorer 3.x/4.xInternet Explorer 3.x/4.x
HTML contentHTML content(text and images)(text and images)
HTTP HTTP serverserver
HTTPHTTP
ActiveX Control ActiveX Control or Java applet or Java applet downloaddownload
ActiveX Control ActiveX Control or Java appletor Java applet
COM objects or COM objects or ActiveX ControlsActiveX Controls
(D)COM(D)COM
COM objects or COM objects or ActiveX ControlsActiveX Controls
ActiveX ScriptActiveX Script
User Experience: How It Works
Active Components
ActiveX Controls Are COM components with “design-time” UI Can be written in C++, Java, VB, Delphi, ... Self-registering Optimized for download and execute
Java applets Simple applications
Work on both Active Client or Server Can talk indirectly over HTTP or directly over COM
Microsoft Java VM
Java VM is a COM component Use Java classes from any
application/language, not just browser/Java Any Java object is a COM object
Automatic integration of Java applets with other languages and scripts Lets Java applets talk to other Java applets Lets Java applets talk to ActiveX
components Gives Java applets access to all PC
functionality
Transaction Server“Viper”
Runtime executionenvironment for server-based components
Extends COM archi-tecture with transactionsemantics
Provides concurrency,multi-threading, queuing, atomicity, etc.
Makes is easy to encapsulate business logic in middle-tier
ActiveX Core Product Status
“D”COM first released in Windows NT 4.0, August 1996
Win95 version released January 1997Solaris 2.x release imminent
Other UNICES, MVS, and VMS to follow
Macintosh version in H1 1997Active Group source licenses available by
mid-1997; DCE integration project by end of 1997
Resources Great Overview Book
Understanding ActiveX and OLE (by David Chappell)
Implementations Win95 version
<http://www.microsoft.com/oledev/> Solaris and other non-Win32 versions
<http://www.sagus.com/>
Technical info <http://www.microsoft.com/workshop/> and
<http://www.microsoft.com/oledev/> Inside COM (by Dale Rogerson)
Mailing list http://www.microsoft.com/workshop/resources/email.htm