问题描述
我最近听过一词(模型视图控制器),最近用大量的嗡嗡声抛弃了,但是真的是什么?
推荐答案
您可能想看看Martin Fowler对MVC,MVP和UI架构一般要说的话,请 Martin Fowlers网站.
其他推荐答案
我喜欢 Martin Fowler的这篇文章严格来说,您会发现MVC实际上或多或少死了,它的原始UI编程领域.视图和控制器之间的区别不适用于大多数现代UI工具包.
这个词似乎最近在Web编程界发现了新的生活.我不确定这是否是真正的MVC,还是仅重用一些密切相关但微妙的想法的名称.
其他推荐答案
MVC是最初在Smalltalk的旧时代开创的设计模式.
概念是模型代表您的应用程序状态和逻辑,并且控制器将在"视图"之间处理IO.
视图是模型中状态的表示.例如,您的模型可能是电子表格文档,您可能具有将其表示为电子表格的视图,并且将其表示为枢轴表的视图.
现代MVC已被假MVC网络垃圾污染,所以我会让其他人回答.
问题描述
I've heard the term MVC (Model View Controller) tossed about with a ton of Buzz lately, but what really is it?
推荐答案
You might want to take a look at what Martin Fowler has to say about MVC, MVP and UI architectures in general at Martin Fowlers site.
其他推荐答案
I like this article by Martin Fowler. You'll see that MVC is actually more or less dead, strictly speaking, in its original domain of rich UI programming. The distinction between View and Controller doesn't apply to most modern UI toolkits.
The term seems to have found new life in web programming circles recently. I'm not sure whether that's truly MVC though, or just re-using the name for some closely related but subtly different ideas.
其他推荐答案
MVC is a design pattern originally pioneered in the olden days of smalltalk.
The concept was that a model would represent your application state and logic, and controllers would handle IO between "Views".
A View was a representation of the state in the model. For example, your model may be a spreadsheet document, and you may have a view that represents it as a spreadsheet and a view that represents it as a pivot table.
Modern MVC has been polluted with fake MVC web junk, so I'll let others answer that.