The M.V.C. (Model-View-Controller) Pattern in Javascript is a bit weird, because the view is the element of the DOM, but we can use this method to separated logic and ajax calls in:
- View: DOM element/s.
- Model: Class that manages all the access to the server.
- Controller: All the logic that will act when the View is updated or when something is returned from Model.