Property names vs. interface names

So let me ask at large, and summarise the issue.
SysInfo deals with Properties (CPU, PowerSource, InputDevice)
which are named in function calls, e.g. get("CPU", callback).
The callback then receive an object that represent that property,
defined by an interface, e,g,
interface CPU {
   float load
}

Using the same name for the property and its interface is confusing (for 
reasons explained in this thread). So what's a good way of naming them?

Property PropCPU vs. interface CPU?
Property CPU vs. interface IntCPU?
Property PropCPU vs. interface IntCPU?
...

Max.



>>>>> 2) Can it be said explicitely that the name of the Property (the
>>>>> property ID) is the same as the name of the Interface that the
>>>>> onSuccess function will get
>>>>
>>>> No, it's not always true. For instance, property AmbientLight (and all
>>>> the
>>>> other sensors) are based on interface Sensor.
>>>
>>> Uhm...indeed. Ok but there is certainly room for clarification here.
>>> Dunno how for the moment.
>>
>> Perhaps it would be better to call interfaces and property something
>> explicitely different? Like CPUInterface and CPU, respectively (or with
>> better names)?
>
> That seems to be a good direction. Probably, you should implement it
> that way (XXX and XXXInterface) and let the people come up with better
> naming strategy

Received on Monday, 10 May 2010 13:38:49 UTC