model-view-controller(MVC)
In object-oriented programming development, model-view-controller (MVC) is the name of a methodology or design pattern for successfully and efficiently relating the user interface to underlying data models. The MVC pattern is widely used in program development with programming languages such as Java, Smalltalk, C, and C++.
在物件導向設計(面向對象程序設計,縮寫:OOP)中,是一種方法或設計模型將使用者介面成功與有效率地連結給底層資料模型,便是MVC模型。而MVC模型也大量用在於Java, Smalltalk, C, and C++等程式語言的開發中。
The MVC pattern has been heralded by many developers as a useful pattern for the reuse of object code and a pattern that allows them to significantly reduce the time it takes to develop applications with user interfaces.
許多開發者已經將MVC模型視為可重複使用目的碼(目標代碼),並能大量減少使用者界面開發應用程式的有用模式。
The model-view-controller pattern proposes three main components or objects to be used in software development:
在MVC模型當中,提出三個主要提出三個主要組建或對象被使用在軟體開發當中:
A Model , which represents the underlying, logical structure of data in a software application and the high-level class associated with it. This object model does not contain any information about the user interface.
模型,代表在軟體應用程式中數據的基礎邏輯結構,以及與其相關的高級類別。此物件模型不包含任何關於使用者介面的訊息。
A View , which is a collection of classes representing the elements in the user interface (all of the things the user can see and respond to on the screen, such as buttons, display boxes, and so forth)
視圖,代表使用者界面元素中的類別集合(使用者在螢幕上可以看到與回應的所有事情,像是按鍵、顯示框等等)
A Controller , which represents the classes connecting the model and the view, and is used to communicate between classes in the model and view.
控制器,用於類別與視圖的溝通,亦即代表一個類別連結模型與視圖。