[wp-hackers] plugin frameworks...

Davit Barbakadze jayarjo at gmail.com
Mon Jan 25 10:17:27 UTC 2010

> I very much like the idea of plugins being completely self-contained.  No bad sides to putting it separate in the plugins folder, except that a user might forget to update the framework when updating a plugin.  Other than that, I think the same issues arise with that as with using my method -- that is a newer version of the framework may be running with an older plugin, and thus you have to be careful of backward compatibility.
> My system is actually a bit more flexible in that last regard, because if a new version really must break backward compatibility, you can just alter the framework's class (e.g. strider_core_2) and you're still good to go.

Yes, I realized this after I sent a message - users maybe scared off
by too deep intervention into their wp installation. Another guy
mentioned this - could be really handy if wordpress had internal
support for libraries. So yes, your approach could be better in some
sense, but then I still do not see why older plugin may need a newer
library, especially when renewing is not guaranteed. So if newer
library let's say does a patch on some crucial vulnerability, and then
on deactivation it will suddenly bail out to older bugged version,
then if anything will happen through this hole, no one and especially
user will probably never understand what had happened at all.

What if framework will stay inside the plugin folder, but using a bit
of your approach will place a notice in global space about what
version is activated and actually from where it was loaded and then a
plugin with newer version of framework will renew all existing
versions of framework upon install. Damn... I think that's a bit too
much :D

I think placing framework in seperate directory accessible from all
plugins and then holding an eye on backward compatibility can be the
best approach.Would be great if wordpress had support for that! You
can't keep renaming your classes forever, right? Or it least it's not
a cleanest way. It has something of the flat plugin coding, when
functions are not encapsulated in class and just prefixed. I used to
use it initially and always felt uncomfortable.

Davit Barbakadze

More information about the wp-hackers mailing list