splitting off bindings [was: Re: patch to TODO]

Matthew Johnson dbus at matthew.ath.cx
Fri Feb 17 10:32:00 PST 2006

On Fri, 17 Feb 2006, Joe Shaw wrote:

> Hi,
> On Thu, 2006-02-16 at 19:11 -0500, Rémi Cardona wrote:
>> Couldn't something like swig be used to help bindings devs?
> I don't know a whole lot about SWIG, but my understanding is that it
> just generates simple wrappers around C APIs.  That would solve the work
> of binding to a low-level API, but it's only a fraction of the total
> work necessary.

Speaking from the PoV of a Java developer, and why I wrote the Java
bindings, the C API is actually not a good one for DBus, but Java *can*
provide a good API. DBus is meant to be an object-oriented model, not a
message passing on so implementing the bindings in an object oriented
language as a message passing API is not very sensible.

> A large part of creating a binding for an IPC mechanism like dbus is
> generating native method calls that applications can use as an API.
> Interpreted, dynamic languages like python can do this fairly easily at
> runtime, but compiled languages are a little trickier.

This is actually fairly simple. Translating DBus into the language's way
of doing things is, IMHO, a lot harder and why straight wrappers on the
C API are not a good way of doing a binding.


Matthew Johnson

More information about the dbus mailing list