kb at 2bits.com
Wed Jan 3 23:40:36 UTC 2007
Speaking from personal experience, and having been confused by this
in the past, the problems as I see them are:
a. More than one way of doing things. This means that there is duplication
between the hook_something() and hook_nodeapi('something').
b. This duplication causes confusion to many developers (myself included).
I will leave others to comment on the details codewise, but here are the
in order of (my) preference:
1. Restricting node hooks to one way of doing things (hook_nodeapi). This
deprecating all hook_something() for node operations. This way there is no
2. Eliminating all the hook_something() that are duplicated by
and do not suffer the drawbacks listed above. This may mean leaving the
hook, and maybe others, and that is fine by me. Less confusion.
2a. Same as 2, but eliminate the nodeapi('something') that has an
equivalent. This way we are back to one way of doing things.
3. If the present scheme MUST stay as it is, then I don't know if
documentation improvement will
be enough to overcome the drawbacks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development