Observer pattern/Signal Slot vs PublisherSubsriber pattern
Killing_Zoe at web.de
Sat Feb 24 12:01:49 PST 2007
Hi folks, AFAIK
the Observer / Observable pattern is dealing with One to Many relations
while the Publisher / Subscriber pattern is able (better: Is made for)
Many to Many relations between observers and subjects.
I am actually working on a GUI Framework following the
"Multimedia" Oberon Program Editor "Edit" described in :
Szyperski Write-Ing Applications (implemented in the Oberon OS)
For the impatient, the Texteditor is THE GUI Framework, or simply
said : Scintilla is far away from beeing good enough .
*What I would like to know : Featuring multiple different VIEWS on the
same MODEL including non textual elements like GRAPHS, HYPERTEXT,
RUNTIME_ELEMEMTS within an MDI environment ... Does this really requires
and Publisher/Subscriber implementation.
Let me try to explain it a bit better, For Instance :
My planned Multimedia Editor contains 2 classes their graphical
representation (UML f.i.) modul dependencies, http links, EBNF
visualisation an DSL Interpreter... may be they are sharing one window,
may be the are splittet.Modifying something should/could have an direct
impact to everything else.
Can Observer based Signal/Slot do that for me, or is in this case the
publisher/subscriber pattern the preferable implementation ?
Opinions, hints, ideas are Welcome
Many thanks in advance, Bjoern
More information about the Digitalmars-d-learn