Quote Originally Posted by high_flyer View Post
Thanks, but :

Your suggestion is very similar to what I wrote in post #5.
And as I wrote later, I see it as bad design, to mix UI and logic, and in general to spread the logic over several modules.

It is much cleaner when each modules logic is self contained.

But thanks never the less!
Well, nothing prevents you from implementing that default logic as different plugins, loading them first and passing them to other plugins that might need them. I inferred from your post that these chunks of logic would be some common code you wanted to factor out of the plugins per-se but I might have misunderstood.

There is a fundamental difference between my proposed design and the one discussed in post #5 : in my case the application offers to the plugins some interfaces (possibly coming from other plugins) that can be used to achieve the default behavior and the plugins decide when and how to use them, if at all, to achieve the desired behavior whereas in post #5 each plugin expose specific tasks it can do to alter the default behavior and the application decide to execute them or not at some specific points of the default codepath.