~ubuntu-branches/ubuntu/quantal/libbonobo/quantal-201207170711

« back to all changes in this revision

Viewing changes to doc/api/html/monikers-overview.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-09-04 17:59:13 UTC
  • mto: (3.1.2 lenny) (1.1.25 upstream)
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20060904175913-oml3562yozrki3pg
Tags: upstream-2.16.0
Import upstream version 2.16.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
<p>Monikers in the Bonobo Component System.</p>
32
32
<p>Miguel de Icaza (miguel@ximian.com)</p>
33
33
<div class="refsect1" lang="en">
34
 
<a name="id2914097"></a><h2>Monikers in the Bonobo Component System</h2>
 
34
<a name="id2752783"></a><h2>Monikers in the Bonobo Component System</h2>
35
35
<div class="refsect2" lang="en">
36
 
<a name="id2914103"></a><h3>Introduction</h3>
 
36
<a name="id2752789"></a><h3>Introduction</h3>
37
37
<p>
38
38
                We recently reimplemented and fully revamped the the
39
39
                Moniker support in Bonobo.  This work has opened a
46
46
</div>
47
47
<hr>
48
48
<div class="refsect2" lang="en">
49
 
<a name="id2914730"></a><h3>Monikers - a user perspective</h3>
 
49
<a name="id2753416"></a><h3>Monikers - a user perspective</h3>
50
50
<p>
51
51
                Monikers are used to name objects, they effectively
52
52
                implement an object naming space.  You can obtain
391
391
</div>
392
392
<hr>
393
393
<div class="refsect2" lang="en">
394
 
<a name="id2915412"></a><h3>The Moniker parsing system</h3>
 
394
<a name="id2754098"></a><h3>The Moniker parsing system</h3>
395
395
<p>During parsing the Moniker stringified, Bonobo will
396
396
                use the colon-terminated prefix as the toplevel
397
397
                moniker to be invoked for the resolution process.</p>
418
418
</div>
419
419
<hr>
420
420
<div class="refsect2" lang="en">
421
 
<a name="id2915454"></a><h3>Monikers as an object naming scheme</h3>
 
421
<a name="id2754140"></a><h3>Monikers as an object naming scheme</h3>
422
422
<p>As you can see, monikers are used to implement a
423
423
                naming system that can be used to reference and
424
424
                manipulate objects.  As you might have noticed, the
449
449
</div>
450
450
<hr>
451
451
<div class="refsect2" lang="en">
452
 
<a name="id2915511"></a><h3>Creating Monikers</h3>
 
452
<a name="id2754197"></a><h3>Creating Monikers</h3>
453
453
<p>Monikers are created typically by API calls into the
454
454
                Bonobo runtime or by your own classes that implement
455
455
                monikers.</p>
456
456
</div>
457
457
<hr>
458
458
<div class="refsect2" lang="en">
459
 
<a name="id2915525"></a><h3>Object Name Space</h3>
 
459
<a name="id2754211"></a><h3>Object Name Space</h3>
460
460
<div class="refsect3" lang="en">
461
 
<a name="id2915530"></a><h4>Comparing the Moniker name space with the
 
461
<a name="id2754216"></a><h4>Comparing the Moniker name space with the
462
462
                Unix Name Space</h4>
463
463
<p> Lets start simple.  A moniker is a reference to
464
464
                    an object[1].  To actually use the object, you
517
517
</div>
518
518
<hr>
519
519
<div class="refsect2" lang="en">
520
 
<a name="id2915679"></a><h3>File Linking</h3>
 
520
<a name="id2754365"></a><h3>File Linking</h3>
521
521
<p> Monikers were originally implemented as part of the
522
522
                Microsoft OLE2 compound document system.  They can be
523
523
                used effectively by applications during drag and drop
538
538
</div>
539
539
<hr>
540
540
<div class="refsect2" lang="en">
541
 
<a name="id2915713"></a><h3>Instance initialization</h3>
 
541
<a name="id2754398"></a><h3>Instance initialization</h3>
542
542
<p>Monikers can be used to initialize objects, as a way
543
543
                of passing arguments to your object.  This is coupled
544
544
                with the Bonobo/ItemContainer interface and the Item
547
547
</div>
548
548
<hr>
549
549
<div class="refsect2" lang="en">
550
 
<a name="id2915729"></a><h3>Resolution of a moniker against an interface</h3>
 
550
<a name="id2754414"></a><h3>Resolution of a moniker against an interface</h3>
551
551
<p>A moniker can be resolved against different
552
552
                interfaces.  The resulting object might be different
553
553
                depending on the interface that is being resolved.  To
572
572
</div>
573
573
<hr>
574
574
<div class="refsect2" lang="en">
575
 
<a name="id2915775"></a><h3>Core monikers</h3>
 
575
<a name="id2754461"></a><h3>Core monikers</h3>
576
576
<p>Bonobo ships with a number of moniker handlers: the
577
577
                <code class="literal">file</code> moniker,
578
578
                the <code class="literal">item</code> moniker,
579
579
                the <code class="literal">oafid</code> moniker and
580
580
                the <code class="literal">new</code> moniker.</p>
581
581
<div class="refsect3" lang="en">
582
 
<a name="id2915808"></a><h4>The file moniker</h4>
 
582
<a name="id2754494"></a><h4>The file moniker</h4>
583
583
<p>The file moniker is used to reference files.
584
584
                    For instance:</p>
585
585
<pre class="programlisting">file:sales.gnumeric</pre>
595
595
                    supported, through the PersistStream interface.</p>
596
596
</div>
597
597
<div class="refsect3" lang="en">
598
 
<a name="id2915840"></a><h4>The item moniker</h4>
 
598
<a name="id2754525"></a><h4>The item moniker</h4>
599
599
<p>The item moniker is typically triggered by the
600
600
                    "!" string in the middle.  The item moniker can be
601
601
                    used to implement custom object naming, or
659
659
                </pre>
660
660
</div>
661
661
<div class="refsect3" lang="en">
662
 
<a name="id2915949"></a><h4>The oafiid moniker</h4>
 
662
<a name="id2754635"></a><h4>The oafiid moniker</h4>
663
663
<p>The <code class="literal">oafid:</code> moniker handles
664
664
                    activation using the Object Activation Framework.
665
665
                    This allows application programmers to activate
669
669
                </pre>
670
670
</div>
671
671
<div class="refsect3" lang="en">
672
 
<a name="id2915974"></a><h4>The "new:" moniker</h4>
 
672
<a name="id2754660"></a><h4>The "new:" moniker</h4>
673
673
<p>The new moniker requests from its parent the
674
674
                    "Bonobo/GenericFactory" interface and invokes the
675
675
                    method create_instance in the interface.</p>
718
718
</div>
719
719
<hr>
720
720
<div class="refsect2" lang="en">
721
 
<a name="id2916050"></a><h3>Adding moniker handlers to the system</h3>
 
721
<a name="id2754736"></a><h3>Adding moniker handlers to the system</h3>
722
722
<p><b>Ideal monikers:&#160;</b>There are two moniker handlers that would be
723
723
                    interesting to implement: the Configuration
724
724
                    Moniker and the VFS moniker.</p>
731
731
<p>I am convinced that this helps make the system more
732
732
                self consistant internally.</p>
733
733
<div class="refsect3" lang="en">
734
 
<a name="id2916080"></a><h4>The Configuration Moniker</h4>
 
734
<a name="id2754766"></a><h4>The Configuration Moniker</h4>
735
735
<p>The configuration moniker is invoked by using
736
736
                    the <code class="literal">"config:"</code> prefix.  The
737
737
                    string afterwards is the configuration locator.
818
818
                    Property and PropertyBag interfaces.</p>
819
819
</div>
820
820
<div class="refsect3" lang="en">
821
 
<a name="id2916224"></a><h4>Configuration transactions</h4>
 
821
<a name="id2754910"></a><h4>Configuration transactions</h4>
822
822
<p>Handling of transactional changes to the
823
823
                    configuration system can be achieved by the use of
824
824
                    the setValues interface in the PropertyBag.  The
840
840
                    component if it needs to be.</p>
841
841
</div>
842
842
<div class="refsect3" lang="en">
843
 
<a name="id2916261"></a><h4>Listening to changes.</h4>
 
843
<a name="id2754947"></a><h4>Listening to changes.</h4>
844
844
<p>
845
845
                    One of the requirements for a modern desktop is to
846
846
                    be react globally when changes are made to global
860
860
                    PropertyBag.</p>
861
861
</div>
862
862
<div class="refsect3" lang="en">
863
 
<a name="id2916289"></a><h4>What about GConf?</h4>
 
863
<a name="id2754975"></a><h4>What about GConf?</h4>
864
864
<p>GConf is a configuration management
865
865
                    infrastructure that provides the following
866
866
                    features:</p>
900
900
                    replaced with a more powerful system.</p>
901
901
</div>
902
902
<div class="refsect3" lang="en">
903
 
<a name="id2916360"></a><h4>Configuration management: Open Issues</h4>
 
903
<a name="id2755046"></a><h4>Configuration management: Open Issues</h4>
904
904
<p><b>Specifying the location for
905
905
                    configuration.&#160;</b>The syntax for accessing the configuration
906
906
                        has not been defined, but we can cook this up
971
971
                    installed in a special location.</p>
972
972
</div>
973
973
<div class="refsect3" lang="en">
974
 
<a name="id2916488"></a><h4>The GNOME VFS becomes deprecated.</h4>
 
974
<a name="id2755174"></a><h4>The GNOME VFS becomes deprecated.</h4>
975
975
<p>The GNOME VFS provides an asyncronouse
976
976
                    file-system interface abstraction that can be used
977
977
                    to access local files, remote files, files in
1012
1012
</div>
1013
1013
<hr>
1014
1014
<div class="refsect2" lang="en">
1015
 
<a name="id2916543"></a><h3>Other monikers</h3>
 
1015
<a name="id2755229"></a><h3>Other monikers</h3>
1016
1016
<p>There is another family of moniker handlers that are
1017
1017
                worth stuyding.  The filtering moniker handlers and
1018
1018
                the caching moniker handlers.</p>
1019
1019
<div class="refsect3" lang="en">
1020
 
<a name="id2916553"></a><h4>The <code class="literal">streamcache:</code> moniker</h4>
 
1020
<a name="id2755239"></a><h4>The <code class="literal">streamcache:</code> moniker</h4>
1021
1021
<p>The idea of the streamcache: moniker is to be
1022
1022
                    basically a shared library moniker handler that
1023
1023
                    provides a cache for the IDL:Bonobo/Stream:1.0
1043
1043
                    a moniker, you can get a Stream cache for free.</p>
1044
1044
</div>
1045
1045
<div class="refsect3" lang="en">
1046
 
<a name="id2916598"></a><h4>The #gunzip, #utar filtering monikers</h4>
 
1046
<a name="id2755284"></a><h4>The #gunzip, #utar filtering monikers</h4>
1047
1047
<p>The #utar moniker is a moniker that would
1048
1048
                    implement tar file decoding (the same concept can
1049
1049
                    be used for other archive formats).  This moniker
1076
1076
                    file would take a long time.</p>
1077
1077
</div>
1078
1078
<div class="refsect3" lang="en">
1079
 
<a name="id2916649"></a><h4>The propertycache: moniker</h4>
 
1079
<a name="id2755335"></a><h4>The propertycache: moniker</h4>
1080
1080
<p>Accessing individual properties over and over
1081
1081
                    might take quite some time due to the CORBA round
1082
1082
                    trips.  The propertycache: moniker would be also a
1095
1095
</div>
1096
1096
<hr>
1097
1097
<div class="refsect2" lang="en">
1098
 
<a name="id2916677"></a><h3>The accidental invention</h3>
 
1098
<a name="id2755363"></a><h3>The accidental invention</h3>
1099
1099
<p>Monikers were invented originally in OLE2 to
1100
1100
                implement Object Linking.  The OLE2 programmers
1101
1101
                accidentally invented an object naming system.</p>
1105
1105
</div>
1106
1106
<hr>
1107
1107
<div class="refsect2" lang="en">
1108
 
<a name="id2916694"></a><h3>Monikers and the GNOME VFS</h3>
 
1108
<a name="id2755380"></a><h3>Monikers and the GNOME VFS</h3>
1109
1109
<p>
1110
1110
                Some people ask: monikers look as if they are just
1111
1111
                re-implementing the GNOME-VFS, why is that?</p>
1136
1136
</div>
1137
1137
<hr>
1138
1138
<div class="refsect2" lang="en">
1139
 
<a name="id2916737"></a><h3>Open Issues</h3>
 
1139
<a name="id2755422"></a><h3>Open Issues</h3>
1140
1140
<p>We will need to research the implementation
1141
1141
                requirements for asyncronous parsing and resolution of
1142
1142
                Monikers.</p>
1147
1147
</div>
1148
1148
<hr>
1149
1149
<div class="refsect2" lang="en">
1150
 
<a name="id2916754"></a><h3>Conclusion</h3>
 
1150
<a name="id2755440"></a><h3>Conclusion</h3>
1151
1151
<p>Monikers are very powerful mechanisms that can unify
1152
1152
                the name space of objects in the system and can be
1153
1153
                used to provide a uniform access method for a wide
1164
1164
</div>
1165
1165
<hr>
1166
1166
<div class="refsect2" lang="en">
1167
 
<a name="id2916795"></a><h3>Acknowledgements</h3>
 
1167
<a name="id2755480"></a><h3>Acknowledgements</h3>
1168
1168
<p>The Bonobo moniker implementation was done by
1169
1169
                Michael Meeks.</p>
1170
1170
<p>The design for the Bonobo moniker system was done by