[development] nodify.module idea: 'everything is a node'

Gordon Heydon gordon at heydon.com.au
Sun Jan 21 22:25:44 UTC 2007


Hi,

My personal rule in this area is that if it is content then it is a node.

So things like users, categories, and yes I have have had someone say 
for E-Commerce 'a transaction should be a node', which are not content 
should not be a node.

The only thing that is borderline is a comment, as sometimes a comment 
can actually be content. but the overhead of a node for a comment really 
makes it impractical.

Also building a one size fits all box for every type of object really 
means that there will be overheads in areas which are not needed for 
some types of objects.

Gordon.

FGM wrote:
> Dries,
> 
> You and some others obviously know more than I do about resource use in
> core, but
> - it seems that the changes for 6.0, with (as I understand them) node
> loading mechanism becoming lighter before rendering, might make loading
> faster
> - the core code might become more difficult to understand (although I'm not
> sure why it would, but I'm no core expert), but the API used for contrib
> modules could actually become simpler, with a slightly reduced number of
> hooks and no additional parameters, which could make contrib code more easy
> to write and maintain: CRUD uperations like loading, updating, creating and
> deleting are already hooked for each of these entities, but in a different
> way. Would it not be simpler to have the same way be used for each entity ?
> - you say it does not become easier for users, and this may be true. But it
> certainly does not become more difficult for them, since most users are not
> even aware to the "node" term
> - reducing the number of tables might reduce load (otoh, same-table joins
> like (content)node->nid to (user)node->nid can be less efficient on some
> engines), which might indeed be a source of resource hogging, as you
> suggest. This needs benchmarking, though: this is the only engineering
> proof. Maybe it has been done at the occasion of one previous discussion on
> this recurring theme ?
> 
> Overall though, I have the slightest impression that the rejection of the
> idea might stem from having from the origin of the software held "nodes" as
> the basic content entity, wrapped, complemented, and organized by every
> other entity, and such a change would mean nodes become the basic entity,
> not only for content, and content nodes become a specialization of this more
> abstract object, which is another point of view somehow.
> 
> Note that this would pave the way for interesting evolutions like potential
> revisions on terms, users and comments (and more).
> 
> Now *that* would be a major change.
> 
> Is this also considered when rejecting Nedjo's idea ?
> 
> Frederic
> 
> ----- Original Message ----- 
> From: "Dries Buytaert" <dries.buytaert at gmail.com>
> To: <development at drupal.org>
> Sent: Saturday, January 20, 2007 11:54 AM
> Subject: Re: [development] nodify.module idea: 'everything is a node'
> 
> 
>> On 19 Jan 2007, at 21:31, Nedjo Rogers wrote:
>>
>>> Questions:
>>> - does this approach sound useful?
>>> - who's working on something similar? better?
>>> - pitfalls?
>>> - anyone wanting to work on this?
>> I've said it before and I'll say it again; the nodification of such
>> objects is not a good idea for a variety of reasons. Three obvious
>> reasons are: it does _not_ become easier for your users, it does
>> _not_ become easier for the average developer (unless you're a Drupal
>> expert, the code becomes more difficult to understand), and it will
>> be an incredible resource hog.
>>
>> -1 for 'comments as nodes', 'users as nodes' or 'categories as nodes'.
>>
>> --
>> Dries Buytaert  ::  http://www.buytaert.net/
>>
>>
> 
> 
> !DSPAM:1000,45b1f93e105754881810528!
> 


More information about the development mailing list