Grayside.Org

Home

cat kit | summarize namespacing

grayside — Sat, 05/22/2010 - 22:03

I decided a few notes would help me grok the Kit Specification. I post them here in case someone else finds them useful.

Shortest Summary

Project Name and Feature Name should be the same. They should have a nice, unique namespace. The human readable version doesn’t need to show the prefix. Views and other individually exported pieces should be prefixed with the not-necessarily-unique part of the Feature name.

Barely-Shorter Sumary

This summary currently covers the Features Specification 1.0-draft.

Code Namespace

Covers: Filenames, function names, directory name.
Rule: Make the namespace (prefix) unique.

Domain names and Drupal.Org user names make good prefixes. Why? Because they are guaranteed unique by an external authority everyone in the Drupal community is bound to bump into.

Project Namespace

Covers: Project name, as defined in .info file and a Features Server feature node.
Rule: Same as the code namespace for a single-feature project.

Machine Name

Covers: Generic part of the feature name.
Rule: Should be short and descriptive.

Features will generally be called <namespace>_<machine name>.

Human Readable Name

Covers: Name of the feature, such as on the modules page. (As defined by name in .info file.)
Rule: Skip the namespace. Stick with a descriptive name.

(I interpret this to be a human-readable version of the Machine Name.)

Component Namespace

Covers: All the bits that are exportable. (Views, Content Types, Rules, etc)
Rule: Prefix with the Machine Name.

Example

Here are the namespace selections for a project enhancing the OpenAtrium Notebook.

  • Namespace: grayside
  • Project Name: grayside_oa_book_manager
  • Machine Name: oa_book_manager
  • Human Readable Name: OA Book Manager
  • Component Namespace:
    • View: oa_book_manager_bulk_update
    • Rule: oa_book_manager_new_page_message
  • drupal
  • features
  • kit
  • namespace
  • Add new comment

Similar Posts

  • cat kit | specificity
  • Drush and Features Servers
  • CCK Fields and the Open Atrium Node Form
  • Integrating Some Other Feature with Spaces
  • Modifying Contexts the Old-Fashioned Way

Monthly archive

  • September 2010 (2)
  • August 2010 (2)
  • July 2010 (2)
  • June 2010 (6)
  • May 2010 (9)
more

Feeds

  • Syndicate contentHeadlines
  • Syndicate contentDrupal Planet
  • Syndicate contentAtrium Headlines

casetracker cck drupal features FL3 freelinking module og openatrium permissions spaces views
<all>

© 2009 grayside.org ♠ Glossary ♠ Powered by Drupal ♠ Floating on Archlinux