[fpc-pascal] IFPObserved

Graeme Geldenhuys graeme at geldenhuys.co.uk
Wed Sep 11 10:58:53 CEST 2013


On 2013-09-11 07:02, Xiangrong Fang wrote:
> 
> Where can I find detailed documentation on IFPObserved?

It forms part of the Observer design pattern. The Observer design
pattern works the same, irrespective of which language was used to
implement it. So any Observer design pattern documentation should
suffice. Google is your friend... here are the first two links I found:

  http://www.oodesign.com/observer-pattern.html
  http://en.wikipedia.org/wiki/Observer_pattern


> - any example on when and why to use it?

I use the Observer design pattern in part, when I implemented the
compound Model-GUI-Mediator design pattern. Model-GUI-Mediator allowed
me to make any standard GUI component "object-aware", without needing
any descendant components like the DB-aware ones. The Observer design
pattern is used to syncronise in both directions, any data changes
between a GUI component and the Business Object.

I have written some articles on design patterns - strangely no article
on the Observer, but that is probably because it is such a simple [easy]
design pattern.

  http://opensoft.homeip.net/articles/


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the fpc-pascal mailing list