Interfaces create a level of abstraction and define a contract.  If properly 
written they do not have major class dependencies.  You always use then in 
components published from modules since the loading app can’t talk directly to 
the class otherwise the class gets linked into the main app and the module is 
worthless.

In other cases, you don’t care what class implements the contract so that other 
folks can supply alternate implementations that don’t require the same base 
classes.


On 2/4/10 2:49 AM, "criptopus" <[email protected]> wrote:






Why would you choose when making a component to create a interface for the 
component to pass variables to and from it over using say public variables to 
send data to the component and dispatch and listen events to return data back?

I have been using the Lynda.com tutorials and they use public/dispatch and I 
noticed from the MobileTitleWindow you could use a class interface with get and 
set?

- Stephen






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to