关于Backbone的MV*与MVC的理解
Liber 2013-01-22 19:40

引用Backbone官方的Change Log来看:
“0.5.0 — July 1, 2011 —”
“Controller was renamed to Router, for clarity.”

原来,我们现在用的Backbone.Router.extend原来的写法是Backbone.Controller.extend。
用clarity这个单词,表示在Backbone中,用Router代替Controller的叫法更清楚。
事实上,国外很有代表性的一部分人,更愿意把Backbone这种模式叫做MV*:
“JavaScript ‘MVC’ frameworks that can help us structure our code don’t always strictly follow the above pattern. Some frameworks will include the responsibility of the Controller in the View (e.g Backbone.js) whilst others add their own opinionated components into the mix as they feel this is more effective.
For this reason we refer to such frameworks as following the MV* pattern, that is, you’re likely to have a View and a Model, but more likely to have something else also included.”

Backbone的MVC思想的实际体现是通过Router来访问服务端程序的控制器来达到目的的;
而且,在Model和View中,都可能会存在一些前端的Controller代码。

所以我们可以说,Backbone是一个前端的MV*框架,它可以充分发挥服务端程序的MVC思想,为Web应用程序开发提供了很好的框架支持。