« 上一篇 | 下一篇»

MVC 架構

reic | 21 十一月, 2006, 23:39 | 科技新知 , 網站設計 | (1474 Reads)

Model-View-Controller is a software design pattern that helps you logically separate your code, make it more reusable, maintainable, and generally better. Model View Controller was first described by the author group Gang of Four. Dean Helman wrote (an extract from Objective Toolkit Pro white paper):

 

"The MVC paradigm is a way of breaking an application, or even just a piece of an application's interface, into three parts: the model, the view, and the controller. MVC was originally developed to map the traditional input, processing, output roles into the GUI realm.

Input -> Processing -> Output
Controller -> Model -> View


The user input, the modeling of the external world, and the visual feedback to the user are separated and handled by model, view port and controller objects.
  • The controller interprets mouse and keyboard inputs from the user and maps these user actions into commands that are sent to the model and/or view port to effect the appropriate change.
  • The model manages one or more data elements, responds to queries about its state, and responds to instructions to change state.
  • The view port manages a rectangular area of the display and is responsible for presenting data to the user through a combination of graphics and text."


延伸閱讀:

 

靜態連結網址 | 迴響 (0) | 引用 (0)
作者保留此著作部分權利, 採CC授權。
友善列印/Print  Add this post to Delicious.   Add this post to Hemidemi.  Add this post Yahoo My Web.  Add this post Google Bookmarks.  Add this post MyShare. 
發表迴響












:authimage



  

Comments