~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: 2009-03-06 18:53:16 UTC
  • mfrom: (1.1.25 upstream) (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090306185316-uf09r30g7cvf67xi
Tags: 2.24.1-1
* New upstream bugfix release.
* debian/control.in:
  + Build depend on GLib >= 2.14.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Monikers in the Bonobo Component System</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.2">
7
7
<link rel="home" href="index.html" title="Libbonobo Reference Manual">
8
8
<link rel="up" href="monikers.html" title="Monikers">
9
9
<link rel="prev" href="monikers.html" title="Monikers">
32
32
<p>Monikers in the Bonobo Component System.</p>
33
33
<p>Miguel de Icaza (miguel@ximian.com)</p>
34
34
<div class="refsect1" lang="en">
35
 
<a name="id2807681"></a><h2>Monikers in the Bonobo Component System</h2>
 
35
<a name="id3047950"></a><h2>Monikers in the Bonobo Component System</h2>
36
36
<div class="refsect2" lang="en">
37
 
<a name="id2807687"></a><h3>Introduction</h3>
 
37
<a name="id3047956"></a><h3>Introduction</h3>
38
38
<p>
39
39
                We recently reimplemented and fully revamped the the
40
40
                Moniker support in Bonobo.  This work has opened a
47
47
</div>
48
48
<hr>
49
49
<div class="refsect2" lang="en">
50
 
<a name="id2807706"></a><h3>Monikers - a user perspective</h3>
 
50
<a name="id3047975"></a><h3>Monikers - a user perspective</h3>
51
51
<p>
52
52
                Monikers are used to name objects, they effectively
53
53
                implement an object naming space.  You can obtain
367
367
</div>
368
368
<hr>
369
369
<div class="refsect2" lang="en">
370
 
<a name="id2808997"></a><h3>The Moniker parsing system</h3>
 
370
<a name="id3049266"></a><h3>The Moniker parsing system</h3>
371
371
<p>During parsing the Moniker stringified, Bonobo will
372
372
                use the colon-terminated prefix as the toplevel
373
373
                moniker to be invoked for the resolution process.</p>
394
394
</div>
395
395
<hr>
396
396
<div class="refsect2" lang="en">
397
 
<a name="id2809039"></a><h3>Monikers as an object naming scheme</h3>
 
397
<a name="id3049308"></a><h3>Monikers as an object naming scheme</h3>
398
398
<p>As you can see, monikers are used to implement a
399
399
                naming system that can be used to reference and
400
400
                manipulate objects.  As you might have noticed, the
423
423
</div>
424
424
<hr>
425
425
<div class="refsect2" lang="en">
426
 
<a name="id2809097"></a><h3>Creating Monikers</h3>
 
426
<a name="id3049366"></a><h3>Creating Monikers</h3>
427
427
<p>Monikers are created typically by API calls into the
428
428
                Bonobo runtime or by your own classes that implement
429
429
                monikers.</p>
430
430
</div>
431
431
<hr>
432
432
<div class="refsect2" lang="en">
433
 
<a name="id2809111"></a><h3>Object Name Space</h3>
 
433
<a name="id3049380"></a><h3>Object Name Space</h3>
434
434
<div class="refsect3" lang="en">
435
 
<a name="id2809115"></a><h4>Comparing the Moniker name space with the
 
435
<a name="id3049384"></a><h4>Comparing the Moniker name space with the
436
436
                Unix Name Space</h4>
437
437
<p> Lets start simple.  A moniker is a reference to
438
438
                    an object[1].  To actually use the object, you
491
491
</div>
492
492
<hr>
493
493
<div class="refsect2" lang="en">
494
 
<a name="id2809265"></a><h3>File Linking</h3>
 
494
<a name="id3049534"></a><h3>File Linking</h3>
495
495
<p> Monikers were originally implemented as part of the
496
496
                Microsoft OLE2 compound document system.  They can be
497
497
                used effectively by applications during drag and drop
512
512
</div>
513
513
<hr>
514
514
<div class="refsect2" lang="en">
515
 
<a name="id2809298"></a><h3>Instance initialization</h3>
 
515
<a name="id3049567"></a><h3>Instance initialization</h3>
516
516
<p>Monikers can be used to initialize objects, as a way
517
517
                of passing arguments to your object.  This is coupled
518
518
                with the Bonobo/ItemContainer interface and the Item
521
521
</div>
522
522
<hr>
523
523
<div class="refsect2" lang="en">
524
 
<a name="id2809314"></a><h3>Resolution of a moniker against an interface</h3>
 
524
<a name="id3049583"></a><h3>Resolution of a moniker against an interface</h3>
525
525
<p>A moniker can be resolved against different
526
526
                interfaces.  The resulting object might be different
527
527
                depending on the interface that is being resolved.  To
546
546
</div>
547
547
<hr>
548
548
<div class="refsect2" lang="en">
549
 
<a name="id2809361"></a><h3>Core monikers</h3>
 
549
<a name="id3049630"></a><h3>Core monikers</h3>
550
550
<p>Bonobo ships with a number of moniker handlers: the
551
551
                <code class="literal">file</code> moniker,
552
552
                the <code class="literal">item</code> moniker,
553
553
                the <code class="literal">oafid</code> moniker and
554
554
                the <code class="literal">new</code> moniker.</p>
555
555
<div class="refsect3" lang="en">
556
 
<a name="id2809394"></a><h4>The file moniker</h4>
 
556
<a name="id3049663"></a><h4>The file moniker</h4>
557
557
<p>The file moniker is used to reference files.
558
558
                    For instance:</p>
559
559
<pre class="programlisting">file:sales.gnumeric</pre>
569
569
                    supported, through the PersistStream interface.</p>
570
570
</div>
571
571
<div class="refsect3" lang="en">
572
 
<a name="id2809425"></a><h4>The item moniker</h4>
 
572
<a name="id3049694"></a><h4>The item moniker</h4>
573
573
<p>The item moniker is typically triggered by the
574
574
                    "!" string in the middle.  The item moniker can be
575
575
                    used to implement custom object naming, or
633
633
                </pre>
634
634
</div>
635
635
<div class="refsect3" lang="en">
636
 
<a name="id2809536"></a><h4>The oafiid moniker</h4>
 
636
<a name="id3049805"></a><h4>The oafiid moniker</h4>
637
637
<p>The <code class="literal">oafid:</code> moniker handles
638
638
                    activation using the Object Activation Framework.
639
639
                    This allows application programmers to activate
643
643
                </pre>
644
644
</div>
645
645
<div class="refsect3" lang="en">
646
 
<a name="id2809560"></a><h4>The "new:" moniker</h4>
 
646
<a name="id3049829"></a><h4>The "new:" moniker</h4>
647
647
<p>The new moniker requests from its parent the
648
648
                    "Bonobo/GenericFactory" interface and invokes the
649
649
                    method create_instance in the interface.</p>
692
692
</div>
693
693
<hr>
694
694
<div class="refsect2" lang="en">
695
 
<a name="id2809636"></a><h3>Adding moniker handlers to the system</h3>
 
695
<a name="id3049905"></a><h3>Adding moniker handlers to the system</h3>
696
696
<p><b>Ideal monikers: </b>There are two moniker handlers that would be
697
697
                    interesting to implement: the Configuration
698
698
                    Moniker and the VFS moniker.</p>
705
705
<p>I am convinced that this helps make the system more
706
706
                self consistant internally.</p>
707
707
<div class="refsect3" lang="en">
708
 
<a name="id2809666"></a><h4>The Configuration Moniker</h4>
 
708
<a name="id3049935"></a><h4>The Configuration Moniker</h4>
709
709
<p>The configuration moniker is invoked by using
710
710
                    the <code class="literal">"config:"</code> prefix.  The
711
711
                    string afterwards is the configuration locator.
792
792
                    Property and PropertyBag interfaces.</p>
793
793
</div>
794
794
<div class="refsect3" lang="en">
795
 
<a name="id2809811"></a><h4>Configuration transactions</h4>
 
795
<a name="id3050080"></a><h4>Configuration transactions</h4>
796
796
<p>Handling of transactional changes to the
797
797
                    configuration system can be achieved by the use of
798
798
                    the setValues interface in the PropertyBag.  The
814
814
                    component if it needs to be.</p>
815
815
</div>
816
816
<div class="refsect3" lang="en">
817
 
<a name="id2809847"></a><h4>Listening to changes.</h4>
 
817
<a name="id3050116"></a><h4>Listening to changes.</h4>
818
818
<p>
819
819
                    One of the requirements for a modern desktop is to
820
820
                    be react globally when changes are made to global
834
834
                    PropertyBag.</p>
835
835
</div>
836
836
<div class="refsect3" lang="en">
837
 
<a name="id2809875"></a><h4>What about GConf?</h4>
 
837
<a name="id3050144"></a><h4>What about GConf?</h4>
838
838
<p>GConf is a configuration management
839
839
                    infrastructure that provides the following
840
840
                    features:</p>
874
874
                    replaced with a more powerful system.</p>
875
875
</div>
876
876
<div class="refsect3" lang="en">
877
 
<a name="id2809946"></a><h4>Configuration management: Open Issues</h4>
 
877
<a name="id3050215"></a><h4>Configuration management: Open Issues</h4>
878
878
<p><b>Specifying the location for
879
879
                    configuration. </b>The syntax for accessing the configuration
880
880
                        has not been defined, but we can cook this up
945
945
                    installed in a special location.</p>
946
946
</div>
947
947
<div class="refsect3" lang="en">
948
 
<a name="id2810074"></a><h4>The GNOME VFS becomes deprecated.</h4>
 
948
<a name="id3050343"></a><h4>The GNOME VFS becomes deprecated.</h4>
949
949
<p>The GNOME VFS provides an asyncronouse
950
950
                    file-system interface abstraction that can be used
951
951
                    to access local files, remote files, files in
986
986
</div>
987
987
<hr>
988
988
<div class="refsect2" lang="en">
989
 
<a name="id2810129"></a><h3>Other monikers</h3>
 
989
<a name="id3050398"></a><h3>Other monikers</h3>
990
990
<p>There is another family of moniker handlers that are
991
991
                worth stuyding.  The filtering moniker handlers and
992
992
                the caching moniker handlers.</p>
993
993
<div class="refsect3" lang="en">
994
 
<a name="id2810140"></a><h4>The <code class="literal">streamcache:</code> moniker</h4>
 
994
<a name="id3050408"></a><h4>The <code class="literal">streamcache:</code> moniker</h4>
995
995
<p>The idea of the streamcache: moniker is to be
996
996
                    basically a shared library moniker handler that
997
997
                    provides a cache for the IDL:Bonobo/Stream:1.0
1017
1017
                    a moniker, you can get a Stream cache for free.</p>
1018
1018
</div>
1019
1019
<div class="refsect3" lang="en">
1020
 
<a name="id2810184"></a><h4>The #gunzip, #utar filtering monikers</h4>
 
1020
<a name="id3050453"></a><h4>The #gunzip, #utar filtering monikers</h4>
1021
1021
<p>The #utar moniker is a moniker that would
1022
1022
                    implement tar file decoding (the same concept can
1023
1023
                    be used for other archive formats).  This moniker
1050
1050
                    file would take a long time.</p>
1051
1051
</div>
1052
1052
<div class="refsect3" lang="en">
1053
 
<a name="id2810235"></a><h4>The propertycache: moniker</h4>
 
1053
<a name="id3050504"></a><h4>The propertycache: moniker</h4>
1054
1054
<p>Accessing individual properties over and over
1055
1055
                    might take quite some time due to the CORBA round
1056
1056
                    trips.  The propertycache: moniker would be also a
1069
1069
</div>
1070
1070
<hr>
1071
1071
<div class="refsect2" lang="en">
1072
 
<a name="id2810263"></a><h3>The accidental invention</h3>
 
1072
<a name="id3050532"></a><h3>The accidental invention</h3>
1073
1073
<p>Monikers were invented originally in OLE2 to
1074
1074
                implement Object Linking.  The OLE2 programmers
1075
1075
                accidentally invented an object naming system.</p>
1079
1079
</div>
1080
1080
<hr>
1081
1081
<div class="refsect2" lang="en">
1082
 
<a name="id2810280"></a><h3>Monikers and the GNOME VFS</h3>
 
1082
<a name="id3050549"></a><h3>Monikers and the GNOME VFS</h3>
1083
1083
<p>
1084
1084
                Some people ask: monikers look as if they are just
1085
1085
                re-implementing the GNOME-VFS, why is that?</p>
1110
1110
</div>
1111
1111
<hr>
1112
1112
<div class="refsect2" lang="en">
1113
 
<a name="id2810323"></a><h3>Open Issues</h3>
 
1113
<a name="id3050592"></a><h3>Open Issues</h3>
1114
1114
<p>We will need to research the implementation
1115
1115
                requirements for asyncronous parsing and resolution of
1116
1116
                Monikers.</p>
1121
1121
</div>
1122
1122
<hr>
1123
1123
<div class="refsect2" lang="en">
1124
 
<a name="id2810340"></a><h3>Conclusion</h3>
 
1124
<a name="id3050609"></a><h3>Conclusion</h3>
1125
1125
<p>Monikers are very powerful mechanisms that can unify
1126
1126
                the name space of objects in the system and can be
1127
1127
                used to provide a uniform access method for a wide
1138
1138
</div>
1139
1139
<hr>
1140
1140
<div class="refsect2" lang="en">
1141
 
<a name="id2810381"></a><h3>Acknowledgements</h3>
 
1141
<a name="id3050650"></a><h3>Acknowledgements</h3>
1142
1142
<p>The Bonobo moniker implementation was done by
1143
1143
                Michael Meeks.</p>
1144
1144
<p>The design for the Bonobo moniker system was done by