U may come across model view controller desigh pattern.It was first introduced by
Trygve
Reenskaug. More details,MVC can be broken down into three elements.
<1>Module Usually,in enterprise software,it presents the logic of the commercial bean.To the SE Swing GUI,it contains data and the rules that
govern access to and updates of this data.
<2>View It specifies exactly how the module data should be presented,changing with the model data.
<3>Controller Controller defines all the methods connecting to the user action which are called by the View.
Especially,the model doesn't carry a reference to the view but instead uses an event-notification model to notify insteaded parties of a change.One of the consequences of this powerful design is that many views can have the same model.When a change in the data model occurs,each view is notified by a property change event and can change itself accordingly.Hence, the controller may mediate the data flow between the model and the view in both directions,which helps to more completely decouple the model from the view,and the controller may also provide the methods which effect the model's property changes for one or more views that are registered with it.
....Next,may be the two days after tomorrow ,I ll give a real example to explain this schema in details.......
posted on 2007-03-26 23:16
wqwqwqwqwq 阅读(432)
评论(0) 编辑 收藏 所属分类:
No Category