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,
Ilija Studen
on Jul 25. 2008. 1:12 am
Hi,
I've recently started a little series of blog posts about activeCollab modules. Currently there are three written and published:
1. Anatomy of activeCollab Modules
2. Anatomy of activeCollab Modules: Controllers
3. Anatomy of activeCollab Modules: Request
more to come... If you have any questions in the meantime just let us know and we'll see to answer as soon as possible.
I've recently started a little series of blog posts about activeCollab modules. Currently there are three written and published:
1. Anatomy of activeCollab Modules
2. Anatomy of activeCollab Modules: Controllers
3. Anatomy of activeCollab Modules: Request
more to come... If you have any questions in the meantime just let us know and we'll see to answer as soon as possible.
activeCollab team member
GREAT ! My!, I must be psychic , I even guessed the title.. well mostly. Thanks aga8in. (where is the jump for joy emoticon?)
Ilija Studen
on Jul 25. 2008. 10:27 am
Dewed:My!, I must be psychic , I even guessed the title..
Yeah, that was funny :) Any comments and suggestions regarding module development are welcome.
activeCollab team member
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!
Ilija Studen
on Jul 28. 2008. 11:17 am
^ Thanks for the tip.
I've checked out Doxygen long time ago and from some reason didn't like it. Now I downloaded nice little .dmg with GUI tool and it worked quite well. Plus it's 100x faster than phpDocumentor. I just need to figure out logic behind packages in the resulting documentation and all will be well :D
I think that we'll start distributing this type of documentation thanks to this little tool. phpDocument was just too painful to be used for every build... Fighting documentation extraction tool is not the most productive way to spend your time.
I've checked out Doxygen long time ago and from some reason didn't like it. Now I downloaded nice little .dmg with GUI tool and it worked quite well. Plus it's 100x faster than phpDocumentor. I just need to figure out logic behind packages in the resulting documentation and all will be well :D
I think that we'll start distributing this type of documentation thanks to this little tool. phpDocument was just too painful to be used for every build... Fighting documentation extraction tool is not the most productive way to spend your time.
activeCollab team member
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.



