Hooks in Base Code

Kero van Gelder kero at chello.nl
Thu Jul 19 01:12:18 CEST 2007

>>    If the monolithic approach is out then some sort of modular approach is 
>> required.  The most obvious example out there today is Firefox, which 
>> comes in a relatively simple base configuration but provides any number of 
>> hooks to allow people to write their own extensions on top of the base 
>> code and as such to alter the functionality of the product very 
>> extensively.  If we want this openmoko to be as free as possible then it 
>> also needs to be as easy as possible for people to extend, and this is the 
>> most likely way of doing it.
>>    I know that there are a lot of potential problems that need to be 
>> addressed when building this out but if there is a vision from the start 
>> as to how this would work then it would go a long way to making the final 
>> product the 'phone that we are all dreaming of, regardless of the fact 
>> that those dreams are often divergent from others if not totally 
>> exclusive.  So my questions are there plans to include these hooks, and if 
>> not can it be considered?
>>    Or is there another way to do this other than hooks?
> You have to modularise and split the applications into interface and the 
> engine code as much as possible. If clever enough you could even define the 
> interface layout using definition files in XML or some other trendy file 
> format :)

There's definitely two interfaces here. One that sets up the rules/filters
to let certain things happen (John gets this ringtone, Basil shall be ignored)
and one that lets those things actually happen. The last interface is dead simple
compared to the first.

The engine consists of the rules. That engine is terribly complex. I need my
agenda, to see I have a meeting, so my phone will not accept calls. However,
it needs my phonebook, to see whether one of my colleagues calls me, who
*should* be in the meeting, I better take that call after all.

agenda and addressbook are available via dbus already. No point in implementing
another interface there.

Now, depending on circumstances, your Social Other, a parent or child who needs
to see a doctor, your bank/mortgage or person that arranges something big for
you may need to drag you out of your meeting. Some or most meetings. Probably
not all (discussing a raise with your boss, perhaps?)

1) How would you put that
   in an engine? Where does all the relevant info come from?
2) Then build aan interface to allow an end-user to create such rules.
3) And finally do something trivial with dbus,
   commandline (or even XML...) to play the appropriate ringtone. and show
   an Pickup/Cancel pair of buttons.

> I know that the Home page on Windows Mobile Smartphone edition is just an 
> XML file which can contain links to plugins.

That's the easy part, really...


More information about the community mailing list