[development] need a standard for contrib node build_mode constants

Chris Johnson cxjohnson at gmail.com
Thu May 21 16:50:46 UTC 2009


After all, we wouldn't want developers to have actually document
anything they write.  ;-)

On Wed, May 20, 2009 at 1:04 PM, Jeff Eaton <jeff at viapositiva.net> wrote:
> Indeed.
>
> At least with strings it's possible to develop meaningful conventions. With
> ints, there is literally no meaning other than "first come, first served,
> set up a registry."
>
> --Jeff
>
>
> On May 19, 2009, at 1:57 PM, Earnie Boyd wrote:
>
>> 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.
>


More information about the development mailing list