MVC Pattern

Views:
 
Category: Education
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

MVC Pattern : 

MVC Pattern

MVC Pattern : 

MVC Pattern Business applications consist of user interface (UI), business logic, and data models. When UI, business logic and data are collapsed into one object in rich users interface, it can lead to some of the following problems: Difficult to use the data outside that object Hard to change the UI, when UI and data are locked in the same object. Hard to use multiple views of the same data. Difficult to synchronize multiple view of the same data.

MVC Pattern : 

MVC Pattern Model - View - Controller (MVC) is an architectural pattern used in software engineering. The MVC pattern is most commonly used to create interfaces for software applications, and, as the name implies, consists of three elements: Model: contains the application data and logic to manage the state of the application. View: present the user interface. Controller: Handles user inputs to change the state on the application.

MVC : 

MVC Model View Controller View tells to controller handle user inputs Controller changes model state Model tells view to update itself View reads state information from model and updates itself.

Summary : 

Summary The MVC pattern provides a clear framework for design. The separation of responsibilities among the model, view and controller elements allows easy substitution of elements without disruptions to the overall application. This lets us easily expand applications based on the MVC pattern to meet changing requirements.

Creating Action Script Class: : 

Creating Action Script Class: Action Script is?????? Object-oriented programming You can decide what happens when a user clicks a button without worrying about how the button (or program) knows that it has been clicked You can decide what changes to make to an object’s properties without knowing the internal mechanics of how those changes were made You can program tasks incrementally without sitting down and writing the whole program from start to finish in one session

Package : 

Package A package is an organizational unit of one or more classes. The package reflects the directory location of your component within the directory structure of your application. Your package statement must wrap the entire class definition.

Constructor : 

Constructor An Action Script class must define a public constructor method, which initializes an instance of the class. The constructor has the following characteristics: No return type. Should be declared public. Might have optional arguments.