cotonti.com : Old plugins compatibility layer in Siena https://www.cotonti.com Последние сообщения в теме Cotonti en Sun, 05 Oct 2025 20:05:13 -0000 urlkiller would be very cool to know WHAT EXACTLY changes in the API.

i can only think of changing function names, changing var names and some other additions that not really affects the current plugins. Maybe some changes in the DB Tables too...
So if there are only functions, vars, etc. that need some sort of campatibility isn't it possbile to just let the plugin devs some files where all "old" functions & vars in it that they could include if they wish....

require('compatibility_layer_functions');
require('compatibility_layer_vars');

the conversion of plugins will maybe fast but also a little pain in the ass because you have to search/replace everything (again).

If we take a look in the current plugins we'll see that most plugs consists of only a few lines of code. most plugins work with under 1000 lines of code so there isn't so much to do.]]>
пн, 23 авг 2010 19:01:46 -0000
ez Then we can say something usefull about conversion, so I will wait for the specs.

I believe in this case for a big bang, we must not stick to the old ways IF the new way has more advantages. But i agree on a compatability mode for 0.9..]]>
вт, 17 авг 2010 00:50:52 -0000
Kort the 19 plugin makers who could do the job. Then we'll think what to do next.]]> пн, 16 авг 2010 23:12:57 -0000 pieter
How lang does it take to make the compatibility?
Maybe invest this time in plugin conversions.]]>
пн, 16 авг 2010 22:56:03 -0000
Kort пн, 16 авг 2010 22:47:35 -0000 Trustmaster pieter. And I think we'll drop old plugins and old functions when 1.0 comes (most of necessary plugins will have been converted to the new APIs by that time).]]> пн, 16 авг 2010 22:23:54 -0000 pieter
If the original pluginmaker is not willing to invest some time in the plugin, or you can't find someone to do the convert. Your site will be offline, or doesn't have the full behavior as before.

I see it only as a transfer time. Maybe have this ability in 0.9 but not on 1.0. But this give us, not plugin-builders time to do or ask to do the convertions of the needed plugins.]]>
пн, 16 авг 2010 21:33:33 -0000
esclkm I think we need only - FAQ for converting plugings, nothing more.

Or Capability plugin - witch user can install - to use all old functions]]>
пн, 16 авг 2010 21:20:43 -0000
Kort As you rightfully noticed, upgrading a plugin to the Siena standard takes absolutely reasonable 15-60 minutes. So any adequately thinking plugin maker can easily add another half an hour (@ most) to add Cotonti-specific features (i.e. autoinstaller), check for the available functions that can reduce the plugin code & review the code in general, fillout technical info (version #, date, author) and at least test it over again to make sure it runs. This way we could, after sometime, have an ordered repository of proven plugins and filter off the useless rubbish.
I know that this could be a radical offer, but what are we gonna lose? The plugins that do not work anyway? Maybe DonP would ultimately switch over to a different CMS. Otherwise starting from scratch would only bring benefits, clean code, stable & usable modules. And, ultimately, some fresh blood.
My vote is NEITHER.]]>
пн, 16 авг 2010 20:56:39 -0000
Trustmaster пн, 16 авг 2010 19:13:05 -0000 pieter Manually for entire site (switched on by admin)

But can it be done that IF you do an upgrade
- or: this is set to ON for all installed plugins.
- or: all plugins are disabled and you have to put it on manualy.

just to avoid a lot of problems during upgrade.
Maybe put this in the upgrade-script.

This is just an idea.]]>
пн, 16 авг 2010 17:59:37 -0000
Trustmaster
# 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.]]>
пн, 16 авг 2010 17:27:20 -0000