1140
After further thought on this, I do agree that with the current system individual developers can do something like this and you end up with module systems like the "smart" ones or other ones like the "altsys" stuff. However...
I believe if you standardize a way to do this it makes things easier for everyone because I know as a developer I don't want to remake every wheel or copy someone elses code when I do something with a module. Or depend on someone having a particular module installed to make mine work. But if I can allow a module I make work better by using other modules and do so easily then I think it is a good thing. There is no reason this couldn't work much like how the Language system works for translation.
You could definitely use a hash table to list the available routines to use. If defined flexible enough this could be used also to provide for unique options with the modules as well. One such item could be the simple add/remove users item as listed above. The profile module could look for other modules that have a "delete user" or "add user" function that need to be run along with the one from the profile module and yet do so in a way that doesn't require hacking of the original profile module. But I envision still a system that would be used during the install/upgrade/uninstall cycle and not during normal use to prevent a performance hit.
Perhaps a table for interconnected functions such as the one listed here and another for the module "offerings" and dependencies.
I STRONGLY believe after much thought that this is something that should be dealt with when modules are installed/upgraded or uninstalled. I would have to believe if it is done at that time any performance hits should be negated since when you get done installing the module the modules installed should operate no differently then normal modules do now. All of the work is done by the admin and only the end result is seen by the users.
The xoops_version file could have a "dependency" field added and go from there. You could support having different combinations of dependencies by having each line list all the dependencies for that module. (Ie if you could use 1 module or a combo of two modules then you would have the first line list the single module and the second line have the other two modules listed. Thus you can satisfy the dependency with either line being satisfied)
A new Module could be developed to handle the dependencies etc. I envision a module that would work much like the dpkg utility under Ubuntu to handle this stuff. Where you use the utility to install the modules, check for dependencies and activate or deactivate modules as necessary based on dependencies.
My intent with this project overall is that as I get up to speed with PHP and how XOOPS is put together I will help out with trying to improve the flexibility and scalability of this system. In doing so I learn the ins and outs of how the system works and can help build a better system for my own stuff as well. I am outlining a unique dating/social site at this point and no one is doing anything close to what I am doing. Flexible, fast software is needed to run what I want to do and by helping develop XOOPS into a better system MY site will be that much better then anything currently available. I only mention this so you understand my motivation.
Anyhow enough grandstanding for one day, I hope this is something useful and I am off to go play with source code and start figuring out some things.
Rodney
Attending College working towards Bachelors in Software Engineering and Network Security.