Hi group,
I need an help about designing a pluggable architecture for a library.
This is the idea.
Starting from a Namespace, I need to create a Namespace::Library::Base
class that will be extended by external libraries.
Namespace::LibraryFoo < Namespace::Library::Base
Namespace::LibraryBar < Namespace::Library::Base
[…]
Namespace::Library::Base includes all methods and subclasses needed by
all Namespace::Library* libraries.
But now comes the problem.
Namespace::Library is provided with a set of useful additional classes/
modules, for example
Namespace::Library::XMLParser (module)
Namespace::Library::BaseResultSet (class)
and so on.
Consider the following case
Namespace::LibraryFoo < Namespace::Library::Base
Namespace::LibraryBar < Namespace::Library::Base
and Namespace::LibraryBar::ResultSet <
Namespace::Library::BaseResultSet
Which is, in your opinion, the best way do design this pluggable
architecture.
I was looking at 2 different approaches:
- mixin (include/extend)
- include specific libraries when required
What is your opinion?