Drupal 7.x Development - Naming conventions Because of a recent project I need to dig into this drupal thing and try to fix a bug inside.  

I am a drupal CMS beginner,and studying this CMS for several days, also going through the drupal module development website.

But I still have no clue about how to do proper development in Drupal, especially the function naming, database table naming, and relationship between .module, .info and so on.

e.g. hook_revision_publish become revisioning_revision_publish

My question:

How are names mapped and what is the sequence of functions that are called (the workflow?)

Hope that my question is clear and help someone to shorten the learning path of Drupal.

Thank you very much in advance for helping.
I'm a bit surprised that you haven't found anything on the internet that could answer your questions. Here is an article about coding standards for Drupal.

Anyway, here are several things I always do with naming, functions and directories (that doesn't mean it's the best conventions):


The only directory you should work in is ./sites (please never ever edit something in the other directories).
The contribute modules you download should be placed in ./sites/all/modules/contrib
The custom modules that you develop yourself should be placed in ./sites/all/modules/custom
When you create a custom module, chose a simple and suitable name of it, preceded by the name of your project (better), for example myproject_blog.
The .module and .info files should have the same name as your module's, for example myproject_blog.module and myproject_blog.info. It will automatically make the relationship between them.
All the functions that appear in your .module file should be named by your module's name, for example myproject_blog_revision_publish().
If your custom module needs a table in your database, the name of your module has to show up somewhere, for example $schema['myproject_blog']. If you need more than one table, keep the prefix and add some explicit suffix.
Idem for the custom themes in ./sites/all/themes.


If I forgot something, just ask ;)