title: mvc模式
layout: pattern
title: Model-View-Controller
folder: model-view-controller
categories: Presentation Tier
tags:
- Java
- Difficulty-Intermediate
总结
Separate the user interface into three interconnected components:
the model, the view and the controller. Let the model manage the data, the view
display the data and the controller mediate updating the data and redrawing the
display.
设计类图
实际案例
设计方案
使用方法
mvc是一个框架模式,它使应用程序的输入,处理和输出分开,最典型的MVC就是JSP + servlet + javabean的模式,主要优点:分离视图层和业务逻辑层也使得WEB应用更易于维护和修改