In my aforementioned class on Object-oriented Analysis and Design we, of course, study design patterns. Here are a few links concerning the observer pattern.
-
In object-oriented programming, objects contain both data and behavior that, together, represent a specific aspect of the business domain. One advantage of using objects to build applications is that all manipulation of the data can be encapsulated inside the object.Here’s the problem: You’re designing a program that will render data describing a three-dimensional scene in two dimensions. The program must be modular and must permit multiple, simultaneous views of the same scene. Each view must be able to display the scene from a different vantage point, under different lighting conditions. More importantly, if any portion of the underlying scene changes, the views must update themselves.The so-called Observer design pattern is introduced in [1]. The following article describes this pattern, tries to explain why the pattern is helpful and takes a closer look at several consequences of using the pattern. Code examples are given in a java-like syntax.Design patterns document recurring solutions to recurring problems in object-oriented software design. They capture design expertise in reusable form. A design pattern has a name, a description of the problem it addresses, and a general solution that designers must tailor to their particular variant of the problem
Post a Comment