Re: Observer pattern limitations




"David Barrett-Lennard" <davidbl@xxxxxxxxxxxx> wrote in message
news:1152791259.531038.17880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
....
My posting was all about clarifying the (limited) scope of the observer
pattern. The title of the thread was "Observer pattern limitations".
Yes, using the observer pattern when it shouldn't makes it an
anti-pattern. I stated in my conclusion that the observer pattern
should only be used in relatively simple examples where problems like
dirty reads don't occur.
....
Your logic is amazing.

....
Basically, at the end of your original post, you concluded that observer
pattern is not suitable for your problem, but you claim that the pattern is
flawled... I find your logic amazing!
At least 3 of your problems will disappear if you use another language
(SmallTalk, Java, to name a few), but you claim that the pattern is
flawled... I find your logic amazing!
:-D

Unless you want a flame war, you shouldn't start a thread in a OO group with
""This reflects a sorry lack of formalism in the OO community"
(or with "databases rulez, OO suxs!", but it happens anyway...:-D ).
If you want to discuss oberver pattern limitations you are welcome, but
let's discuss it in the scope of the pattern.
Observer pattern clearly shows the subject and a list of observers, you have
problems with a composition of subjects and observers in a graph with
cycles... IMHO that should be another pattern (Composition of observers?),
also no OO practitioner I know assembles multiples patterns and expect to
work just because they're patterns.
The dirty reads and cycles in the graph are valid problems but I fail to see
how they're in the scope of the observer pattern.
Maybe if you explain a little more about the problem, we can help to find a
better solution.

Regards
Gabriel Claramunt





.



Relevant Pages

  • Re: Observer pattern limitations
    ... but let's discuss it in the scope of the pattern. ... Observer pattern clearly shows the subject and a list of observers, ... And what about exceptions? ...
    (comp.object)
  • Re: Observer pattern limitations
    ... The title of the thread was "Observer pattern limitations". ... ""This reflects a sorry lack of formalism in the OO community" ...
    (comp.object)
  • Re: MVC-Pattern in my C# GUI !?!
    ... | May I advise that you can't "add" MVC in an application, ... the MVC pattern to an existing app that currently doesn't use the MVC ... | You should not have anything other than visual controls on your forms, ... | have wrapper classes that implement the Observer pattern and carry out the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: c# events - 2 independent classes listening to each other?
    ... >>What you are referring to is the Observer pattern. ... I just read about the mediator pattern and it does seem to ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: To send appended ascending ramp with sine to oscilloscope through board AT-MIO-16XE-
    ... but the problem is when i am sending this pattern to ... morover when i contnuously run it under while loop. ... input to sine frequency and then i run the sine one cycle in a loop. ... to which i can control like if i want to send 4 cycles or 400000 cycles ...
    (comp.lang.labview)