MVC Architecture


    Model-View-Controller Architecture (MVC)

      a) This is possible thanks to ES6 modules, which allows us to make our JavaScript apps more modular, by separating different aspects of the app into different files.
      b) We will have one Model that handles data and apps logic for each different aspect of the app, and the same goes to the View, that gets and displays data from, and to, the UI.

      As an example, the Search functionality:
      Search Model: where we do Ajax calls to get recipes for a certain search query from the API.
      Search View: where we get the search query string from the user interface and also where we print the results of the search.
      Controller: brings the two together, so that Model and View never have to communicate.