Dear all,
I support Moodle installations at some of our state-run schools in south India, and am just embarking on developing a plugin for a custom requirement that has come up. I have not developed a plugin before, but have robust programming experience and am reviewing the plugin development guidelines right now.
To experienced PHP/plugin folks on the forum:
I would like to know how easy it is - from a code design perspective - to expect to keep the core functionality Moodle-free and make the functionality Moodle-pluggable in a very modular way. The reason I ask is that I would like to be able to also deploy the plugin's functionality as a standalone PHP webapp in schools that do not use Moodle, and obviously its not a great idea to have two codebases - one for the plugin, and one for the standalone PHP webapp. I understand there will always be Moodle-specific parts in my code and I need to put in the effort to modularize code, but to begin with, is it realistic to aim to develop the plugin in a way where I can neatly build the same codebase both as a plugin and a PHP webapp? Are there any examples of existing plugins that are also available as standalone apps?
Any pointers and guidance from your experience is highly appreciated. Thank you!
PS: I guess my question comes from a background where I have worked on platforms that simply enforced such tight coupling with the plugins that for all practical purposes, a separate codebase with a lot of duplicate code was required to develop a PHP app with the same functionality.
Regards,
Chandra