Do We need to combine modules and plugins?

60% 12
35% 7
5% 1

20 Date 2011-01-17 04:57

Forums / Cotonti / Development / Poll: modules and plugs

esclkm
#1 2011-01-17 04:57
version 09. Beta. In the 09 version is clearly identified modules. But between the modules and plugins difference was absolutely incomprehensible.
May be we need join them?
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
This post was edited by esclkm (2011-01-17 16:57, 13 years ago)
ez
#2 2011-01-17 05:17
I agree,
The name of the module or plugin should be clear enough :)
==- I say: Keep it EZ -==
GHengeveld
#3 2011-01-17 05:57
No. The difference is clear enough:

Modules provide stand-alone and usually quite comprehensive systems that serve a very specific purpose, which often has little to do with core functionality. They normally fill the entire page. Modules would mostly be used by application developers that use Cotonti only as a framework. Hooks should be provided inside the module in order to allow plugins to extend the module. Modules are less likely to use hooks (other than standalone), since they provide new functionality rather than extending existing functionality. They should not depend on other modules or plugins.

Plugins provide enhancements and additional functionality for existing features, either in core or in another plugin or module. They usually do not fill an entire page (if visible at all). Plugins would mostly be used by website owners to customize the website's behavior. They should not use the 'standalone' hook.

Technically the difference between the two is limited to the fact that a module has its own .php file in the root of the site, so it's not called through plug.php like plugins. This allows for more flexibility in the naming of variables and url parameters (some are already in use by plug.php so can't be used by plugins). In the future I would like to see Modules get more technical capabilities in terms of development, in order to make the difference between the two also of technical nature. I'm thinking of object-oriented programming and a Model-View-Controller architecture (for which Trustmaster has developed quite a powerful framework, but it's still experimental).

In the downloads section on the new site, modules and plugins are combined under the name 'extensions' and they reside in the same folders (extension categories), but you can filter by type if you want. When adding an extension, you have to indicate whether its a module or plugin.
This post was edited by Koradhil (2011-01-17 06:43, 13 years ago)
Kort
#4 2011-01-17 17:27
While the general idea is pretty much clear, classification entire page + php file in the root / block (not visible) is definitely not good enough.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
esclkm
#5 2011-01-17 21:45
koradhil. in your way how do you think it is module or plugin:
a. rss
b. polls
c. search
and why?
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
GHengeveld
#6 2011-01-18 02:03
RSS and Search in their current form would be plugins since they extend upon existing functionality (namely pages). If they would be modified to be more generic (and provide an API for example), they could be classified as modules.

Polls is a tricky one, but I'd classify it as a module since it provides new functionality and doesn't strictly rely on existing features (of course for forum polls it does, but that would be a plugin inside a module, actually I'd split these two into separate extensions).

The way the extension is displayed (either fullscreen or as a component) is only a rough guideline and doesn't work in all cases. The main factor should be whether the extension introduces stand-alone functionality without relying on other modules.
Trustmaster
#7 2011-01-18 03:56
I'm sure this has been discussed before, just can't find the right topic. I don't think it is possible to merge modules and plugins in Siena at all. Probably this question is for Renaissance, but it will be obvious by that time whether such a distinction really makes sense for extension developers.
May the Source be with you!