MVC設計模式

設計模式:

MVC設計模式:Very famous
Model-view-controller (MVC)

model-view-controller (MVC) 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++.

The MVC 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.

three main components or objects to be used in software development:

1)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.

2)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)

3)A Controller , which represents the classes connecting the model and the view, and is used to communicate between classes in the model and view.

將控制器,模型,視圖分割開來

優點:
1控制器,模型,視圖分開各模組耦合度降低,各司其職.
2類似模組化,可插拔
3主要應用 web開發
4主流框架: Struts, JSF,

缺點:降低系統性能

廣告
新文章
發表留言

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s

%d 位部落客按了讚: