[drupal-devel] New module nameing.
I've written a new module and would like other module devels to give me their opinion. This module allows editing of the help messages for any page on a drupal site from within the administration pages. Right now I have it named "helpdb". From a technical point, sure the name describes that it adds a database back-end to the help system. But, its not a pretty name. I was thinking maybe "help_edit". What do you guys think? Are there any conventions to nameing modules other than all lowercase and underscores instead of spaces? I see in the current module list that some patterns are emerging (like taxonomy_ and node_), but is anything enforced? Thanks, Aran
On Fri, 25 Feb 2005 17:21:36 -0800 (PST), Aran Clary Deltac <aran@arandeltac.com> wrote:
Are there any conventions to nameing modules other than all lowercase and underscores instead of spaces? I see in the current module list that some patterns are emerging (like taxonomy_ and node_), but is anything enforced?
Despite the number of modules that use it, an underscore in the name should probably be avoided.
Chris Cook wrote:
On Fri, 25 Feb 2005 17:21:36 -0800 (PST), Aran Clary Deltac <aran@arandeltac.com> wrote:
Are there any conventions to nameing modules other than all lowercase and underscores instead of spaces? I see in the current module list that some patterns are emerging (like taxonomy_ and node_), but is anything enforced?
Despite the number of modules that use it, an underscore in the name should probably be avoided.
Agreed, the risk of namespace collisions is greatly increased by using underscores. If I named my module "node_page", for instance, I would think that the node_page namespace were all mine to use however I wished, but in fact, that would possibly conflict with the node module's various node_page_* function names. Cheesy example, but perhaps you get my point. Great idea, though. -Mark
Chris Cook wrote:
On Fri, 25 Feb 2005 17:21:36 -0800 (PST), Aran Clary Deltac <aran@arandeltac.com> wrote:
Are there any conventions to nameing modules other than all lowercase and underscores instead of spaces? I see in the current module list that some patterns are emerging (like taxonomy_ and node_), but is anything enforced?
Despite the number of modules that use it, an underscore in the name should probably be avoided.
Agreed, the risk of namespace collisions is greatly increased by using underscores. If I named my module "node_page", for instance, I would think that the node_page namespace were all mine to use however I wished, but in fact, that would possibly conflict with the node module's various node_page_* function names. Cheesy example, but perhaps you get my point.
How about dashes? None of the codeing conventions call for dashes, so there would be no conflicts/confusions with function names. It would be much more appealing to the eye to see xml-node-tree instead of xmlnodetree as a module name (for example). Aran
Great idea, though.
-Mark
Aran Clary Deltac wrote:
How about dashes? None of the codeing conventions call for dashes, so there would be no conflicts/confusions with function names. It would be much more appealing to the eye to see xml-node-tree instead of xmlnodetree as a module name (for example).
There is a particular thing that drupal does for identifying multiple nodes of a single module. The convention there is to name the nodes modulename-nodename, such as project-issue. Thus, you might catch problems using dashes, too. I think the best thing is to mash it all together. I think "helpdb" works, but then again, I'm no good at naming thing for the most part :) It took me weeks to come up with "relativity" and that's because of a concerted effort (it was attached_node2 for all too long). -Mark
participants (3)
-
Aran Clary Deltac -
Chris Cook -
Mark