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.
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