How should Cotonti 0.9.x connect compatibility layer for 0.6.x plugins?

33.3% 5
66.7% 10
0% 0

15 Datum 2010-08-16 17:27

Forums / Cotonti / Core Labs / Archive / Poll: Old plugins compatibility layer in Siena

Implementation details

Trustmaster
#25687 2010-08-16 17:27
I have already responded to some fears of loosing all the plugins and existing modifications with the 0.9.0 release:
# Trustmaster : A few things to make Siena gossips more clear:
  1. Yes, there will be changes for plugin and module developers. New APIs, new abilities, some refactoring.
  2. In most cases, converting a plugin from 0.6 to 0.9 is a matter of 15-60 minutes.
  3. There will be an ability to run old plugins through a compatibility layer which provides old functions and some old behavior.
  4. When 0.9.0 will be released, it still will be marked as unstable. For use on production sites we will still recommend Genoa, so 0.6.x will be supported at least until Siena becomes very stable (which may happen by 1.0). By that time we will solve all such problems as lack of documentation, plugins and critical bugs.

In this topic I'd like to know your opinion about how the compatibility layer should be switched on in Siena.

The compatibility layer provides the API most of 0.6.x plugins are used to and makes it possible to install and run such plugins on a 0.9.x site. Technically it's a huge include file containing obsolete functions (which are no longer used in 0.9) and function aliases (because function prefixes will be changed soon) and some tweaks in plugin management and other parts to provide expected behavior.

There are 3 options of connecting this layer, each has its benefits and drawbacks (read below).

Automatic - in this case Cotonti will remember which plugins use the old API and try to connect the compatibility layer every time a part of such plugin is hooked/invoked.
+: everything is done by the engine, administrator may even not know that he's running obsolete plugins. Also the layer is not connected when no 0.6 plugins are invoked.
-: connecting the layer is a performance loss itself, also the automatic connection code is much more difficult than manual and may affect the performance itself.

Manual - if you use obsolete plugins on your site, just switch the compatibility layer on in the Admin CP and it will be used on entire site.
+: much easier to implement than automatic. Better performance when the layer is actually used (less time connecting).
-: the layer will be also connected for requests with no 0.6 plugins invoked.

Always on - old functions are always available.
+: nothing to switch on or off.
-: the worst performance of all as it hits sites running no 0.6 plugins at all. Also may cause plugin developers to slack too much and not wish to try 0.9 benefits at all.
May the Source be with you!