6
Ok I am actually developing the whole idea of interdependencies amoung modules as I work this morning. But the main idea I can outline here...
You write a social module that requires a private message to be able to be sent out.
When you wrote the module you wrote it to be compatible with pm,( Versions 1.0, 2.0 and 3.0) as well as SuperPm (Versions 1 and 2 ) and lastly PmPlus (Versions 1, 2, 3). (These names are totally made up to prove a point...)
You have your functions related to sending private messages setup in seperate files, one for Pm, one for SuperPm, and PmPlus (assuming the versions for the same modules all provide the same functions we need). You also have a file setup that perhaps has a simple replacement in case none of the other modules is available.
When you install the module for the first time you have the pm, superpm, pmplus and default modules all in order of preference and check for a compatible version. Once selected the associated module file is included in the module to support which module you are using. (Lets assume SuperPM version 1 for this example.)
Ok now we upgrade SuperPM to version 2. This will check for dependencies before upgrading the module. It will warn us that our social module depends on this module for functionality but is compatible and if we continue the social module may be affected.
If we then upgraded to SuperPM version 3 it would check and figure out it is not a compatible version to our social module and warn us that we will need to upgrade our social module to maintain compatibility. If you continue then the social module would automatically become inactive until you do an "upgrade". (The compatibilities could be in the info file for the module. )
Also if you remove the SuperPm module it would warn of dependencies and if you continue it would deactivate the social module requiring you to Update the social module.
Lets say you removed the SuperPM module and now went to the PmPlus module, after it disabled the Social module and you install the PmPlus module and make sure it works you then can go back to your social module and do an upgrade or maybe update would be a better term to allow it to use the new module.
Does this make sense?
Since it is all done at the install/uninstall/upgrade module process it should not effect the usability of the system over all and require minimal downtime to upgrade.
The method to carry out all of this will become obvious to me when I actually have the time to dig through the source code and figure out how things are done. But you should get the main idea anyhow.
Rodney
Attending College working towards Bachelors in Software Engineering and Network Security.