summaryrefslogtreecommitdiff
path: root/Software/DBusAnalogy.mdwn
blob: 8640693f97840a97ef0073a38e56e34ed84b8bed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

Many people are confused about the concepts in DBus. This page gives an analogy to the web which should help to explain things. 


## Concepts

* unique bus name 
* well-known bus name 
* object path 
* interface 
* method name 
* in parameters 
* out parameters 

## Web Server Analogy

* unique bus name is like an IP address. In particular it is dynamic. 
* well-known bus name is like a hostname. It can be held by different programs at different times, but they should all implement the same API 
* object path is like the path on the server 
* interface/method name is like GET or POST 
* in parameters are like like GET/POST variables 
* out parameters are like the page which is returned. 

## Object-Oriented Language Analogy

* an object path refers to an object, such as a java.lang.Object 
* an interface is exactly like a Java interface 
* in parameters are method arguments 
* out parameters are method return values 
* unique bus name identifies the running process or application uniquely (these bus names are never re-used by a different process) 
* well-known bus name is a "symlink" that points to the process providing a particular API 
* an API is made up of objects that are expected to exist, which are expected to implement certain interfaces 
* see also [[http://log.ometer.com/2007-05.html#17|http://log.ometer.com/2007-05.html#17]]