Symbian
Symbian OS Library

FAQ-1179 What support does Symbian OS provide for a generic object-factory (plug-in) framework ?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Documentation
Created: 12/06/2004 Modified: 01/17/2005
Number: FAQ-1179
Platform: Symbian OS v7.0, Symbian OS v7.0s, Symbian OS v8.0, Symbian OS v8.0a, Symbian OS v8.0b, Symbian OS v8.1a, Symbian OS v8.1b, Symbian OS v9.0

Question:
Is there any support in Symbian OS for facilitating your own dynamically extensible 'pluggable' framework?



Answer:
ECOM is the Symbian OS object-factory framework (or object model). It is synonymous to the COM architecture on Windows OS.

    The following is offered by ECOM:
    • Framework to register implementations (using .rss files).
    • Mechanism to discover (resolving) and create (loading) an implementation (and the interface) based on supplied data.
    • Garbage collection of objects (generic destruction mechanism)
    • Object defaulting if no valid implementation of a given interface could be found.
    • Coexistence of more than one implementation.
    • Customization of the object resolver interface (Symbian provides a default resolver)

    The ECOM framework can be used by any user wishing to provide a means of instantiating objects for their interface. The interface will be published by the user (the Interface provider) and the implementors will provide the specific implementations. By using ECOM a user can avoid code-bloat and concentrate on the actual interface definition as opposed to how the implementation(s) are going to be invoked and managed. Further information on the ECOM framework can be found here. SDKs also contain example code which can be found under ...\Examples\appprots\ecom\.

    Note that ECOM loads the (implementation) DLL and creates the objects in the client thread (thus objects are not thread safe) - though the registration and resolving of objects is done in the ECOM server which runs in its own process. Moreover, ECOM has no concept of singleton objects (be it thread or process bound).