[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Modules



Hi Hitesh,

    What sort of interface are you looking at for the extensability of your
existing system. We've got a wonderful API, but there doesn't appear to be a
really simple way to just 'plug-and-play' user contributed modules. As near
as I can tell right now, I'd have to, at the very least, add an entry for
the module in menu.html.

    This has the potential to make it somewhat difficult for users to write
modules that can be distributed outside of the main distrobution.

    Perhaps a possible solution is to come up with a "package" format.
Something like this:

    User writes module, including all the html page templates. User creates
a configuration file, something like .ns-module-config that looks something
like this:

-- Begin NorthStar Module Configuration --
Name: My Module
Version: 1.0
Module File: mymodule.pm
HTML Files: myhtml1.html myhtml2.html ...
Menu Entry: My Awsome Module
-- End Configuration --

    All of this is compressed into a .tar.gz file. Then the user logs in as
a user with the correct permissions and under admistration goes to the
Modules section. He specifies if he wants to add/remove/upgrade the module.
Tells the system where to find the .tar.gz file, and then northstar
uncompresses the file, copies the internals to thier respective places, and
adds an entry under the "Modules" section of the menu.html for "My Awsome
Module." Then it adds a line to either the DB or a configuration file that
specifies that module of Name with Version has been installed. Then for
upgrades it just needs to check those 2 lines and if the name matches and
the version number is greater then the existing version, it upgrades. If you
want to delete, it has the original configuration file that came with the
package, it can delete those files, and remove the DB/File entry for that
module.

    Another thought that would work with the above, is to make the menu bar
automatically generated instead of a static file. It's a little more
processor heavy, but since that frame is only generated under specific
conditions, IE load of program, or the adding/removing/upgrading of a
module...

    I'd be happy to help try and come up with all the code for this, and out
of curiousity, do you use any of the Instant Messager programs?

Adam "Tauvix" Debus
Network Administrator, ReachONE Internet
adam@reachone.com