[wp-trac] [WordPress Trac] #22316: Plugin Dependencies (Yet Another Plugin Dependencies Ticket)
WordPress Trac
noreply at wordpress.org
Sat Dec 29 13:56:52 UTC 2012
#22316: Plugin Dependencies (Yet Another Plugin Dependencies Ticket)
--------------------------+------------------------------
Reporter: Viper007Bond | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 3.4.2
Severity: normal | Resolution:
Keywords: dev-feedback |
--------------------------+------------------------------
Comment (by jltallon):
Shared library / on-demand loading functionality:
-----
I would certainly split this issue into a separate issue.
What we have done (I'm ready to share the code if wanted) is to implement
our shared functionality into a series of plugins:
* A shared "framework" plugin, which registers an autoloader and registers
a base namespace where most *base* functionality resides (i.e. base and
utility/shared classes)
* Functionality-providing plugins, which depend on the framework, each
providing a certain set of functionalities (usually within classes derived
from the interfaces contained into the framework, so that one can mix and
match components)
* The plugin-dependencies plugin (v1.2 by Scribu + patches) to try and
avoid an inconsistent mess
Hence, the "libraries" versioning here is not based on particular class
versions (which has the potential of becoming messy) but of *library*
versions (just like it is done with sonames)
E.g.: "library" A v1.2 provides versions x, y and z of classes Foo, Bar
and Baz respectively. So another plugin depending on this shared
functionality needs only "Depends: library (>= 1.2)"
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22316#comment:57>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list