Refactoring: Improving the Design of Existing Code (RuBrd Edition) by Martin Fowler

Refactoring: Improving the Design of Existing Code (RuBrd Edition) by Martin Fowler

Author:Martin Fowler [Fowler, Martin]
Language: spa
Format: epub
ISBN: 0-201-485672| 464 pages
Publisher: Addison Wesley
Published: 2012-05-11T14:40:34+00:00


Using Event Listeners

Duplicate Observed Data also applies if you use event listeners instead of observer/observable. In this case you need to create a listener and event in the domain model (or you can use classes from AWT if you don't mind the dependency). The domain object then needs to register the listeners in the same way that observable does and send an event to them when it changes, as in the update method. The interval window can then use an inner class to implement the listener interface and call the appropriate update methods.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.