mercredi 4 janvier 2017

Extend a non-GUI framework by a GUI

I have a "framework" which does its job if I use it via code. That's good because not all systems the framework will run on have the graphical stuff installed.

Now I want to create a graphical user interface for this framework. Because a big, self managed composite of the framework is finally running, I don't want to create a parallel GUI hierarchy and reimplement all the self managing stuff for the GUI as well as organize the . Indeed my idea is to create just an extension for each class, e. g. called gui which can be included in the main window later. Hence, I would sketch it as follows:

enter image description here

In this illustration I don't like the multiple inheritance. As the example with m2() shows it introduces some issues. Here, it's the question: "Which m(2) is executed by ConcreteGui, the updated one from AbstractGui or the outdated one from AbstractClass which came from ConcreteClass?"

Which approach or design pattern can I use?

Aucun commentaire:

Enregistrer un commentaire