Understanding the Benefits of a Loosely Coupled Architecture

At the end of Lesson 7, "Creating Components with MXML," you were left with a bad practice, having the CategorizedProductManager component reach into its parent document to inform the parent that the category data has been loaded. This created a tightly coupled application, in that the CategorizedProductManager component can work only if it knows the parent has a certain method. A far better practiceand better object-oriented designis to use a loosely coupled architecture that is made possible by using events to notify other components of changes instead of requiring components to know information about the rest of the application. With a loosely coupled architecture like this, components can be reused across multiple applications without requiring a particular structure to the applications.

Adobe Flex 2.Training from the Source
Adobe Flex 2: Training from the Source
ISBN: 032142316X
EAN: 2147483647
Year: 2006
Pages: 225

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net