Hi developers,

I have been thinking about moving the implementation of functions from the MMObjectBuilder. This enables removing field functions that should not be there anyway (functions such as: dayweek, shortday, thisdaycurtime, timesec, etc.etc), and this enables organizations to add functions that they want to apply on fields. Some functions that actually make sense can be provided to the MMObjectbuilders by providing them in a separate classfile.

The idea is to let MMObjectBuilder delegate the executeFuncion invocation to the 'function classes'. There are some ways to implement this, I will provide 2 ideas, i am curious what you think about this.

1) We can add function classes that extend an interface to invoke the function calls (the interface should implement some things like the executeFunction method that is already present in MMObjectBuilder). We can specify in object.xml which function classes can be used by a specific builder to evaluate functions. Defining the function class in object.xml will of course enable the function class for all builders.

2) At irc, Daniel was talking about working the other way around. To define in the function classes to which builders the functions should apply. In this case you can add function classes and without modifying your builder configurations the functions can be used. There is already some thing like function sets in MMBase (1.7), but i don' t know how they work. But maybe it's possible to provide the functions as function sets.

Rob







Reply via email to