Science Fair Projects Ideas - Observer pattern

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Observer pattern

The observer pattern is a design pattern used in computer programming to observe the state of an object in a program.

The essence of this pattern is that several objects (called listeners ) are registered to hear for an event which may be raised by some object. (The object which may raise an event holds a list of the listeners.)

When the event is raised for each listener is called a some callback (which may be either a virtual method of the listeners class or a function pointer (more generally a functor) passed as an argument to the listener registration method).

Typical usages

The typical usages of the observer pattern:

  • Listening for changes of the value of a property of an object. Note that often callbacks called in response of a property value change also change values of some properties, so sometimes causing an event cascade. See this article for a discussion about using observer pattern for watching over changes of properties and updating other properties accordingly.

Implementations

The observer pattern is implemented in numerous programming libraries and systems, including almost all GUI toolkits.

Some of the most notable implementations of this pattern:

External link

http://www.dofactory.com/Patterns/PatternObserver.aspx

Last updated: 10-11-2005 12:52:58
10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice