I am working on sorting out my Javascript code. Currently I have views implemented without any Model or collection. Now I working on separating Model from View. So for this transformation, I am planning as follows:
View ---> X <--- | ---> Server
< Client side >
Assumptions:
- View will not have any data that is to be loaded form server.
- X will talk to server and get the required data. Then X will fire event.
- View will listen to events and update themselves accordingly.
- X is not an exact replica of some entity on server. X will just take those entities/ data from server and then View can request this data from X.
- There will be exactly one X for each View.
Now question is -- What is X called?
Options -- Model, Controller, ViewModel, Presenter, or anything else.
Or Is this very crude thing which can not have terminology?