while I'm building more code I realize some of the modules are not consistent in using Drupal resources..
- Some modules create menu entries here and there.. do we put all of the in /examples/module? if you have several modules enabled is easier to find if the module does something.
- unless a module defines permissions, examples should be accessed the same way (authenticated or not). If the user requires privileges to access the example functions (forms, pages) in some modules, and not in other, the test files also require the permissions, so they turn into difficult to maintain.
- There is no a module howto referenced in the project page. So, even if using coding styles and coder, a common practice is to split the pages from the main .module, leaving only hooks and required code in the main module file. Not doing this, the example is easier to follow but a -not that good- practice, and doing it may do the example really hard to follow if it is not that big.
- Use of hook_help, own readme.txt or the readme.txt in examples folder? use all?
- others?
Comments
Comment #1
rfayGood thinking.
In addition to your thinking, here's my opinion:
I will update this comment as the conversation continues, and then we can transplant it later.
Comment #2
rfayHere are some things ilo and I talked about in IRC tonight:
One general goal: I think we should focus our energies on D7 features that module maintainers are going to need for porting. So DBTNG, Fields, Token, etc. Somebody did a bunch of work on the modules we've inherited a long time ago, but some of them are not so relevant any more. For example, xmlrpc isn't all that important any more. Anybody implementing that should probably be using services module. And the node example module (that does another node type) is hardly relevant since CCK took over the world. It is still useful, but most of the time people should be using CCK.
There is an API site with Examples module in it at http://api.dev.randyfay.com.
Comment #3
rfayTo help us with having feedback on the Doxygen for this module, I set up an API site at http://api.dev.randyfay.com which gets updated whenever there's a checkin (10-minute intervals). That way you can easily look at what you've done and see if it's doing what it ought to do.
Comment #4
rfayI've added this information to the project page.