On Mar 30, 2004, at 11:22 AM, Rob Vermeulen wrote:


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


Just to explain my comment to Rob about that there maybe a possible overlap between these 2 ways of defining functions. I look at it from a pragmatic way. In the future we want to be able to 'add' software/functions/actions to several parts of mmbase. This can range from filters to encoders to functions on managers and even instanties of objects. Sofar i have been working with functions as 'sets' because they are somewhat seperated from 1 builder (more model/view/control) so for example the MMBob forum we showed at the last meeting has a 'set' of functions that go with the datamodel (defined in objects and relations). We can see this function set as partof the applications instead of just one builder. It could be a idea to allow these sets to be attached to things. For example function sets we want to use over the whole a whole cloud could be attached to the cloud, functions we want to attach to a applications for general support with a application, functions attached to a builder to solve the above problem and even attach a function in the future to more things like objects themself.


This is a lazy way of adding functions in that it allows someone who didn't make a builder/applications etc etc to add functions anyway without changing the software (that is maintained by someone else) and that _can be_ nice. ofcourse in other cases they should/could just be defined as part of the thing itself (say in this case a builder.xml) since its seen as part of the product not something added by the 'user' of the product at runtime.

To research/allow this all that is needed is that we add hooks toi n this case MMObjectBuilder that allow us to 'load' in with functions at runtime so the place/type where we loaded it from is abstracted.

Hope this makes sense. This italk s all post 1.7.0 related.

Daniel.


Reply via email to