[development] No module-defined node types?
jazepstein at gmail.com
Thu Jan 4 22:53:14 UTC 2007
OK, seems that I didn't explain myself fully, so let me clear things
up a bit, by providing a bit of background to the node type system
changes in Drupal 5.
I was one of the (several) main people that worked on the
CCK-partially-in-core patch for Drupal 5
<http://drupal.org/node/62340>. When I first got involved in this
patch, the plan had been for it to remove hook_node_info() from core
completely, and to only allow node types to be defined directly in the
'node_type' DB table. That is, it was essentially going to nuke
module-defined node types, and make all node types user-defined (or at
least make it difficult to have module-defined node types).
I thought that this was a bad idea, because like you (Chris), I
thought that module-defined node types were very important and very
useful, and I didn't want to see them disappear. So I reworked the
patch, so that it kept hook_node_info() in core, and allowed it to
co-exist with the new user-defined-centric 'node_type' DB table.
Hence, both variations of node types are fully supported in Drupal 5.
BUT: remember, I was in the minority on this issue! Most people didn't
care about hook_node_info(), and didn't see the point in keeping it.
That's why I said: "it's LIKELY that before long, there will be no
such thing as module-defined node types". I didn't say this because I
want it to happen; I said it because a lot of other people want it to
happen, and so that means that it probably WILL happen.
Because we have both options in core now, Drupal 5 is going to be a
time for us to 'test run' with user-defined vs module-defined node
types. If people decide that module-defined node types are still very
much needed, then I guess that they'll remain in for Drupal 6, and
they'll still be used by developers. If, OTOH, people don't see the
point, and don't use them, then they'll probably be taken out for
Drupal 6, and the dual-options support in Drupal 5 will have been
little more than a 'friendly transition period' for developers to get
used to the new ways.
On 1/5/07, Chris Johnson <cxjohnson at gmail.com> wrote:
> In a thread on hook_nodeapi, Jaza wrote:
> "With the new CCK-partially-in-core features, it's likely that before long,
> there will be no such thing as module-defined node types. There will
> only be user-defined node types."
> Either I grossly misunderstand things, or ... the hell you say?
> (American idiom for disbelief or roughly "no way!")
> CCK may be regarded as the greatest thing since sliced bread by users,
> site admins and even many developers, but I may not want to use CCK to
> define nodes when I've got some special data I want to use efficiently
> as content in a module I'm writing. CCK is inefficient *by design* in
> order to purchase its flexibility.
> Drupal is a framework. It shouldn't force content creation modules to
> use one and only one method.
More information about the development