[dev] Writing a new module

Greg horde at waiting-room.org
Thu Feb 19 08:43:46 PST 2004


Hello

In my way to write a new horde module for DNS administration,
i am seeking for advices of experienced Horde programmers, in
order to have a clean and 'horde-compliant' program...

Basically, a user would login and be able to edit the zone
file for the domains he owns.
The module would then have to retrieve the domains data from
the backend, and this data would be organized with classes :
a class for a zone, and classes for each type of record.

I wonder if it would be a good practice,
in order not to refetch the domains/zones data every time
a page is reloaded, to serialize the array carrying all
theyr instances and put in in $_SESSION, or would it be preferable
to use Horde's (or something else) cache mecanism ?
(Basically, i'm not feeling very confident with such 'persistence'
in web apps in general and with Horde in particular)

Here is globally how i think i will organize the module :

list.php -> Present domain data
editDomain.php -> Handle form for domain editing
lib/base.php -> Instantiate Driver and retrieve data (kept in global scope)
lib/Dnsadmin.php -> 'main' class, instantiated in global scope

Do you think it looks good ?

 From which module would you get 'inspiration' for such a thing ?

Thanks a lot for any help

Greg



More information about the dev mailing list