Object paths naming conventions?

Thiago Macieira thiago at kde.org
Thu Jul 17 19:39:05 PDT 2008


Havoc Pennington wrote:
>> In fact, the BlueZ group (well-known name: "org.bluez") recently moved
>> from longer names like/org/bluez/hci0 to /hci0 for one object path,
>> because the "/org/bluez" prefix really conveyed no additional
>> information.
>
>This is wrong - the /org/bluez DOES convey additional info, and bluez
>is now broken

My take is that "hci0" does not convey enough information. It's not an 
abstract concept -- it only makes sense when in connection to BlueZ. So 
it should be confined hierarchically to BlueZ's namespace. Besides, what 
if suddenly the interface names changed and started colliding with object 
paths the application defines?

However, when you're dealing with abstract concepts like "Application" 
or "Main Window" (for applications where this concept applies), then it 
does make sense to use those paths (/Application, /MainWindow 
or /Application/MainWindow, /Application/Window0/actions/file-open, 
etc.). In those cases, the interfaces will provide the "contract" to the 
calling mechanisms.

Organisations like XDG could decide to standardise a subset of those 
paths, under strict guidelines, like, for example, the objects that 
represent top-level windows (caption, position, size, focus, 
raising/lowering, maximising/minimising, etc.). Those above are meant 
more for interaction with a human user of D-Bus objects.

That said, KDE Libraries do make use of non-namespaced abstract concepts 
like I mentioned above. In some cases, it's justified because the objects 
exposed are meant for end-user consumption. In others, when the libraries 
by themselves do inter-process communication, it's less justified -- that 
is, a properly namespaced path would be better to avoid conflicts.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080717/79ad8f44/attachment.pgp 


More information about the dbus mailing list