Answer : The Model-View-Controller (MVC) is a compound pattern, or multiple patterns working together to create complexapplications.
- Model Contains the application data and logic to manage the state of the application
- View Presents the user interface and the state of the application onscreen
- Controller Handles user input to change the state of the application
Q12 : What Is Event Flow in term of Event Handling in Flash Action Script 3.0 ?
Answer : The event flow describes how an event object moves through the display list. The event flow is conceptually divided into three parts.
Capture phase: This phase comprises all of the nodes from the Stage to the parent of the target node
Target phase: This consists solely of the target node.
Bubbling phase: The bubbling phase comprises the nodes encountered on the return trip from the parent of the target node back to the Stage.
The ability to add event listeners along the event flow is useful when a user interface component comprises more than one object. For example, a button object often contains a text object that serves as the button's label. Without the ability to add a listener to the event flow, you would have to add a listener to both the button object and the text object to ensure that you receive notification about click events that occur anywhere on the button. The existence of the event flow, however, allows you to place a single event listener on the button object that handles click events that occur either on the text object or on the areas of the button object that are not obscured by the text object.
When events happen to an object on the display list (an object displayed on the screen), all the objects that contain the object are notified of the event and notify their event listeners in turn. This process starts with the Stage and proceeds through the display list to the actual object where the event occurred, and then proceeds back to the Stage again. This process is known as the event flow.
Also get more information on DisplayList API, DOM3 Event Model, ECMAScript for XML (E4X), Runtime error checking, Regular Expressions and Method closures -
http://www.peterelst.com/blog/wp-conten ... as3-mm.pdf
Q12 : What Is Interface or Benefit of Interface in term of OOP ?
Answer :
•Allows you to specify a set of methods that
classes are required to implement
• Classes can implement multiple interfaces,
interfaces can extend each-other
• Interfaces can be seen as contracts to be
developed against, great for frameworks
