编辑“Gallery:设计文档:模块需求框架”
该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。
最后版本 | 您的文本 | ||
第1行: | 第1行: | ||
This document describes a high-level overview of a proposed feature. More details are needed before implementation. | |||
Naming: requirements, dependencies | |||
== | == Overview == | ||
The Module Requirements Framework would provide a centralized means to query modules' requirements for proper functioning. Currently, each module checks its own requirements before activation, which leads to a lot of code and string duplication, increasing the maintenance overhead and making the translators' jobs somewhat harder. It would also simplify and speed up module development. | |||
It would work as a module callback function called by the core module during activation or installation that would supply a list of requirements that the module needs. The core module would then check each requirement and in case of failure provide a UI with an explanation to the user. If modules need a specific check not covered in the core module, they could do the check on their own, but use the framework to provide an UI consistent with the other checks. | |||
Current modules would have to be reworked to make use of this framework. | |||
== | == Use Cases == | ||
* | * Check for availability of PHP functions, such as exec(); useful for toolkits, archive modules, etc. | ||
* | * Check for other G2 plugins (plugin that depends on other plugins (with plugin version). See xaraya which has a very good dependency framework. | ||
* | * Check if certain PHP modules are present, e.g. GD (note: usually checked by checking if any function of the PHP extension exists) | ||
* | * Check if a certain version of Apache module is installed, e.g. Rewrite 1.0.2, for permalinks or URL rewrite | ||
* | * Check for G2 toolkit operation / property + mime-type availability. | ||
* ? | * ? | ||
[[Category:Gallery 2:Development|Developers]] | [[Category:Gallery 2:Development|Developers]] |