ChatGPT解决这个技术问题 Extra ChatGPT

What does MVW stand for?

Here's the content description for AngularJS page:

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!

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

I think you're right with Model-View-Whatever! code.google.com/p/dark-matter-data/wiki/MVWOverview

F
Fuhrmanator

It stands indeed for whatever, as in whatever works for you per Igor Minar from 2012 (emphasis mine):

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. 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. 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 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.


@FrançoisWahl: I said the same thing to myself not five seconds before reading your comment. MV* probably would have been more immediately obvious to the vast majority of software developers who are likely already familiar with the ubiquitous wildcard '*' convention.
You can't Google MV* . Also… "Whatever" conveys the frustration many people feel when discussing the semantics of MVx
S
Steve Chambers

MVW stands for Model-View-Whatever.

For completeness, here are all the acronyms mentioned:

MVC - Model-View-Controller MVP - Model-View-Presenter MVVM - Model-View-ViewModel MVW / MV* / MVx - Model-View-Whatever

And some more:

HMVC - Hierarchical Model-View-Controller MMV - Multiuse Model View MVA - Model-View-Adapter MVI - Model-View-Intent


F
Fuhrmanator

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".

Credits : AngularJS Post - Igor Minar


x
xgqfrms

https://en.wikipedia.org/wiki/MVW https://en.wikipedia.org/wiki/AngularJS https://angularjs.org/

AngularJS — Superheroic JavaScript MVW Framework

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

https://i.stack.imgur.com/xGyxO.png


J
James Drinkard

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. 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.

It also can be considered as a MVP (Model View Presenter) pattern. I think of a Presenter as the user-interface business logic in Angularjs for the 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.

In addition, it also can be a MVVM (Model View View Model) the View Model part being the two-way binding between the two. Last of all it is MVW as it has other patterns that you can use as well as mentioned by @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.


I also think this points out that it's the Model-View separation (and synchronizing of information between them) that is one of the most important design problems in software.