My favorites | Sign in
Project Logo
       
Search
for
Updated Oct 12, 2009 by zdknudsen
Labels: Phase-Design, Phase-Implementation
Standards  
Defines good practice when developing open source modules.

Why Even Care?

If you are going to release a module to the public then I strongly recommend going through these few topics in order to avoid end-user frustration.

Stop the Pollution

First of all it is crucial that you give your modules (and included resources) unique names that are unlikely to be used by the end-user in his/her application, in order to avoid polluting the namespace. One way of doing this is prefixing your resources (with the module name for instance). Remember that module names are restricted to letters, numbers, and the characters ~%.:_-.

Don't Supersize Me

Demonstration applications are ace. However, most people won't need it when they have learned the basics of your module and you should provide them with the option of downloading a version of the module containing only the required functionality.

Extension Tension

You might need to extend one of the base libraries, and in order to avoid multiple modules extending the same libraries you are encouraged to create new libraries instead of overwriting the previous ones. Say you needed to extend the Validation library. Instead of creating a MY_Validation class that would otherwise overrule the standard one, you should create a new class (e.g. mymodule_validaton) that extended the base one. Note that you have to load the class before you can extend it.

Authorization Granted

Congratulations, you are hereby a fully qualified module developer ready to take the CodeIgniter community by storm! As long as you follow these simple rules people will love you for the work you do, instead of swearing at it.


Sign in to add a comment
Hosted by Google Code