I’ve developed a plugin loading mechanizem, and as a result of the plugins hierarchy design, to be mostly abstract level programming, and with as least high level programming as possible, the plugin class hierarchy of the top most plugins may reach eight.
I’ve been loading tens of plugins to stretch the loading time, and it seem to load quite OK, so I’m wondering what are the bad side effect of the inheritance design, aside of the “inheritance vs composition” design issues, things like performance issues, in loading, or run-time.
I would add and say, this is not a plugin model design issue, this is application design issue over the plugin model, should the application know all of its plugins? or should the application define plugins which may have their own plugins that the main application would not be aware of them. The design works for me, and it saves me tones of coding time, the question is how would it behave in run-time?
Thanks in advance,
Adam Zehavi.
I think that the problem with a deep hierarchy isn’t so much related to perforfance.
It’s more about maintainability of your code. Anyway if you feel to need such a deep hierarchy use it, or post more details.
Of course you have to pay attention to what you are doing. For example:
Number of calls to foo() is proportional to how much is deep your hierarchy. If you are doing things like that, then performance could be quite relevant.