MVW代表什么?

本文翻译自:What does MVW stand for?

Here's the content description for AngularJS page: 这是AngularJS页面的内容描述:

AngularJS is what HTML would have been, had it been designed for building web-apps. 如果AngularJS是为构建Web应用程序而设计的,则HTML将会是HTML。 Declarative templates with data-binding, MVW, MVVM, MVC, dependency injection and great testability story all implemented with pure client-side JavaScript! 具有数据绑定,MVW,MVVM,MVC,依赖项注入和出色的可测试性故事的声明性模板全部通过纯客户端JavaScript实现!

So what does MVW stand for? 那么MVW代表什么呢? (Considering the MVC, MVVW, MVP etc squabble, I would guess "whatever", Model-View-Whatever =P) (考虑到MVC,MVVW,MVP等争吵,我猜是“无论如何”,Model-View-Whatever = P)


#1楼

参考:https://stackoom.com/question/tvbh/MVW代表什么


#2楼

It stands indeed for whatever, as in whatever works for you 它确实代表了一切,就像对您有用的一切一样

MVC vs MVVM vs MVP. MVC vs MVVM vs MVP。 What a controversial topic that many developers can spend hours and hours debating and arguing about. 许多开发人员可能花费数小时来辩论和争论,这是一个有争议的话题。

For several years +AngularJS was closer to MVC (or rather one of its client-side variants), but over time and thanks to many refactorings and api improvements, it's now closer to MVVM – the $scope object could be considered the ViewModel that is being decorated by a function that we call a Controller. 几年来+ AngularJS更接近于MVC(或其客户端变体之一),但是随着时间的流逝,由于许多重构和api的改进,现在它更接近MVVM – $ scope对象可以被认为是被我们称为控制器的函数修饰。

Being able to categorize a framework and put it into one of the MV* buckets has some advantages. 能够对框架进行分类并将其放入MV *存储桶之一具有一些优势。 It can help developers get more comfortable with its apis by making it easier to create a mental model that represents the application that is being built with the framework. 通过使创建表示使用框架构建的应用程序的思维模型更容易,它可以帮助开发人员更熟悉其api。 It can also help to establish terminology that is used by developers. 它还可以帮助建立开发人员使用的术语。

Having said, I'd rather see developers build kick-ass apps that are well-designed and follow separation of concerns, than see them waste time arguing about MV* nonsense. 话虽如此,我宁愿看到开发人员构建经过精心设计并遵循关注点分离的踢屁股应用程序,也不愿看到他们浪费时间争论MV *废话。 And for this reason, I hereby declare AngularJS to be MVW framework - Model-View-Whatever. 因此,我特此声明AngularJS为MVW框架-模型-视图-任何。 Where Whatever stands for "whatever works for you" . 凡代表“一切为您服务”的地方

Angular gives you a lot of flexibility to nicely separate presentation logic from business logic and presentation state. Angular为您提供了很大的灵活性,可以很好地将表示逻辑与业务逻辑和表示状态分开。 Please use it fuel your productivity and application maintainability rather than heated discussions about things that at the end of the day don't matter that much. 请使用它来提高您的生产力和应用程序可维护性,而不是热烈讨论一天之内无关紧要的事情。


#3楼

Having said, I'd rather see developers build kick-ass apps that are well-designed and follow separation of concerns, than see them waste time arguing about MV* nonsense. 话虽如此,我宁愿看到开发人员构建经过精心设计并遵循关注点分离的踢屁股应用程序,也不愿看到他们浪费时间争论MV *废话。 And for this reason, I hereby declare AngularJS to be MVW framework - Model-View-Whatever. 因此,我特此声明AngularJS为MVW框架-模型-视图-任何。 Where Whatever stands for "whatever works for you". 凡代表“凡事为您服务”的地方。

Credits : AngularJS Post - Igor Minar 鸣谢: AngularJS Post-Igor Minar


#4楼

MVW stands for Model-View-Whatever . MVW代表Model-View-Whatever

For completeness, here are all the acronyms mentioned: 为了完整起见,这里提到的所有首字母缩写词:

MVC - Model-View-Controller MVC- 模型-视图-控制器

MVP - Model-View-Presenter MVP- 模型视图演示者

MVVM - Model-View-ViewModel MVVM- 模型-视图-视图模型

MVW / MV* / MVx - Model-View-Whatever MVW / MV * / MVx- 模型视图

And some more: 还有更多:

HMVC - Hierarchical Model-View-Controller HMVC- 分层模型视图控制器

MMV - Multiuse Model View MMV- 多用途模型视图

MVA - Model-View-Adapter MVA- 模型视图适配器


#5楼

  1. https://en.wikipedia.org/wiki/MVW https://zh.wikipedia.org/wiki/MVW
  2. https://en.wikipedia.org/wiki/AngularJS https://zh.wikipedia.org/wiki/AngularJS
  3. https://angularjs.org/ https://angularjs.org/

AngularJS — Superheroic JavaScript MVW Framework AngularJS —超级英雄JavaScript MVW框架

  1. https://plus.google.com/+AngularJS/posts/aZNVhj355G2 https://plus.google.com/+AngularJS/posts/aZNVhj355G2

在此处输入图片说明


#6楼

I feel that MWV (Model View Whatever) or MV* is a more flexible term to describe some of the uniqueness of Angularjs in my opinion. 我认为MWV(无论模型视图如何)或MV *是一个更灵活的术语,以我的角度描述Angularjs的某些独特之处。 It helped me to understand that it is more than a MVC (Model View Controller) JavaScript framework, but it still uses MVC as it has a Model View, and Controller. 它帮助我了解到它不仅仅是一个MVC(模型视图控制器)JavaScript框架,但它仍然使用MVC,因为它具有模型视图和控制器。

It also can be considered as a MVP (Model View Presenter) pattern. 也可以将其视为MVP(模型视图演示器)模式。 I think of a Presenter as the user-interface business logic in Angularjs for the View. 我认为Presenter是Angularjs中View的用户界面业务逻辑。 For example by using filters that can format data for display. 例如,通过使用可以格式化数据以进行显示的过滤器。 It's not business logic, but display logic and it reminds me of the MVP pattern I used in GWT. 它不是业务逻辑,而是显示逻辑,它使我想起了我在GWT中使用的MVP模式。

In addition, it also can be a MVVM (Model View View Model) the View Model part being the two-way binding between the two. 另外,它也可以是MVVM(模型视图模型),视图模型部分是两者之间的双向绑定。 Last of all it is MVW as it has other patterns that you can use as well as mentioned by @Steve Chambers. 最后是MVW,因为它还有您可以使用的其他模式以及@Steve Chambers提到的模式。

I agree with the other answers that getting pedantic on these terms can be detrimental, as the point is to understand the concepts from the terms, but by the same token, fully understanding the terms helps one when they are designing their application code, knowing what goes where and why. 我同意其他答案,即学究这些术语可能是有害的,因为重点是要从术语中理解概念,但同样,充分理解这些术语也可以帮助他们在设计应用程序代码时知道什么去哪里,为什么。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值