A spot for Observer/Observable

One of the targets of object-oriented programming is the separation of truly re-usable code from application specific code. We have all experienced the unfortunate intermingling of these two parts of the development process. There are occasions where the left hand needs to know of some things that are happening deep inside the inner workings of the right hand. In these cases, inter-project dependencies can be minimized by use of the Java Observer interface and Observable class.

Most software development projects will include some sort of utility project tailored to the needs of the development team, and this project may be used as a common  node of communication among the isolated projects incorporated in the overall development project. Here is a slot for the Observer interface and Observable class. A singleton Observer can provide a simple, extendable nexus for broadcasting updates from the Observable classes from functionally and physically isolated sub-projects, allowing for ‘development in isolation’, certainly a need of all software development projects in this age of parceled development and out-sourcing.

Leave a reply

You must be logged in to post a comment.