Should new bridge functionality which can be implemented only by using other
bridge functions actually be in the bridge interfaces or would it be nicer
to have utilities (e.g. in org.mmbase.bridge.util) next to the bridge?

E.g. the function Node#getRelatedNodes(String) is only a wrapper to
Node#getRelatedNodes(NodeManager) so this function with 'String' could as
well not have been in the bridge. Of course it does make it easier to use
(node.getRelatedNodes("news") is more convenient than
org.mmbase.bridge.util.NodeUtil.getRelatedNodes(node, "news"). But having
utilities for this, would make it easier to make alternative implemtnations
for the bridge (core2?) because these kind of trivial methods don't have to
be implemented. 

Another likeable option would perhaps be to provide an abstract bridge
implemetantion for these kind of things (perhaps in
org.mmbase.bridge.abstract?). So, AbstractNode would then only implement
getRelatedNodes(String) and not getRelatedNodes(NodeManager).

Actually I'm working on org.mmbase.bridge.Query which now has
Query#addStep(NodeManager), but I'm thinking to centralized the
functionalitiy for Query#addSteps(String path) somewhere (which is needed on
several spots in the taglib), and before polluting the interface immediately
I like the check opinions (of project members and others).



Michiel

-- 
Michiel Meeuwissen 
Mediapark C101 Hilversum  
+31 (0)35 6772979
nl_NL, eo, en_US
mihxil'
[]()

Reply via email to