MVW paradigm in AngularJS

Quy Nguyen
1 min readJan 3, 2018

AngularJS is introduced as a MVW JavaScript Framework, but do you know what exactly MVW is? MVW stands for Model-View-Whatever, really interesting. We heard about MVC, MVP, MVVM and now it is MVW. So at a first glance, we can guest that MVW includes MVC, MVP and MVVM.

Let’s go deep into MVW, why do they say AngularJS MVW?

AngularJS application is divided into 3 distinct, modular parts:

  • Model: This part is the driving force of the application. You can conceive of it as the data behind the application, usually fetched from the server. Any UI with data that the user sees is derived from the Model , or a subset of the Model.
  • View: This is the UI that user sees and interacts with. It’s dynamic and generated base on the current model of the application.
  • Whatever: This is the most interesting part of MVW, we call it Whatever because it can be Controller/Presentation/ViewModel. It’s the business logic and presentation layer, which perform action such as fetching data and makes decisions such as how to present the model, which parts of it to display, etc.

So, the Whatever part is responsible for basically deciding which parts of the model to display in the View, depending on the implementation, it can be thought of as a Controller, a Presenter or a ViewModel

Originally published at imnnquy.blogspot.com on November 15, 2015.

--

--