2013年7月5日 星期五

software design mvc (standard)


Model–view–controller (MVC) is a software architecture pattern which separates the representation of information from the user's interaction with it.

The model A model notifies its associated views and controllers when there has been a change in its state. This notification allows the views to produce updated output, and the controllers to change the available set of commands. A passive implementation of MVC omits these notifications, because the application does not require them or the software platform does not support them. The Model consists of application data, business rules, logic, and functions.

A view : A view requests from the model the information that it needs to generate an output representation to the user. A view can be any output representation of data, such as a chart or a diagram. Multiple views of the same data are possible, such as a bar chart for management and a tabular view for accountants.

The controller :A controller can send commands to its associated view to change the view's presentation of the model (e.g., by scrolling through a document). It can also send commands to the model to update the model's state (e.g., editing a document). Mediates input, converting it to commands for the model or view.The central ideas behind MVC are code reusability and separation of concerns.




沒有留言:

張貼留言