MVW 代表什么? [英] What does MVW stand for?

查看:36
本文介绍了MVW 代表什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是 AngularJS 页面的内容描述:

Here's the content description for AngularJS page:

AngularJS 本来就是 ​​HTML,如果它是为构建网络应用程序而设计的.具有数据绑定、MVW、MVVM、MVC、依赖注入和出色的可测试性的声明性模板全部使用纯客户端 JavaScript 实现!

AngularJS is what HTML would have been, had it been designed for building web-apps. Declarative templates with data-binding, MVW, MVVM, MVC, dependency injection and great testability story all implemented with pure client-side JavaScript!

那么 MVW 代表什么?(考虑到 MVC、MVVW、MVP 等争吵,我猜随便",Model-View-Whatever =P)

So what does MVW stand for? (Considering the MVC, MVVW, MVP etc squabble, I would guess "whatever", Model-View-Whatever =P)

推荐答案

它确实代表任何事物,如 任何对你有用的东西

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.

多年来,+AngularJS 更接近于 MVC(或者更确切地说是它的其中之一)客户端变体),但随着时间的推移和许多重构和 api 改进,它现在更接近 MVVM——$scope 对象可以被认为是被装饰的 ViewModel我们称之为控制器的函数.

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.

能够对框架进行分类并将其放入其中一个 MV*桶有一些优点.它可以帮助开发者获得更多通过更轻松地创建心智模型来对其 API 感到满意代表正在构建的应用程序框架.它还可以帮助建立由以下人员使用的术语开发人员.

Being able to categorize a framework and put it into one of the MV* buckets has some advantages. 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. It can also help to establish terminology that is used by developers.

话虽如此,我宁愿看到开发人员构建精心设计并遵循关注点分离,而不是将它们视为浪费是时候争论 MV* 废话了.为此,我特此声明AngularJS 成为 MVW 框架 - Model-View-Whatever.无论在哪里代表一切对你有用".

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. And for this reason, I hereby declare AngularJS to be MVW framework - Model-View-Whatever. Where Whatever stands for "whatever works for you".

Angular 为您提供了很大的灵活性来很好地分离演示文稿来自业务逻辑和表示状态的逻辑.请用它燃料您的生产力和应用程序可维护性而不是加热讨论在一天结束时无关紧要的事情很多.

Angular gives you a lot of flexibility to nicely separate presentation logic from business logic and presentation state. 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.

这篇关于MVW 代表什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆