[development] changes to hook_nodeapi
Larry Garfield
larry at garfieldtech.com
Fri Sep 1 04:41:50 UTC 2006
On Thursday 31 August 2006 19:55, Khalid B wrote:
> > I just rolled back the patch. Programmatic submissions are still
> > possible but the old _nodeapi hook is back. This give us more time
> > to think about it, and to figure out a solution that more people are
> > comfortable with. No need to rush this. :)
>
> Thank you Dries, this is the least painful path, specially the freeze is
> practically upon us.
>
> Perhaps when Moshe comes up with a good description, this would
> be cleared up, but until then, the CRUD functions in nodeapi are
> crucial for modules to act on node events.
>
> I also remember someone mentioning discrete CRUD functions
> outside of nodeapi a while back (was it webchick?)
I think you're looking for this thread:
http://drupal.org/node/79684
I did find it odd that there was a patch to remove independent CRUD functions
from core at the same time that there was a thread to add a complete CRUD API
for all major Drupal entities.
My own take on the matter is that direct-CRUD (node_load(); $node->foo
= 'bar'; node_save();) and form automation (FAPI) both have very legitimate
uses. Especially as Drupal is far more than just a form handling CMS but a
full-on development API in many ways, the ability to do things without going
through a virtual form is very important.
Don't get me wrong; programmatic submission of form as now possible with the
pull-based FAPI is great. But it addresses a different set of problems than
direct CRUD functions. They serve two different purposes. They probably
can, and if so should, share a lot of the same backend code, but they're
different APIs because they serve two different but both legitimate
programming needs.
--
Larry Garfield AIM: LOLG42
larry at garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
More information about the development
mailing list