Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Development hints and tips

From MoodleDocs
Revision as of 10:30, 13 May 2010 by Howard Miller (talk | contribs) (New page: There is a great deal of development experience amongst the Moodle developers. This page is some general hints and tips that may help people starting out in PHP and Moodle development. '...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

There is a great deal of development experience amongst the Moodle developers. This page is some general hints and tips that may help people starting out in PHP and Moodle development.

This is work in progress. If you have some perls of wisdom, please add it...

Follow the Coding Guidelines

Moodle has a well developed set of Coding Guidelines. Read them and follow them. It's surprising how many custom plugins for Moodle do not. It instantly prevents your code from being incorporated in core Moodle.

Use a Version Control system

If you are developing without a version control system then you are doing it wrong. The benefits run well beyond just being able to keep past versions of your code. Moodle currently uses CVS for core development but this is probably a poor (out of date) choice for a new project. The world seems to be moving towards Git. This is a powerful distributed system and does take a bit of getting your head around but the effort is worth it.

Find an editor or IDE that works for you and learn it properly

There are many different development platforms from complex Integrated Development Environments (IDEs) to simple editors and command line tools. Choose something that works for you and then take the trouble to learn how to use it properly.