AngularJS Lesson 2: model-view-cotroller or MVC

We are talking about a rather old concept (MVC was developed during the 70’s for Smalltalk language) where one seperates between:

  • the data of the application (model)
  • the logic (controller)
  • display of the data (view)

This way it is possible to change the view of some data without changing the logic that controlls its value.

MVC in AngularJS

Data (i.e. model) can be even simple Javascript variables.
for example:

 understanding MVC

The truth is, when we read the first description of MVC we tend to get a rather vague concept of it.
The basic idea (the seperation of view from the data and the logic) is clear enough.
We have to remember though that we are dealing with a technique that is used for UI, and not for complete software systems.
I hope that during the next few lessons these concepts will get more light.

 


Leave a Reply

Your email address will not be published. Required fields are marked *