ECOM
Article Metadata
C++ provides through abstract base classes and virtual functions the means for programs to call interfaces without knowing the class that is implementing that interface. Similarly, at a binary, rather than a source level, Symbian OS has used extensively polymorphic DLLs, which implements a specified interface, and so allows new functionality to be added to existing programming frameworks. Polymorphic DLLs, however, required each framework that uses them to provide its own mechanisms for clients to discover and instantiate the available implementations. ECom removes this duplication of functionality by introducing a generic framework that provides single mechanisms to:
- register and discover interface implementations
- select an appropriate implementation to use
- provide version control for plug-ins
To show how ECom does this, let's recap the essentials of any plug-in system.
A client wishes to access an object to perform some processing. The specifics of this object are not known until run-time. The general characteristics of the processing are known, and are defined in an interface, but several variants of required processing could exist, which are provided by implementations that support the interface.
There are four clearly-defined roles in such a system.
- the client that wishes to access services
- the interface that defines how to request services
- the interface implementation that provides the required processing
- the framework that provides clients with access to the implementations
The relationships are shown in a UML diagram below:
The instantiation mechanism forms the backbone of such a system, and is responsible for providing the services that identify, and load the correct interface implementation at run-time. ECom is such a framework.
The full guide to ECOM can be found in Symbian's Developer Library documentation here



Shows quite a resemblance to the ECOM guide provided by Symbian's Developer Library documentation including a copy of the diagram.
This material should not be reproduced with acknowledgement of the original, so I've added a link to it.
Thanks, Jo! Do you think we should entirely remove the "original" content from here? And just leave the link at the bottom. Although that would obviously introduce an external dependency on Symbian's web site.
I think it's OK to leave in this case. I normally remove if it's a direct copy, but this text has been modified in places and those changes enhance the explanation of the original. So a link is fine AFAICT. But thanks for checking!
28 Sep
2009
From Symbian OS v7.0 onwards, the ECom plug-in architecture can be used as an alternative to polymorphic DLLs. Before using ECom plugin, it is necessary to understand the concept of ECom architecture. The article is very useful to understand ECom architecture. ECom plugin is considered as alternative to Polymorphic DLL. Also writing an ECOM Plugin is far more simple than writing a polymorphic dll.