[development] need a standard for contrib node build_mode constants

Earnie Boyd earnie at users.sourceforge.net
Tue May 19 18:57:35 UTC 2009


Quoting Jeff Eaton <jeff at viapositiva.net>:

> The problem is not one of information storage length, but of flag collision.
>
> Ints are fine as primary keys on a lookup table, or constant values  
> for internal flags that will never be extensible. For things we know  
> people will build on -- like node types, or node build modes --  
> strings are the only way to avoid collisions when module developers  
> start expanding.
>

The only way to avoid a collision between developers of modules is to  
create a namespace based on the module name for whatever the data is.   
So for node_type a unique key of module and name creates the necessary  
uniqueness required.  The system though needs to include the module  
for the content type in it's presentation so that one knows by looking  
at the UI which module the content type is for.  Perhaps the use of  
fieldsets where the fieldset is the module name could help clear up  
the confusion when more than one module could create a UI data conflict.

--
Earnie
-- http://r-feed.com/           -- http://for-my-kids.com/
-- http://www.4offer.biz/       -- http://give-me-an-offer.com/




More information about the development mailing list