Jump to content

view vs view-model


Makwana Prahlad

Recommended Posts

I think you're referring to MVC Model View Controller.  

If you're asking about the diff between Model and View,

The Model gets the data from your tables, or other data source, and the View displays it on the browser page.

I use my MVC everyday.

Keeps me sane.

 

Edited by niche
Link to comment
Share on other sites

The idea of a view-model is a slight alteration to the ordinary Model-View-Controller paradigm. First of all, to make things clear, there's no solid definition for what MVC is, it's just the idea of dedicating one of three different functions to each piece of your software.

In the paradigms that contain a view-model component (I've seen the Model-View-ViewModel paradigm mentioned before), a view-model is a model that is attached to a view in such a way that an alteration to the model directly alters the view that it is connected to without the need for a controller to read the model and pass the data to the view.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...