I have a web application built using the Zend Framework that contains many modules. These modules are βoptionalβ and are used to provide enhanced functionality. Some of these modules write their own logs, etc. I was thinking about how to implement installation and uninstallation for these modules.
At first, my idea was for each module to have InstallationController , UninstallController , etc., and these handles handle the installation. But then I started thinking about an approach that would include including each module in install.ini , uninstall.ini , etc. Then the kernel has functionality to get around and act on them. An example of an uninstall.ini file for a foo module might be
[save_logs] folder.remove.data.foo folder.remove.modules.foo file.remove.configs.foo [complete : save_logs] file.remove.logs.foo db.table.truncate.foo_table1 db.table.truncate.foo_table2
Then the user will be offered the Complete or Save Logs options when starting the removal of the foo module. One of the factors that I see with this approach is the general main mechanic who processes all the operations and the fact that during the deletion some code of the foo module will not be executed.
I have never done this type of install / uninstall / upgrade support on a web server before, so that any ideas and tips would be nice.
source share