Moniker critique



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all!

    I've been studying the moniker's document that Miguel did (at
http://primates.helixcode.com/~miguel/monikers.html ), and have some
questions/critiques...

    First of all, I think that monikers are not the future: components
are. Let me explain what I'm trying to say and discuss, that is what
this list is for.

    OK. Don't forget where, when and why monikers appeared first in
OLE: the COM component model does not have object identifiers: they
had "interface" identifiers, "class" identifiers, and so, but NOT
object identifiers... When storing and restoring, it must remember the
links between component instances (that, strictly speaking, have no
identifier in COM).

    However, in CORBA, this is very different. Objects have their own
identifier, and by means of a well-configured POA, those references
can be persistent and universally identifying. On-demand servers can
be started by means of an IMR-like utility (as is NOT the OAF).

    With this in mind, I analyze monikers: In the page, I've seen some
examples that are very very convenient. Let me show one of them that I
find really interesting:

file:logo.png!Zoom=2.0,dither=max,notransparency

Really funny: an image, with some transformation that can be used by
any program... However... why this syntax?

Imagine that we defined something like this (note that this is all
theoretical):

----------8<------------------------------------
interface Image {
    void zoom (in float ammount);
    void dither(in DitherType d);
    ...
}

interface Stream : IUnknown {
    // Can be QueryInterface'd into Image
}

interface GenericResource : IUnknown {
    // Can be QueryInterface'd into Stream
}

interface GenericResourceManager : IUnknown {
    GenericResource open(in string URL);
}
--------------------8<--------------------------

IF WE WERE USING A SCRIPTING LANGUAGE, note that the moniker
identifier could be substitued by:

---------------------------8<------------------
myImage
= GenericResourceManager.open("file:logo.png").QueryInterface("Stream").QueryInterface("Image");

myImage.zoom(2.0);
myImage.dither(max);

...
---------------------------8<-------------------

That is, the moniker is equivalent to a bunch of method invocations.
The "open" method of GenericResourceManager must implement file, http,
ftp and other request methods (but only traditional URL request
methods). The different QueryInterface methods of each interface could
be able to "convert" the object to the desired interface.

Then, IMHO, the point is that it would be better to standarize
interfaces and to offer a flexible way of "narrowing" sources of
information based on interfaces. (the same way that .NET does, for
example). Monikers are somewhat extrange because they are many things
at the same time, as Miguel points out:

1. a naming scheme for objects (CORBA objects have IORs, whose
ObjectIDs can be also hierarchical)
2. processing instructions (which are not necessary, if we use
standard interfaces and APIs)

OK. I think that the moniker approach is limited for the future, as,
for example, it does not exist an interface for listing or describing
the available monikers, no interface for describing them (some like
IDL interfaces again!!).  Bonobo also has an infrastructure for
allowing a component implement different interfaces, different "views"
of the same "thing", and you can ask a component what different views
it offer (interfaces)... why using monikers instead designing flexible
system-wide interfaces?

    That were all my thoughts. I hope I knew explain them all OK.
    Regards.
    diego.


--
Diego Sevilla Ruiz -- http://ditec.um.es/~dsevilla/ -- dsevilla um es
       Departamento de Ingeniería y Tecnología de Computadores
           Facultad de Informática. Universidad de Murcia
Campus de Espinardo  -  30080 Murcia (SPAIN).  -  Tel. +34-968-367658
PGP:  http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xC9B964B7
\huge d\em\kern-.36em\lower-.2ex\hbox{\small sevilla}\kern- 1em um es
perl -e'$_="\x4\ FLe\x2&B";for(/../g){print unpack("b*",$_),"\n"}'|tr 01 " #"




-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: /mfrZz2oC7WTi6b2ST41iNF319u+pNFS

iQA/AwUBOi+G6toq0AfJuWS3EQIAIQCfYN/8FIwErtiHfZluEZv3WVQwBNIAn1J/
UWltmQxSwNZz+1pmYJoHznIC
=z6/K
-----END PGP SIGNATURE-----




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]