Re: Generalized "observer" pattern
On Sep 24, 12:17 am, Gianni Mariani <gi3nos...@mariani.ws> wrote:
Two issues here:
a) What is the accepted definition of "observer pattern".
While I can't point to anything specific, I do remember having
issues with inconsistency in the definition.
I don't know if there is anything really formal, but I'd tend to
go with the description in the GoF book, if only because it
seems to be the most widespread.
b) Generic observer design in C++. I have been pushing the Austria
"Twin" interface for a while and more recently the multi threaded
version of it "TwinMT" (see the 6129 alpha on sourceforge)
I'm not sure, but "Twin" sounds like you're managing a
one-to-one relationship. In my experience, it's almost always a
1->n relationship: each Observable will have many Observer.
I am trying to distill the "fundamental" hard problems in
software development, especially regarding C++ and I've seen
too many issues relating to the observer pattern I think it is
elevated to "fundamental".
By fundamental issues I mean, "avoiding deadlock conditions",
object lifetime management etc.
And persistency?
You're not the first. Back in the early 1990's, there was a lot
of discussion of "relationship management", with the hope of
finding some nice generic solution. As far as I know, there
were no real useful results, but the issue still seems to be
considered important---Java's hyping "container-managed
relations" in EJB.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34