Any kind of module developer kits in the near future ?
Page: 1
I've started writing a new module, initially it will generate simple progress reports.. eg; it doesn't need to change any data, only do simple mysql queries and format the output. I could write this as a single stand alone PHP script, but was hoping to make it into an AC module, if anything for the experience of doing so.
I was hoping to find some sort of module skeleton to start with, or at least detailed documentation like "The anatomy of a module" or something
Does anyone know of something like that ? Kindly point me in the general direction please.
Thanks,
I was hoping to find some sort of module skeleton to start with, or at least detailed documentation like "The anatomy of a module" or something
Does anyone know of something like that ? Kindly point me in the general direction please.
Thanks,
GREAT ! My!, I must be psychic , I even guessed the title.. well mostly. Thanks aga8in. (where is the jump for joy emoticon?)
I do apreciate the artciles you have so far. Since I'm not primarily an OOP programmer, the theoretcals
only get me so far. What I think might assist future module developers, as well as myself, is a
downloadedable module template... if anything to act as a hands on example of where stuff goes, and what
does what .. an example below..
but PLEASE NOTE THIS MAY BE ENTIRELY WRONG ..
-----------------------------------------------------------------------------------------------------
When creating a new module, you'll need to create 2 new directories, naming them identically,
with the new module name.
./activecollab/application/modules/MODULENAME
./public/assets/modules/MODULENAME
Within ./activecollab/application/modules/MODULENAME you will need 3 more sub directories
/controllers/ See http://www.activecollab.com/developer-blog/anatomy-of-activecollab-modules-controllers/ for further info.
/handlers/
/views/
and the following files, which perform these tasks ...
definitions.php <-- Define configuration options
dictionary.php <-- Define language files
handlers.php <-- Define handler routines found within /handlers/
info.php <-- Define module description, version, install & uninstall info
init.php <-- Define paths and common functions
install.php <-- Pre-Define configuration options
lang_index.php <-- Define module specific text
lang_index_js.php <-- Define module specific text
routes.php <-- Define URL parameters used by module
Within ./public/assets/modules/MODULENAME you will need 2 more sub directories
/images/
/stylesheets/
-------------------------------------------------------------------------------------------------------
If there were a downloadable module skeleton so to speak, it might even include a routine
to generate the required files, using the new module naming scheme.. For example,
it could create a placeholder directory structure, and the required files for you.
/activecollab/application/modules/MODULENAME/controllers/MODULENAMEAdminController.class.php
and MODULENAMEAdminController.class.php would simply contain placeholder code , using the actual
module name where applicable
etc ....
only get me so far. What I think might assist future module developers, as well as myself, is a
downloadedable module template... if anything to act as a hands on example of where stuff goes, and what
does what .. an example below..
but PLEASE NOTE THIS MAY BE ENTIRELY WRONG ..
-----------------------------------------------------------------------------------------------------
When creating a new module, you'll need to create 2 new directories, naming them identically,
with the new module name.
./activecollab/application/modules/MODULENAME
./public/assets/modules/MODULENAME
Within ./activecollab/application/modules/MODULENAME you will need 3 more sub directories
/controllers/ See http://www.activecollab.com/developer-blog/anatomy-of-activecollab-modules-controllers/ for further info.
/handlers/
/views/
and the following files, which perform these tasks ...
definitions.php <-- Define configuration options
dictionary.php <-- Define language files
handlers.php <-- Define handler routines found within /handlers/
info.php <-- Define module description, version, install & uninstall info
init.php <-- Define paths and common functions
install.php <-- Pre-Define configuration options
lang_index.php <-- Define module specific text
lang_index_js.php <-- Define module specific text
routes.php <-- Define URL parameters used by module
Within ./public/assets/modules/MODULENAME you will need 2 more sub directories
/images/
/stylesheets/
-------------------------------------------------------------------------------------------------------
If there were a downloadable module skeleton so to speak, it might even include a routine
to generate the required files, using the new module naming scheme.. For example,
it could create a placeholder directory structure, and the required files for you.
/activecollab/application/modules/MODULENAME/controllers/MODULENAMEAdminController.class.php
and MODULENAMEAdminController.class.php would simply contain placeholder code , using the actual
module name where applicable
<?php
// we need admin controller
use_controller('admin');
/**
* Manages MODULENAME settings
*
* @package activeCollab.modules.MODULENAME
* @subpackage controllers
*
*/
class MODULENAMEAdminController extends AdminController {
etc ....
You also can generate the documentation via Doxygen (as I did) or PhpDocumentor. The source is perfectly ready for that (thanks Ilija) and the html documentation saves you LOTS of time!
Yes indeed thansk for the tip. Pointing Doxygen at /activecollab/application/modules/ (with recursion enabled) it generated all the docs before I got back from getting a cup of coffee. Now it's just a matter of wrapping my brain around it. .
I still think just a dumb "Hello World" like module, to act as module template would be a welcome addition, especially to non-OOP / procedural programmers like myself.
I still think just a dumb "Hello World" like module, to act as module template would be a welcome addition, especially to non-OOP / procedural programmers like myself.



