[development] Creating fields: custom vs. CCK

Adrian Rossouw adrian at bryght.com
Mon Mar 31 20:57:36 UTC 2008

On 31 Mar 2008, at 7:26 PM, Sean Wingert wrote:

>   "We'll first show you the programmatic solution by writing a  
> module that uses Drupal hooks. This approach allows for a greater  
> degree of control and flexibility when defining what the node can  
> and can't do." -- Westgate and VanDyk, Pro Drupal Development  
> (Google Books)

As I was programmatically creating fields, it ended up being quicker  
and easier for me to write them as custom
modules, since i really was only using cck to get away from writing 2  
form fields (edit and view) and 3 sql statements (insert, update and  

The only thing that was moderately tricky was learning how to support  
views completely in my custom types.

Also, all my code is versioned and has a code based upgrade path,  
whereas cck1 is just not built for that kind of thing.

I was also writing a lot of back end integration code, and my code  
quality was a lot better not having to litter everything with $node- 
 >field_some_thing[0]['value'] instead of node->some_thing.

Also. custom node types can still be extended by cck.

More information about the development mailing list