7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-30201A05-C6CE-5D34-9BDF-CDA4EE44878D" xml:lang="en"><title>ECom |
12 <concept id="GUID-30201A05-C6CE-5D34-9BDF-CDA4EE44878D" xml:lang="en"><title>ECom Architecture</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 Architecture</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 <p>In C++, the existence of abstract base classes and virtual functions |
14 <p>In C++, the existence of abstract base classes and virtual functions allows |
14 allows the programs to call, or access interfaces without knowing |
15 the programs to call, or access interfaces without knowing the actual implementation. |
15 the actual implementation. This mechanism gives a flexibility of writing |
16 This mechanism gives a flexibility of writing the implementation independent |
16 the implementation independent of the interface. The implementations |
17 of the interface. The implementations are known as Plug-ins. </p> |
17 are known as Plug-ins. </p> |
18 <p>When an application wishes to use a plug-in, an object is to be instantiated |
18 <p>When an application wishes to use a plug-in, an object is to be |
19 to perform the required processing. The object specifics are not known until |
19 instantiated to perform the required processing. The object specifics are not known until run-time. The general characteristics |
20 run-time. The general characteristics of the processing are known, and these |
20 of the processing are known, and these are presented as an interface |
21 are presented as an interface API. </p> |
21 API. </p> |
22 <p>In early versions of Symbian platform, implementations were provided by <xref href="GUID-6482956D-C3A3-5B68-A37F-4250C85B0D82.dita">polymorphic interface DLLs</xref>. |
22 <p>In early versions of Symbian platform, implementations were provided |
23 All the frameworks within the Symbian platform that needed to use plug-ins |
23 by polymorphic interface DLLs. All the frameworks within the Symbian |
24 had to provide own mechanisms for the clients to discover and instantiate |
24 platform that needed to use plug-ins had to provide own mechanisms |
25 the implementations. The above method resulted in duplication of functionality. </p> |
25 for the clients to discover and instantiate the implementations. The |
26 <p>The Plug-in (ECom) Framework introduces a generic framework that provides |
26 above method resulted in duplication of functionality. </p> |
27 a single mechanism to: </p> |
27 <p>The Plug-in (ECom) Framework introduces a generic framework that |
|
28 provides a single mechanism to: </p> |
28 <ul> |
29 <ul> |
29 <li id="GUID-6460F0E0-26A3-5038-B8C2-0F4706547600"><p>Register and discover |
30 <li id="GUID-6460F0E0-26A3-5038-B8C2-0F4706547600"><p>Register and |
30 interface implementations </p> </li> |
31 discover interface implementations </p> </li> |
31 <li id="GUID-4045CA55-1286-5ACD-A532-240667125469"><p>Select an appropriate |
32 <li id="GUID-4045CA55-1286-5ACD-A532-240667125469"><p>Select an appropriate |
32 implementation </p> </li> |
33 implementation </p> </li> |
33 <li id="GUID-78AE02BB-13BE-5DA0-B2F3-CC376654589B"><p>Provide version control |
34 <li id="GUID-78AE02BB-13BE-5DA0-B2F3-CC376654589B"><p>Provide version |
34 for plug-ins </p> </li> |
35 control for plug-ins </p> </li> |
35 </ul> |
36 </ul> |
36 <section id="GUID-561303EB-F0EA-4BB5-B7BB-3AE31176E79C"><title>Essentials of a Plug-In System</title> <p>A client wishes |
37 <section id="GUID-561303EB-F0EA-4BB5-B7BB-3AE31176E79C"><title>Essentials |
37 to access an object to perform some processing. The specifics of this object |
38 of a Plug-In System</title> <p>A client wishes to access an object |
38 are not known until run-time. The general characteristics of the processing |
39 to perform some processing. The specifics of this object are not known |
39 are known, and are defined in an interface, but several variants of required |
40 until run-time. The general characteristics of the processing are |
40 processing could exist, which are provided by implementations that support |
41 known, and are defined in an interface, but several variants of required |
41 the interface. </p> <p>There are four clearly-defined roles in such a system. </p> <ul> |
42 processing could exist, which are provided by implementations that |
42 <li id="GUID-B77969AC-EE5C-53C1-8906-07CF3B2BD11A"><p>The <b>Client</b> that |
43 support the interface. </p> <p>There are four clearly-defined roles |
43 wishes to access services. </p> </li> |
44 in such a system. </p> <ul> |
44 <li id="GUID-2E175B1C-7A50-5A00-BBF6-C54F2FC71FFA"><p>The <b>Interface API</b> that |
45 <li id="GUID-B77969AC-EE5C-53C1-8906-07CF3B2BD11A"><p>The <b>Client</b> that wishes to access services. </p> </li> |
45 defines how to request services. </p> </li> |
46 <li id="GUID-2E175B1C-7A50-5A00-BBF6-C54F2FC71FFA"><p>The <b>Interface |
46 <li id="GUID-C8F67E1A-2175-5093-BCFD-06BD90EF59C6"><p>The <b>Interface Implementation </b> that |
47 API</b> that defines how to request services. </p> </li> |
47 provides the required processing. </p> </li> |
48 <li id="GUID-C8F67E1A-2175-5093-BCFD-06BD90EF59C6"><p>The <b>Interface |
48 <li id="GUID-A6817508-C5D1-5A7A-B50A-667272292362"><p>The <b>Framework</b> that |
49 Implementation </b> that provides the required processing. </p> </li> |
49 provides the clients with the required access to the implementations. </p> </li> |
50 <li id="GUID-A6817508-C5D1-5A7A-B50A-667272292362"><p>The <b>Framework</b> that provides the clients with the required access to the implementations. </p> </li> |
50 </ul> <p>The relationships can be represented as follows: </p> <fig id="GUID-185BDADA-4576-5175-B53B-03C2633E9EA0"> |
51 </ul> <p>The relationships can be represented as follows: </p> <fig id="GUID-185BDADA-4576-5175-B53B-03C2633E9EA0"> |
51 <title> Plug-in relationships </title> |
52 <title> Plug-in relationships </title> |
52 <image href="GUID-F78F12AE-64CA-50BD-A715-8F254FBDB793_d0e214506_href.png" placement="inline"/> |
53 <image href="GUID-F78F12AE-64CA-50BD-A715-8F254FBDB793_d0e220526_href.png" placement="inline"/> |
53 </fig> <p>The instantiation mechanism forms the backbone of such a system, |
54 </fig> <p>The instantiation mechanism forms the backbone of such a |
54 and is responsible for providing the services that identify, and load the |
55 system, and is responsible for providing the services that identify, |
55 correct interface implementation at run-time. ECom is such a framework. </p> <p>We'll |
56 and load the correct interface implementation at run-time. ECom is |
56 now look at the system from the perspectives in turn of each of the interface |
57 such a framework. </p> <p>We'll now look at the system from the perspectives |
57 client, interface implementation, and interface definition, before summarising |
58 in turn of each of the interface client, interface implementation, |
58 the functions of the ECom. </p> </section> |
59 and interface definition, before summarising the functions of the |
|
60 ECom. </p> </section> |
59 </conbody></concept> |
61 </conbody></concept> |