关于mvc

来源:互联网 发布:mysql select 多表 编辑:程序博客网 时间:2024/04/28 17:32

mvc patter:

Model :business logic Contains all the data manipulated by the system. This can include an interface to an external store, such as a database,typically the model exposes only a public API to the other components

 

View: display code. The widgets that actually place the information in the user’s view. In wxpython ,pretty much anything in the wx.Window hierarchy is part of the view subsystem.

 

Controller :Interaction logic,the code that receives user events and ensures that they are handled by the system. In wxpython ,this subsystem is represented by the wx.EvtHandler hierarchy.


据说这个东西不是什么新鲜的技术,早在1970s的时候smalltalk时代就有此概念,这个概念最早用在gui编程中,是一种结构化编程的思想,现在用在web编程中,用途不同了,东西还是那些东西,道理还是那个道理。
原创粉丝点击